How to modify resource dependencies in CRS

I wanted to change the diskgroup used for flash recovery area. So I created a new diskgroup and updated the parameters

SQL> show parameter db_recovery_file_dest
NAME                                 TYPE        VALUE
———————————— ———– ——————————
db_recovery_file_dest                string      +RACFRA
SQL> alter system set  db_recovery_file_dest=’+FRA’
/
System altered.
SQL> show parameter db_recovery_file_dest
NAME                                 TYPE        VALUE
———————————— ———– ——————————
db_recovery_file_dest                string      +FRA

Also removed the old diskgroup

SQL> drop diskgroup  RACFRA
/
Diskgroup dropped.

After that shutdown the database for some maintenance. But when I tried starting it back, it started throwing following error

oragrid@node-20> srvctl start database -d mydb

PRCR-1079 : Failed to start resource ora.mydb.db
CRS-2640: Required resource ‘ora.RACFRA.dg’ is missing.

I was not sure, what exactly happened. As I already dropped this diskgroup, database & ASM diskgroup dependency should have been removed.  But error message was indicating something else

So my first check, was to see if the resource was still present

oragrid@node-20> crsctl stat res -t
——————————————————————————–
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
——————————————————————————–
Local Resources
——————————————————————————–
ora.FRA.dg
               ONLINE  ONLINE       node-20
               ONLINE  ONLINE       node-21
ora.LISTENER.lsnr
               ONLINE  ONLINE       node-20
               ONLINE  ONLINE       node-21
ora.DG.dg
               ONLINE  ONLINE       node-20
               ONLINE  ONLINE       node-21
ora.DG2.dg
               ONLINE  ONLINE       node-20
               ONLINE  ONLINE       node-21
ora.DG3.dg
               ONLINE  ONLINE       node-20
               ONLINE  ONLINE       node-21
ora.DG4.dg
               ONLINE  ONLINE       node-20
               ONLINE  ONLINE       node-21
ora.asm
               ONLINE  ONLINE       node-20            Started
               ONLINE  ONLINE       node-21            Started
ora.eons
               ONLINE  ONLINE       node-20
               ONLINE  ONLINE       node-21
ora.gsd
               OFFLINE OFFLINE      node-20
               OFFLINE OFFLINE      node-21
ora.net1.network
               ONLINE  ONLINE       node-20
               ONLINE  ONLINE       node-21
ora.ons
               ONLINE  ONLINE       node-20
               ONLINE  ONLINE       node-21
——————————————————————————–
Cluster Resources
——————————————————————————–
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       node-21
ora.oc4j
      1        OFFLINE OFFLINE
ora.node-20.vip
      1        ONLINE  ONLINE       node-20
ora.node-21.vip
      1        ONLINE  ONLINE       node-21
ora.scan1.vip
      1        ONLINE  ONLINE       node-21
ora.mydb.db
      1        OFFLINE OFFLINE                               Instance Shutdown
      2        OFFLINE OFFLINE                               Instance Shutdown

crsctl output did not show this diskgroup. So checked the dependency for the database resource

# crsctl status resource ora.mydb.db -f

Where I found, that START_DEPENDENCIES still have reference to old diskgroup.  So removed, re-added the database & associated instances

oragrid@node-21> srvctl remove database -d mydb
oragrid@node-21> srvctl add  database -d mydb -o /oracle/11gr2
ora11gr2@node-21> srvctl add instance -d mydb -i mydb1 -n node-20
ora11gr2@node-21> srvctl add instance -d mydb -i mydb2 -n node-21

Again checked the dependency for the database resource

# crsctl status resource ora.mydb.db -f

This time START_DEPENDENCIES was having correct set of ASM diskgroups & the old DG reference was removed.

Now started the database, all was fine.

oragrid@node-21> srvctl start database -d mydb

So to avoid this problem, we should be using srvctl remove diskgroup, instead of using sqlplus.

Advertisements
This entry was posted in Oracle Automatic Storage Management, Oracle Cluster Ready Services, Oracle Real Application Cluster and tagged . Bookmark the permalink.

2 Responses to How to modify resource dependencies in CRS

  1. Ranjeeth voddepally says:

    You can also use crsctl commands to change these dependencies. I ran into similar errors because we dropped a unused diskgroup DG_ARCH.

    To find the diskgroup dependencies use the following command. This will return all the dependencies where “DG_ARCH” is used.

    crsctl status resource ora.chdecqlp.db -f|grep -i dg_arch

    OUTPUT:
    START_DEPENDENCIES=hard(ora.DG_DATA.dg,ora.DG_ARCH.dg) weak(type:ora.listener.type,global:type:ora.scan_listener.type,uniform:ora.ons,uniform:ora.eons) pullup(ora.DG_DATA.dg)

    As you can notice “ora.DG_ARCH.dg” is in “START_DEPENDENCIES” of the cluster database.

    Solution:

    crsctl modify resource ora.dbame.db -attr “START_DEPENDENCIES=’hard(ora.DG_DATA.dg) weak(type:ora.listener.type,global:type:ora.scan_listener.type,uniform:ora.ons,uniform:ora.eons) pullup(ora.DG_DATA.dg)'” -f

    Now that i removed the DG_ARCH from START_DEPENDENCIES, cluster database will not look for DG_ARCH at the startup.

    Just use for restarting your database without errors.

    srvctl start database -d db_unique_name

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s