Tuesday, June 28, 2022

ASM and Database does not auto start in Oracle restart environment (After Server start)

 If you are supporting Any Oracle restart environment and if you notice that your ASM instance and Database instance does not start automatically during server start/ reboot, follow the below steps (As suggested in the Oracle Support Documentation).

1. Check the status of HAS (High-Availability Services) daemon.

[oracle@linux1 ohasd]$ ps -ef | grep d.bin

oracle    3889     1  0 17:59 ?        00:00:17 /u01/app/oracle/product/11.2.0/grid/bin/ohasd.bin reboot

oracle    4679  4173  0 18:31 pts/1    00:00:00 grep d.bin

[oracle@linux1 ohasd]$ crsctl check has

CRS-4638: Oracle High Availability Services is online

[oracle@linux1 ohasd]$

You notice that only HASD process is running. CSSD process is missing. (Since this is not a RAC database, CRSD is not supposed to run anyway).

2. Next, check the resource status

[oracle@linux1 ohasd]$ crsctl stat res -t

--------------------------------------------------------------------------------

NAME           TARGET  STATE        SERVER                   STATE_DETAILS

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.ARCH.dg

               OFFLINE OFFLINE      linux1

ora.DATA.dg

               OFFLINE OFFLINE      linux1

ora.LISTENER.lsnr

               OFFLINE OFFLINE      linux1

ora.asm

               OFFLINE OFFLINE      linux1

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.cssd

      1        OFFLINE OFFLINE

ora.diskmon

      1        OFFLINE OFFLINE

ora.oradb1.db

      1        OFFLINE OFFLINE

[oracle@linux1 ohasd]$

 As you can see, ora.cssd process is offline. It did not start automatically.


3. Let's check the auto start setting for CSSD.


[oracle@linux1 ohasd]$ crsctl stat res ora.cssd -p -init

NAME=ora.cssd

TYPE=ora.cssd.type

ACL=owner:oracle:rwx,pgrp:oinstall:rwx,other::r--

ACTION_FAILURE_TEMPLATE=

ACTION_SCRIPT=

ACTIVE_PLACEMENT=0

AGENT_FILENAME=%CRS_HOME%/bin/cssdagent%CRS_EXE_SUFFIX%

AGENT_HB_INTERVAL=0

AGENT_HB_MISCOUNT=10

AUTO_START=never

CARDINALITY=1

AUTO_START is set to "never". It should be set to "always" for auto start to work.

4. Let's check the ASM auto start dependency on CSSD process

[oracle@linux1 ohasd]$ crsctl stat res ora.asm -p -init | grep -i dependencies
START_DEPENDENCIES=hard(ora.cssd) weak(ora.LISTENER.lsnr)
STOP_DEPENDENCIES=hard(ora.cssd)
[oracle@linux1 ohasd]$

As you can see, there is a hard dependency on CSSD process for auto start to work.

5. Next, change the auto start setting of cssd process to "always"

From root user:
(* Make sure to set the GRID environement correctly such as, Oracle_Home to Grid home directories and grid_home/bin directories to the OS PATH variable)

[root@linux1 ~]# export ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid
[root@linux1 ~]# export ORACLE_SID=+ASM
[root@linux1 ~]# export PATH=$PATH:$ORACLE_HOME/bin
[root@linux1 ~]# crsctl modify resource ora.cssd -attr "AUTO_START=always" -init
[root@linux1 ~]# crsctl stat res ora.cssd -p -init | grep -i start
AUTO_START=always
NOT_RESTARTING_TEMPLATE=
RESTART_ATTEMPTS=5
START_ARGS=
START_COMMAND=
START_DEPENDENCIES=weak(concurrent:ora.diskmon)
START_TIMEOUT=600
[root@linux1 ~]#

6. stop/ start HAS service or reboot the server and verify that the CSSD, ASM, Listener and databases are starting up automatically.

No comments:

Post a Comment

ASM and Database does not auto start in Oracle restart environment (After Server start)

 If you are supporting Any Oracle restart environment and if you notice that your ASM instance and Database instance does not start automati...