I have read the interesting article from Riyaj today. He was explainig how the clusterware is tarted.
As everybody should know, the ohasd process should be mentioned in the inittab file.So I went to check the inittab, and I was a bit surprised. No ohasd in my inittab:
[root@excdbadm02 ~]# cat /etc/inittab
# inittab is only used by upstart for the default runlevel.
#
# ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# System initialization is started by /etc/init/rcS.conf
#
# Individual runlevels are started by /etc/init/rc.conf
#
# Ctrl-Alt-Delete is handled by /etc/init/control-alt-delete.conf
#
# Terminal gettys are handled by /etc/init/tty.conf and /etc/init/serial.conf,
# with configuration in /etc/sysconfig/init.
#
# For information on how to write upstart event handlers, or how
# upstart works, see init(5), init(8), and initctl(8).
#
# Default runlevel. The runlevels used are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:3:initdefault:
Only thing I can see is that my default runlevel is 3. After I read all the hashed informations it was clear, that the processes which should be monitored by init are in the /etc/init directory:
[root@excdbadm02 ~]# cd /etc/init
[root@excdbadm02 init]# ls
control-alt-delete.conf kexec-disable.conf plymouth-shutdown.conf rc.conf rcS-sulogin.conf readahead-disable-services.conf splash-manager.conf tty.conf
control-alt-delete.override oracle-ohasd.conf prefdm.conf rcS.conf readahead-collector.conf serial.conf start-ttys.conf ttyS0.conf
init-system-dbus.conf oracle-tfa.conf quit-plymouth.conf rcS-emergency.conf readahead.conf serial.override start-ttys.override
In the oracle-ohasd.conf are all needed infos:
[root@excdbadm02 init]# cat oracle-ohasd.conf
# Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
#
# Oracle OHASD startup
start on runlevel [35]
stop on runlevel [!35]
respawn
exec /etc/init.d/init.ohasd run >/dev/null 2>&1 </dev/null
The other interesting thing I didnt know was, that when you issue the crsctl start crs command,
only the content of the /etc/oracle/scls_scr/excdbadm02/root/ohasdrun is modified. When you issue "start" command the restart will be written in the ohasdrun file. The init.ohasd process is checking the content of this file and will start the crs when it's stopped.
Whe you issue the crsctl stop crs, stoped will be written in the ohasdrun and init.ohasd will not try to start the crs.
[root@excdbadm02 ~]# cat /etc/inittab
# inittab is only used by upstart for the default runlevel.
#
# ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# System initialization is started by /etc/init/rcS.conf
#
# Individual runlevels are started by /etc/init/rc.conf
#
# Ctrl-Alt-Delete is handled by /etc/init/control-alt-delete.conf
#
# Terminal gettys are handled by /etc/init/tty.conf and /etc/init/serial.conf,
# with configuration in /etc/sysconfig/init.
#
# For information on how to write upstart event handlers, or how
# upstart works, see init(5), init(8), and initctl(8).
#
# Default runlevel. The runlevels used are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:3:initdefault:
Only thing I can see is that my default runlevel is 3. After I read all the hashed informations it was clear, that the processes which should be monitored by init are in the /etc/init directory:
[root@excdbadm02 ~]# cd /etc/init
[root@excdbadm02 init]# ls
control-alt-delete.conf kexec-disable.conf plymouth-shutdown.conf rc.conf rcS-sulogin.conf readahead-disable-services.conf splash-manager.conf tty.conf
control-alt-delete.override oracle-ohasd.conf prefdm.conf rcS.conf readahead-collector.conf serial.conf start-ttys.conf ttyS0.conf
init-system-dbus.conf oracle-tfa.conf quit-plymouth.conf rcS-emergency.conf readahead.conf serial.override start-ttys.override
In the oracle-ohasd.conf are all needed infos:
[root@excdbadm02 init]# cat oracle-ohasd.conf
# Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
#
# Oracle OHASD startup
start on runlevel [35]
stop on runlevel [!35]
respawn
exec /etc/init.d/init.ohasd run >/dev/null 2>&1 </dev/null
The other interesting thing I didnt know was, that when you issue the crsctl start crs command,
only the content of the /etc/oracle/scls_scr/excdbadm02/root/ohasdrun is modified. When you issue "start" command the restart will be written in the ohasdrun file. The init.ohasd process is checking the content of this file and will start the crs when it's stopped.
Whe you issue the crsctl stop crs, stoped will be written in the ohasdrun and init.ohasd will not try to start the crs.