Pythian Blog: Technical Track

Services [not] Starting Automatically with CRS after Reboot?

Hello all! So, a client asked me to check why his database was not starting with CRS after a reboot. I started investigating and noticed this: On Oracle 11.2, the database auto-start policy in the Clusterware is "restore", which means that Clusterware will remember the last state of the database. As well as the database, Oracle 11.2 comes, by default, with several important resources with attribute AUTO_START=restore in the profile. With that, if the database was stopped normally, then on the next restart of Clusterware it won't be started. Otherwise, if the server crashes, or for some reason the OS is rebooted, then Clusterware will start the database because the last state was ONLINE (running). In my case, a second reboot was done with the database down, and this is why the database didn't start. And the same thing applied to other target types. The conclusion I made? For best availability, it is a good practice to change this default behavior after each installation on 11.2. Some checking and adjusting scripts below: To check all resources:
crsctl stat res -p
Checking on database resource:
...
 NAME=ora.pythiandb.db
 TYPE=ora.database.type
 ACL=owner:oracle:rwx,pgrp:oinstall:rwx,other::r--
 ACTION_FAILURE_TEMPLATE=
 ACTION_SCRIPT=
 ACTIVE_PLACEMENT=1
 AGENT_FILENAME=%CRS_HOME%/bin/oraagent%CRS_EXE_SUFFIX%
 AUTO_START=restore
 ...
But besides DB, several resources were in "restore" or even in "never", such as ASM and Voting Disk DG... Check for all resourced AUTO_START:
[root@pythiansrv1 ~]# crsctl stat res -p |grep AUTO_START
 AUTO_START=always
 AUTO_START=always
 AUTO_START=always
 AUTO_START=restore
 AUTO_START=restore
 AUTO_START=restore
 AUTO_START=restore
 AUTO_START=never
 AUTO_START=never
 AUTO_START=restore
 AUTO_START=always
 AUTO_START=restore
 AUTO_START=restore
 AUTO_START=restore
 AUTO_START=restore
 AUTO_START=restore
 AUTO_START=always
 AUTO_START=restore
 AUTO_START=restore
 AUTO_START=restore
 AUTO_START=restore
So to fix all the resources:
crsctl modify resource ora.APS1.dg -attr AUTO_START=always
 crsctl modify resource ora.DG1.dg -attr AUTO_START=always
 crsctl modify resource ora.FRA.dg -attr AUTO_START=always
 crsctl modify resource ora.LISTENER.lsnr -attr AUTO_START=always
 crsctl modify resource ora.VDISK_OCR.dg -attr AUTO_START=always
 crsctl modify resource ora.asm -attr AUTO_START=always
 crsctl modify resource ora.gsd -attr AUTO_START=always
 crsctl modify resource ora.net1.network -attr AUTO_START=always
 crsctl modify resource ora.ons -attr AUTO_START=always
 crsctl modify resource ora.registry.acfs -attr AUTO_START=always
 crsctl modify resource ora.LISTENER_SCAN1.lsnr -attr AUTO_START=always
 crsctl modify resource ora.LISTENER_SCAN2.lsnr -attr AUTO_START=always
 crsctl modify resource ora.LISTENER_SCAN3.lsnr -attr AUTO_START=always
 crsctl modify resource ora.cvu -attr AUTO_START=always
 crsctl modify resource ora.pythiandb.db -attr AUTO_START=always
 crsctl modify resource ora.pythiansrv1.vip -attr AUTO_START=always
 crsctl modify resource ora.pythiansrv2.vip -attr AUTO_START=always
 crsctl modify resource ora.oc4j -attr AUTO_START=always
 crsctl modify resource ora.scan1.vip -attr AUTO_START=always
 crsctl modify resource ora.scan2.vip -attr AUTO_START=always
 crsctl modify resource ora.scan3.vip -attr AUTO_START=always
Below is the output and the checking:
[root@pythiansrv1 ~]# crsctl modify resource ora.LISTENER.lsnr -attr AUTO_START=always
 [root@pythiansrv1 ~]# crsctl modify resource ora.VDISK_OCR.dg -attr AUTO_START=always
 [root@pythiansrv1 ~]# crsctl modify resource ora.asm -attr AUTO_START=always
 [root@pythiansrv1 ~]# crsctl modify resource ora.gsd -attr AUTO_START=always
 [root@pythiansrv1 ~]# crsctl modify resource ora.net1.network -attr AUTO_START=always
 [root@pythiansrv1 ~]# crsctl modify resource ora.ons -attr AUTO_START=always
 [root@pythiansrv1 ~]# crsctl modify resource ora.registry.acfs -attr AUTO_START=always
 [root@pythiansrv1 ~]# crsctl modify resource ora.LISTENER_SCAN1.lsnr -attr AUTO_START=always
 [root@pythiansrv1 ~]# crsctl modify resource ora.LISTENER_SCAN2.lsnr -attr AUTO_START=always
 [root@pythiansrv1 ~]# crsctl modify resource ora.LISTENER_SCAN3.lsnr -attr AUTO_START=always
 [root@pythiansrv1 ~]# crsctl modify resource ora.cvu -attr AUTO_START=always
 [root@pythiansrv1 ~]# crsctl modify resource ora.pythiandb.db -attr AUTO_START=always
 [root@pythiansrv1 ~]# crsctl modify resource ora.pythiansrv1.vip -attr AUTO_START=always
 [root@pythiansrv1 ~]# crsctl modify resource ora.pythiansrv2.vip -attr AUTO_START=always
 [root@pythiansrv1 ~]# crsctl modify resource ora.oc4j -attr AUTO_START=always
 [root@pythiansrv1 ~]# crsctl modify resource ora.scan1.vip -attr AUTO_START=always
 [root@pythiansrv1 ~]# crsctl modify resource ora.scan2.vip -attr AUTO_START=always
 [root@pythiansrv1 ~]# crsctl modify resource ora.scan3.vip -attr AUTO_START=always
 [root@pythiansrv1 ~]#
 [root@pythianrv1 ~]# crsctl stat res -p |grep AUTO_START
 AUTO_START=always
 AUTO_START=always
 AUTO_START=always
 AUTO_START=always
 AUTO_START=always
 AUTO_START=always
 AUTO_START=always
 AUTO_START=always
 AUTO_START=always
 AUTO_START=always
 AUTO_START=always
 AUTO_START=always
 AUTO_START=always
 AUTO_START=always
 AUTO_START=always
 AUTO_START=always
 AUTO_START=always
 AUTO_START=always
 AUTO_START=always
 AUTO_START=always
 AUTO_START=always
 [root@pythiansrv1 ~]#
 

No Comments Yet

Let us know what you think

Subscribe by email