CRS-2518: Invalid directory path when calling “crsctl add res”

I got this error when adding a resource using


[oracle@guang HA_scripts]$ crsctl add resource DB11GR2.db -type cluster_resource -file /u01/app/11.2.0/grid/HA_scripts/ora.db11gr2.db.profile.cluster_vertion.owner_oracle

CRS-2518: Invalid directory path '/u01/app/11.2.0/grid/HA_scripts/active_passive_cluster_run_by_oracle.sh'
CRS-4000: Command Add failed, or completed with errors.

Where the profile /u01/app/11.2.0/grid/HA_scripts/ora.db11gr2.db.profile.cluster_vertion.owner_oracle has the following contents:


NAME=DB11GR2.db
TYPE=cluster_resource
DESCRIPTION=Oracle Database resource
ACL=owner:oracle:rwx,pgrp:oinstall:rwx,other::r--
ACTION_SCRIPT=/u01/app/11.2.0/grid/HA_scripts/oracle_restart_db11gr2.sh
PLACEMENT=restricted
ACTIVE_PLACEMENT=0
AUTO_START=restore
CARDINALITY=1
CHECK_INTERVAL=10
DEGREE=1
ENABLED=1
HOSTING_MEMBERS=guang yangmei
LOGGING_LEVEL=1
RESTART_ATTEMPTS=1
START_TIMEOUT=600
START_DEPENDENCIES=hard(ora.DATA.dg,ora.FRA.dg) weak(type:ora.listener.type,uniform:ora.ons,uniform:ora.eons) pullup(ora.DATA.dg,ora.FRA.dg)
STOP_TIMEOUT=600
STOP_DEPENDENCIES=hard(intermediate:ora.asm,shutdown:ora.DATA.dg,shutdown:ora.FRA.dg)
UPTIME_THRESHOLD=1h

At the beginning I thought it’s an issue related to user’s permission. I run the command as ‘oracle’ user (the owner of RDBMS) while the resource profile is located in ‘GRID_HOME’.

But it finally turned out that the script ‘/u01/app/11.2.0/grid/HA_scripts/active_passive_cluster_run_by_oracle.sh’ is NOT COPIED to the other node. The error message is somewhat miss leading. After scping the missing files to the other node ‘yangmei’, it successfully completed.


[grid@guang HA_scripts]$ scp active_passive_cluster_run_by_oracle.sh ora.db11gr2.db.profile.cluster_vertion.owner_oracle grid@yangmei:/u01/app/11.2.0/grid/HA_scripts

[grid@guang HA_scripts]$ scp oracle_restart_db11gr2.sh  grid@yangmei:/u01/app/11.2.0/grid/HA_scripts

oracle_restart_db11gr2.sh                                                                                         100%  717     0.7KB/s   00:00

ora.db11gr2.db.profile.cluster_vertion.owner_oracle                                    100%  654     0.6KB/s   00:00

[oracle@guang HA_scripts]$ crsctl add resource DB11GR2.db -type cluster_resource -file /u01/app/11.2.0/grid/HA_scripts/ora.db11gr2.db.profile.cluster_vertion.owner_oracle

[oracle@guang HA_scripts]$ crsctl start res DB11GR2.db
CRS-2672: Attempting to start 'DB11GR2.db' on 'guang'
CRS-2676: Start of 'DB11GR2.db' on 'guang' succeeded

succeed.

Take a note to remember the fix.

Advertisements

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

%d bloggers like this: