Friday, July 10, 2009

ORA-15033 while trying to add a LUN to a diskgroup

While adding a new LUN to an existing diskgroup, getting this error --
+ASM1 > alter diskgroup PWPRD_AUDIT add disk '/dev/rdsk/oracle/RAC_PWPRD_Audit05';
alter diskgroup PWPRD_AUDIT add disk '/dev/rdsk/oracle/RAC_PWPRD_Audit05'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15033: disk '/dev/rdsk/oracle/RAC_PWPRD_Audit05' belongs to diskgroup "PWRPPRD_REDO"



Apparently this belonged to a diskgroup called PWRPPRD_REDO at some point. The diskgroup was still there in ASM in "dismounted" state.
ASM1 > select name,state,round(total_mb/1024) "total_gb",round(free_mb/1024) "free_gb" from v$asm_diskgroup order by 1;

NAME STATE total_gb free_gb
------------------ ----------- ---------- ----------
ARCHIVES MOUNTED 250 206
ARCHIVES01 MOUNTED 250 247
..
..
PWRPPRD_REDO DISMOUNTED 0 0
REDO01 MOUNTED 25 10
..
..


An attempt to mount the diskgroup results into the following error. Further it cannot be dropped.
+ASM1 > alter diskgroup PWRPPRD_REDO mount;
alter diskgroup PWRPPRD_REDO mount
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15040: diskgroup is incomplete
ORA-15042: ASM disk "1" is missing

+ASM1 > drop diskgroup PWRPPRD_REDO;
drop diskgroup PWRPPRD_REDO
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15001: diskgroup "PWRPPRD_REDO" does not exist or is not mounted


Since the diskgroup PWRPPRD_REDO is not used, we can recreate with the "force" option (and then drop it, so that it releases the LUN and the metadata is wiped out).
+ASM1 > create diskgroup PWRPPRD_REDO external redundancy disk '/dev/rdsk/oracle/RAC_PWPRD_Audit05' force;

Diskgroup created.

+ASM1 > select name,state,round(total_mb/1024) "total_gb",round(free_mb/1024) "free_gb" from v$asm_diskgroup order by 1;


NAME STATE total_gb free_gb
------------------ ----------- ---------- ----------
ARCHIVES MOUNTED 250 200
..
..
PWRPPRD_REDO MOUNTED 50 50
REDO01 MOUNTED 25 10
..
..
13 rows selected.

+ASM1 > drop diskgroup PWRPPRD_REDO;

Diskgroup dropped.



This releases the LUN and it can now be reused for the original purpose (ie for the PWPRD_AUDIT diskgroup).
+ASM1 > alter diskgroup PWPRD_AUDIT add disk '/dev/rdsk/oracle/RAC_PWPRD_Audit05';

Diskgroup altered.

No comments: