How to Safely Remove a Used Disk from ASM DiskGroup in Oracle 19c RAC
In this post, I’m sharing a step-by-step process to safely remove a used disk from an ASM DiskGroup in Oracle 19c RAC without impacting data.
Removing a disk requires careful planning to maintain data integrity.
Key Points to Remember
- Normal / High Redundancy: ASM automatically rebalances data across other disks.
- External Redundancy: Ensure sufficient free space before removing the disk.
- Free Space Check: FREE_MB should be greater than the space occupied by the disk to be dropped.
- Mirroring Requirement: REQUIRED_MIRROR_FREE_MB should be less than FREE_MB to ensure proper mirroring.
- Power Limit: Controls the speed of rebalancing.
Example:
sqlCopyEditALTER DISKGROUP DATA REBALANCE POWER 7;
Recommended value: 1–11 (higher = faster but uses more resources). Maximum allowed: 0–1024 depending on system capacity.
Example Scenario
We have an ASM DiskGroup named +DATA with multiple disks. We want to remove disk DS8 safely.
1. Check Existing Disks in the DiskGroup
sqlCopyEditSET LINES 200COL name FORMAT a20COL path FORMAT a28COL total_mb FORMAT 99999COL free_mb FORMAT 99999 SELECT group_number, name, path, total_mb, free_mb, header_status, mount_status, stateFROM v$asm_diskWHERE group_number = ( SELECT group_number FROM v$asm_diskgroup WHERE name = ‘DATA’);
2. Check Redundancy Type & Space Availability
sqlCopyEditSELECT name, type, state, total_mb, free_mb, required_mirror_free_mb, usable_file_mbFROM v$asm_diskgroupWHERE name = ‘DATA’;
✅ Ensure FREE_MB > required space before proceeding.
3. Drop the Disk from ASM DiskGroup
sqlCopyEditALTER DISKGROUP DATA DROP DISK DS8;
Rebalancing will redistribute the data across remaining disks.
4. Monitor Rebalancing Progress
sqlCopyEditSELECT group_number, operation, state, est_minutesFROM v$asm_operation;
Wait until STATE = COMPLETED.
5. Verify DiskGroup After Rebalancing
sqlCopyEditSELECT name, total_mb, free_mbFROM v$asm_diskgroupWHERE name = ‘DATA’;
✅ Ensure DiskGroup is healthy and space is balanced.
6. Confirm Disk Removal
sqlCopyEditSELECT name, pathFROM v$asm_diskWHERE group_number = ( SELECT group_number FROM v$asm_diskgroup WHERE name = ‘DATA’);
If the disk is no longer listed → removal was successful.
7. Optional – Decommission the Physical Disk
Find disks with HEADER_STATUS = ‘FORMER’:
sqlCopyEditSELECT disk_number, name, pathFROM v$asm_diskWHERE header_status = ‘FORMER’;
Clear ASM metadata if reusing:
bashCopyEditdd if=/dev/zero of=/dev/sdX bs=1024 count=100asmcmd afd_label <disk> –init
Remove from ASM configuration:
bashCopyEditoracleasm deletedisk DS8
8. Final Check – Database Functionality
Ensure no performance issues or errors:
sqlCopyEditSELECT * FROM v$asm_diskgroup WHERE name = ‘DATA’;
✅ Conclusion: By following these steps, you can remove a disk from ASM safely without impacting database availability or data integrity.