Tuesday, April 13, 2010

Oracle ASM: Alter DiskGroup to add disk with force ORA-15032, ORA-15033

Recently there was an issue with one of our test database.


We have oracle 10g server with ASM support. DiskGroup DATA created with "NORMAL" redundancy and with 46disks. Out of 46 disks one disk got an issue and system administrator replaced it without running "ALTER DISKGROUP" Command.


We try to add new disk to disk group DATA it raise below oracle exception:


SQL> ALTER DISKGROUP DATA ADD DISK '/dev/rdsk/c2t1d0s6';
ALTER DISKGROUP DATA ADD DISK '/dev/rdsk/c2t1d0s6'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15033: disk '/dev/rdsk/c2t1d0s6' belongs to diskgroup "DATA"


Then we try to drop disk from DATA Diskgroup.


SQL> ALTER DISKGROUP DATA DROP DISK '/dev/rdsk/c2t1d0s6';
ALTER DISKGROUP DATA DROP DISK '/dev/rdsk/c2t1d0s6'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15054: disk "/DEV/RDSK/C2T1D0S6" does not exist in diskgroup "DATA"


So the newly added disk belong to DiskGroup DATA and doesn’t exist in DiskGroup DATA.


ASM Meta Data contain information for this disk as we won’t run “Alter DiskGroup DATA DROP DISK” command. We need to add disk with Force option.


SQL> ALTER DISKGROUP DATA ADD DISK '/dev/rdsk/c2t1d0s6' force;
Diskgroup altered.