Sunday, November 18, 2012

CRS-0222 and CRS-2640 while removing RAC diskgroup


Note: It is highly recommended that you manage asm from asmcmd
ASMCMD [+] > dropdg -r -f TEST
-----------------------------------------------------------------------------------------------------
Recently I tried to drop a datagroup from RAC cluster. It was previously registered with cluster while creating a RAC database:

HA Resource                                   Target     State
ora.TEST.dg                                    ONLINE     OFFLINE

I moved all database files from this datagroup to an other. Then when i tried to drop it, following error occured:

srvctl remove diskgroup -g TEST 
PRCA-1002 : Failed to remove CRS resource ora.TEST.dg for ASM Disk Group TEST
PRCR-1028 : Failed to remove resource ora.TEST.dg
PRCR-1072 : Failed to unregister resource ora.TEST.dg
CRS-0222: Resource 'ora.TEST.dg' has dependency error.

The right thing is to remove diskgroup this way.

srvctl modify database -d rac -a "DATA,FRA"
srvctl disable diskgroup -g TEST
srvctl remove diskgroup -g TEST -f

First of all I removed datagroup :

srvctl remove diskgroup -g TEST -f

Then, when i tried to open database, It gave me fallowing error:

srvctl start database -d rac
PRCR-1079 : Failed to start resource ora.rac.db
CRS-2640: Required resource 'ora.TEST.dg' is missing.

That was because although i removed diskgroup TEST with force option, dependency was remained.

./crsctl status resource ora.rac.db -f|grep TEST
START_DEPENDENCIES=hard(ora.DATA.dg,ora.FRA.dg,ora.TEST.dg) weak(type:ora.listener.type,global:type:ora.scan_listener.type,uniform:ora.ons,uniform:ora.eons) pullup(ora.DATA.dg)
STOP_DEPENDENCIES=hard(intermediate:ora.asm,shutdown:ora.DATA.dg,shutdown:ora.FRA.dg,shutdown:ora.TEST.dg)

I run fallowing command to remove TEST dependency:

srvctl modify database -d rac -a “DATA,FRA” 

Then i check dependency again,TEST in not there:

./crsctl status resource ora.rac.db -f|grep TEST

(nothing)

./crsctl status resource ora.rac.db -f|grep DATA

START_DEPENDENCIES=hard(ora.DATA.dg) weak(type:ora.listener.type,global:type:ora.scan_listener.type,uniform:ora.ons,uniform:ora.eons) pullup(ora.DATA.dg)
STOP_DEPENDENCIES=hard(intermediate:ora.asm,shutdown:ora.DATA.dg)

After i was able to open my database

srvctl start database -d rac

No comments:

Post a Comment