Introduction
When performing maintenance on our 2 node Oracle Rac Cluster we need to be able to stop 1 node and keep the other node up and running.Our environment :
2 node Oracle Rac Cluster
dbnode1 - Red Hat Enterprise Linux Server release 5.5
dbnode2 - Red Hat Enterprise Linux Server release 5.5
running Oracle 11.2.0.2 and 1 RAC-database PRODDB
Instance PRODDB1 running on dbnode1
Instance PRODDB2 running on dbnode2
Steps
- Disable autostart of CRS in order to be able to perform server-maintenance and CRS is not restarted after a reboot of the server (as user root)
root [ /etc/oracle/scls_scr/dbnode2/root ]# . oraenv
ORACLE_SID = [+ASM] ? +ASM2
The Oracle base has been set to /u01/app/oracle
root [ /etc/oracle/scls_scr/dbnode2/root ]# crsctl disable crs
CRS-4621: Oracle High Availability Services autostart is disabled.
You can verify this by checking the file ohasdstr OR performing the command crsctl config crs
root [ ~ ]# cd /etc/oracle/scls_scr/dbnode2/root/
root [ /etc/oracle/scls_scr/dbnode2/root ]# ll
total 12
-rw-r--r-- 1 root root 7 Oct 27 2010 crsstart
-rw-r--r-- 1 root oinstall 8 Jan 30 2014 ohasdrun
-rw-r--r-- 1 root oinstall 7 Oct 27 2010 ohasdstr
root [ /etc/oracle/scls_scr/dbnode2/root ]# more ohasdstr
disable
root [ /etc/oracle/scls_scr/dbnode2/root ]# crsctl config crs
CRS-4621: Oracle High Availability Services autostart is disabled.
root [ /etc/oracle/scls_scr/dbnode2/root ]# ll
total 12
-rw-r--r-- 1 root root 7 Oct 27 2010 crsstart
-rw-r--r-- 1 root oinstall 8 Jan 30 2014 ohasdrun
-rw-r--r-- 1 root oinstall 7 Oct 27 2010 ohasdstr
root [ /etc/oracle/scls_scr/dbnode2/root ]# more ohasdstr
disable
root [ /etc/oracle/scls_scr/dbnode2/root ]# crsctl config crs
CRS-4621: Oracle High Availability Services autostart is disabled.
- Stop the instance running on dbnode2 (as user oracle)
oracle [ ~ ]$ srvctl stop instance -d PRODDB -i PRODDB2 -o immediate
- Stop CRS on dbnode2. During this command CRS will start several resources (SCAN-Listener, etc) on dbnode1.
root [ ~ ]# . oraenv
ORACLE_SID = [root] ? +ASM2
The Oracle base has been set to /u01/app/oracle
root [ ~ ]# crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'dbnode2'
CRS-2673: Attempting to stop 'ora.crsd' on 'dbnode2'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'dbnode2'
...
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'dbnode2' has completed
...
CRS-2673: Attempting to stop 'ora.gpnpd' on 'dbnode2'
CRS-2677: Stop of 'ora.diskmon' on 'dbnode2' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'dbnode2' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'db node2' has completed
CRS-4133: Oracle High Availability Services has been stopped.
ORACLE_SID = [root] ? +ASM2
The Oracle base has been set to /u01/app/oracle
root [ ~ ]# crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'dbnode2'
CRS-2673: Attempting to stop 'ora.crsd' on 'dbnode2'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'dbnode2'
...
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'dbnode2' has completed
...
CRS-2673: Attempting to stop 'ora.gpnpd' on 'dbnode2'
CRS-2677: Stop of 'ora.diskmon' on 'dbnode2' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'dbnode2' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'db node2' has completed
CRS-4133: Oracle High Availability Services has been stopped.
- Now the server can be rebooted