Oracle CRS Enable/disable

Clusterware auto start:
crsctl enable/disable crs will make sure the crs to either automatically start clusterware or not . crsctl config crs will show if auto start of crs enabled or not. Below file is where the information is stored.

Check crs status:
[root@VM1 root]# crsctl config crs
CRS-4622: Oracle High Availability Services autostart is enabled.

[root@VM1 root]# pwd
/etc/oracle/scls_scr/vm1/root

[root@VM1 root]# ls -ltr
total 12
-rw-r–r– 1 root root 7 Dec 17 2013 crsstart
-rw-r–r– 1 root oinstall 7 Dec 17 2013 ohasdstr
-rw-r–r– 1 root oinstall 8 Jul 2 18:04 ohasdrun

[root@VM1 root]# cat /etc/oracle/scls_scr/<nodename>/root/ohasdstr
enable

Disable crs and check the status on file

[root@VM1 root]# crsctl disable crs
CRS-4621: Oracle High Availability Services autostart is disabled.

[root@VM1 root]# cat ohasdstr
disable

Enable the auto start of crs again:

[root@VM1 root]# crsctl enable crs
CRS-4622: Oracle High Availability Services autostart is enabled.

[root@VM1 root]# cat /etc/oracle/scls_scr/<nodename>/root/ohasdstr
enable

What does ohasdrun for in the location? It contains information if clustware needs to be started. ohasd daemon process will read this file every few seconds and start clusterware.

[root@VM1 root]# cat ohasdrun
restart

Stop crs and check the status of file.

[root@VM1 root]# crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ‘vm1’
CRS-2673: Attempting to stop ‘ora.crsd’ on ‘vm1’

[root@VM1 root]# crsctl check crs
CRS-4639: Could not contact Oracle High Availability Services
Check the contents of the file ohasdrun

[root@VM1 root]# cat ohasdrun
stop

Also crsctl start crs command will return immediatly , because the command will simply change the contents of file ohasdrun to restart and clustware start will run in background.

[root@VM1 root]# crsctl start crs
CRS-4123: Oracle High Availability Services has been started.

File contents modified to restart again.

[root@VM1 root]# cat ohasdrun
restart

Though not recommended , you can also manually edit the contents of the file to restart and check if clusterware starts automatically.  It does 🙂

Summary:

init.ohasd process started after server reboot by platform specific means. This process will read the contents of the files and startup clusterware automatically. Do not alter the permissions or contents of the file manually, they should always be modified using crsctl commands

 

 

 

ref: https://orainternals.wordpress.com/2013/06/05/clusterware-startup/

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