I've found that CRS sometimes tries to start RAC database instances before it starts ASM. This casues the databases to not start when the server is bounced as they cannot access the datafiles.
The way around this is to set up a dependency on the RAC instance that states that ASM needs to be started before the instance can be started.
To check if the dependency already exists use
crs_stat -p
oracle@dbnode1> crs_stat -p | more
NAME=ora.DBPRD.DBPRD1.inst
TYPE=application
ACTION_SCRIPT=/apps/oracle/product/10.2.0/db_1/bin/racgwrap
ACTIVE_PLACEMENT=0
AUTO_START=1
CHECK_INTERVAL=600
DESCRIPTION=CRS application for Instance
FAILOVER_DELAY=0
FAILURE_INTERVAL=0
FAILURE_THRESHOLD=0
HOSTING_MEMBERS=dbnode1
OPTIONAL_RESOURCES=
PLACEMENT=restricted
REQUIRED_RESOURCES=ora.dbnode1.ASM1.asm
RESTART_ATTEMPTS=5
SCRIPT_TIMEOUT=600
START_TIMEOUT=0
STOP_TIMEOUT=0
UPTIME_THRESHOLD=7d
USR_ORA_ALERT_NAME=
USR_ORA_CHECK_TIMEOUT=0
USR_ORA_CONNECT_STR=/ as sysdba
USR_ORA_DEBUG=0
USR_ORA_DISCONNECT=false
USR_ORA_FLAGS=
USR_ORA_IF=
USR_ORA_INST_NOT_SHUTDOWN=
USR_ORA_LANG=
USR_ORA_NETMASK=
USR_ORA_OPEN_MODE=
USR_ORA_OPI=false
USR_ORA_PFILE=
USR_ORA_PRECONNECT=none
USR_ORA_SRV=
USR_ORA_START_TIMEOUT=0
USR_ORA_STOP_MODE=immediate
USR_ORA_STOP_TIMEOUT=0
USR_ORA_VIP=
The REQUIRE_RESOURCES line states if a dependency is set up. It the above example we can see that ASM1 on dbnode1 needs to be started before the instance DBPRD1 is started.
To set this dependency use -s flag in the srvctl command:
srvctl modify instance -d DBPRD -i DBPRD1 -s +ASM1
simple shell script to update all instances in a 2 node cluster
for db in DBPRD DB2PRD
do
srvctl modify instance -d ${db} -i ${db}1 -s +ASM1
srvctl modify instance -d ${db} -i ${db}2 -s +ASM2
done
The way around this is to set up a dependency on the RAC instance that states that ASM needs to be started before the instance can be started.
To check if the dependency already exists use
crs_stat -p
oracle@dbnode1> crs_stat -p | more
NAME=ora.DBPRD.DBPRD1.inst
TYPE=application
ACTION_SCRIPT=/apps/oracle/product/10.2.0/db_1/bin/racgwrap
ACTIVE_PLACEMENT=0
AUTO_START=1
CHECK_INTERVAL=600
DESCRIPTION=CRS application for Instance
FAILOVER_DELAY=0
FAILURE_INTERVAL=0
FAILURE_THRESHOLD=0
HOSTING_MEMBERS=dbnode1
OPTIONAL_RESOURCES=
PLACEMENT=restricted
REQUIRED_RESOURCES=ora.dbnode1.ASM1.asm
RESTART_ATTEMPTS=5
SCRIPT_TIMEOUT=600
START_TIMEOUT=0
STOP_TIMEOUT=0
UPTIME_THRESHOLD=7d
USR_ORA_ALERT_NAME=
USR_ORA_CHECK_TIMEOUT=0
USR_ORA_CONNECT_STR=/ as sysdba
USR_ORA_DEBUG=0
USR_ORA_DISCONNECT=false
USR_ORA_FLAGS=
USR_ORA_IF=
USR_ORA_INST_NOT_SHUTDOWN=
USR_ORA_LANG=
USR_ORA_NETMASK=
USR_ORA_OPEN_MODE=
USR_ORA_OPI=false
USR_ORA_PFILE=
USR_ORA_PRECONNECT=none
USR_ORA_SRV=
USR_ORA_START_TIMEOUT=0
USR_ORA_STOP_MODE=immediate
USR_ORA_STOP_TIMEOUT=0
USR_ORA_VIP=
The REQUIRE_RESOURCES line states if a dependency is set up. It the above example we can see that ASM1 on dbnode1 needs to be started before the instance DBPRD1 is started.
To set this dependency use -s flag in the srvctl command:
srvctl modify instance -d DBPRD -i DBPRD1 -s +ASM1
simple shell script to update all instances in a 2 node cluster
for db in DBPRD DB2PRD
do
srvctl modify instance -d ${db} -i ${db}1 -s +ASM1
srvctl modify instance -d ${db} -i ${db}2 -s +ASM2
done
0 comments:
Post a Comment