Oracle 19c ASM RBAL - Background Mechanics and Scenarios
Oracle 19c ASM RBAL - Background Mechanics and Scenarios
Here is a table-format explanation of ASM background processes in Oracle 19c with their roles
and the specific operations they handle in real-time scenarios:
ASM
Backgrou
Role/Function Scenario Operation/Example
nd
Process
- Add Disk: When you execute
ALTER DISKGROUP ADD DISK,
GMON kicks off the rebalance
- Monitors disk groups for
GMON - process.
changes.
(Group Adding/Drop - Drop Disk: GMON ensures extents
- Initiates and manages
Monitor) ping a disk. from the dropped disk are relocated
rebalance operations.
to the remaining disks.
- Example: ALTER DISKGROUP
DATA DROP DISK DISK01;
- Rebalance Extents: When adding
a disk, ARBn redistributes data for
ARBn - Redistributes extents
- Rebalancing uniform allocation.
(Rebalanc across ASM disks.
after adding - Controlled by ASM Power Limit:
e - Multiple ARBn processes
or dropping a ALTER SYSTEM SET
Processes (e.g., ARB0, ARB1, ...) are
disk. asm_power_limit=16;.
) spawned as needed.
- Example: ALTER DISKGROUP
DATA REBALANCE POWER 8;
- Coordinate Rebalance: When a
- Coordinates all file extent - Disk disk is added or dropped, RBAL
RBAL
placement for ASM. rebalance or assigns tasks to ARBn.
(Rebalanc
- Allocates tasks to ARBn new disk - Example: During ALTER
e Master)
processes. addition. DISKGROUP ADD DISK, RBAL
calculates how extents will move.
- Metadata Update: During a DROP
MARK - Manages metadata - Dropping a DISK, MARK ensures metadata
(Metadata changes in ASM disk disk or disk entries are updated.
Remarker) groups. group. - Example: ALTER DISKGROUP
DATA DROP DISK FORCE; ensures
Renga@DBA
Key
Operation Initiating Command Background Explanation
Processes
- GMON starts the rebalance process.
ALTER DISKGROUP - ARBn redistributes extents across the
GMON,
Add Disk DATA ADD new and existing disks.
ARBn, RBAL
DISK ...; - RBAL coordinates the placement of
extents.
- GMON moves data extents from the
ALTER DISKGROUP dropped disk to remaining disks.
GMON,
Drop Disk DATA DROP - MARK updates metadata to mark the
ARBn, MARK
DISK ...; disk OFFLINE.
- ARBn completes the rebalance.
- GMON restores extents to the
ALTER DISKGROUP
Undrop GMON, RBAL, undropped disk if the rebalance is
DATA UNDROP
Disk MARK incomplete.
DISKS;
- RBAL stops ongoing rebalance.
Renga@DBA
sql
****************
SELECT group_number, operation, state, power, sofar, est_work FROM
v$asm_operation;
sql
****************
SELECT name, state, type, total_mb, free_mb FROM v$asm_diskgroup;
sql
****************
Renga@DBA
This table-based approach highlights each ASM background process with its specific role in real-
time scenarios.
ASM rebalance operations are essential when performing disk group changes like adding,
dropping, or undropping disks. Below is a detailed explanation of what happens in the background
during each operation, with commands and scenarios.
sql
*******
ALTER DISKGROUP <diskgroup_name> ADD DISK '/dev/oracleasm/disks/DISK_NAME'
NAME <disk_name>;
• Background Process:
o GMON (Group Monitor): Initiates the rebalance operation.
o ARBn (ASM Rebalance Processes):
▪ Data is redistributed evenly across the new and existing disks.
▪ Rebalance happens online without downtime.
o I/O Distribution: ASM ensures uniform data distribution using its striping
mechanism.
• Steps:
o ASM checks the new disk's compatibility (size, speed, ASM disk header).
o Rebalance begins to spread existing extents to the new disk.
o Power limit determines the speed of rebalance (default is 1).
▪ You can adjust it: ALTER SYSTEM SET asm_power_limit=16;.
o Disk group status changes to "REBALANCE" during the operation.
Renga@DBA
• Verification:
sql
*******
SELECT group_number, operation, state, power FROM v$asm_operation;
sql
*******
CREATE DISKGROUP <diskgroup_name> EXTERNAL REDUNDANCY
DISK '/dev/oracleasm/disks/DISK1', '/dev/oracleasm/disks/DISK2'
ATTRIBUTE 'compatible.asm'='19.0', 'au_size'='4M';
• Background Process:
o ASM allocates disk headers and metadata to each disk.
o Extents are mapped and metadata blocks are created for managing data
placement.
• Steps:
o Validate the disk paths and device permissions.
o Disk headers are written with unique ASM identifiers.
o Disk group metadata is initialized to manage extents and redundancy.
• Verification:
sql
*******
SELECT name, state, type FROM v$asm_diskgroup;
sql
*******
Renga@DBA
• Background Process:
o GMON: Initiates the disk drop process.
o ARBn: Rebalances extents from the dropped disk to remaining disks.
o Disk header metadata is updated to reflect "FORCE OFFLINE."
o After rebalance completion, the disk is removed from the disk group.
• Steps:
o ASM validates that the remaining disks can hold the data from the dropped disk.
o Extents are redistributed across the remaining disks.
o Disk is marked as "FORCED DROP" if unavailable (use FORCE option).
• Command for Forced Drop:
sql
*******
ALTER DISKGROUP <diskgroup_name> DROP DISK <disk_name> FORCE;
• Verification:
sql
*******
SELECT operation, state, group_number FROM v$asm_operation;
sql
*******
DROP DISKGROUP <diskgroup_name> INCLUDING CONTENTS;
• Background Process:
o Deletes all metadata and data extents within the disk group.
o ASM releases all disks associated with the disk group.
o Disk headers are cleared, making the disks available for reuse.
• Steps:
Renga@DBA
5. Undropping a Disk
sql
*******
ALTER DISKGROUP <diskgroup_name> UNDROP DISKS;
• Background Process:
o Restores metadata for dropped disks, provided the rebalance operation has not
completed.
o GMON cancels ongoing rebalance processes related to the dropped disk.
• Steps:
o The UNDROP operation checks for the presence of dropped disks in the disk group
metadata.
o Metadata and data extents are re-synchronized.
o Disk group status is updated to reflect the undropped disk.
• Verification:
sql
*******
SELECT name, path FROM v$asm_disk WHERE state='ONLINE';
o Fix permissions:
bash
*******
chmod 660 /dev/oracleasm/disks/DISK1
chown grid:asmadmin /dev/oracleasm/disks/DISK1
o Mount manually:
sql
*******
ALTER DISKGROUP <diskgroup_name> MOUNT;
sql
*******
ALTER SYSTEM SET asm_power_limit=16;
Background Operations in ASM for ADD, DROP, UNDROP, and ALTER Commands
Oracle Automatic Storage Management (ASM) performs several background tasks when managing
disk groups with commands like ADD, DROP, UNDROP, and ALTER. These operations are managed by
background processes such as ARBx (ASM Rebalance processes) and ASMB (ASM Background
process).
Purpose:
Background Operations:
Key Parameter:
Purpose:
Remove a disk from an ASM disk group safely without data loss.
Background Operations:
Key Considerations:
• The disk remains in the group with the status DROPPING until rebalancing is complete.
Renga@DBA
Purpose:
Cancel a previously issued DROP DISK command before the rebalance is complete.
Background Operations:
Key Condition:
• The UNDROP command must be issued before the disk is completely removed from the disk
group.
Purpose:
Background Operations:
1. Validation of Parameters
a. ASM validates the attributes being altered.
2. Immediate or Deferred Action
a. Some changes (e.g., REBALANCE) take effect immediately.
Renga@DBA
🚀 Summary Table
UNDR GMON, ARBx Abort Drop, Reset Disk Status, Metadata Update
OP
Validate Parameters, Metadata Update, Rebalance (if
ALTER GMON, ARBx
needed)
Conclusion
Each ASM operation—ADD, DROP, UNDROP, or ALTER—involves GMON and ARBn background
processes managing metadata and extent distribution. By understanding these background
mechanics and using the proper commands, administrators can troubleshoot and resolve
ASM-related issues effectively.