DOYENSYS Knowledge Portal




We Welcome you to visit our DOYENSYS KNOWLEDGE PORTAL : Doyensys Knowledge Portal




Monday, October 3, 2016

To check the master node in RAC environment


In 3 node  RAC setup,In initial stage--node 3 is the master node.


[oracle@host01 ~]$ cat $ORACLE_HOME/log/host01/cssd/ocssd.log |grep ‘master node’ |tail -1
2016-09-24 10:14:36.949: [    CSSD][2778696592]clssgmCMReconfig: reconfiguration successful, incarnation 248954981 with 3 nodes, local node number 1, master node number 3

[root@host02 cssd]# cat $ORACLE_HOME/log/host02/cssd/ocssd.log |grep ‘master node’ |tail -1
2016-09-24 10:14:36.953: [    CSSD][778696592]clssgmCMReconfig: reconfiguration successful, incarnation 248954981 with 3 nodes, local node number 2, master node number 3

[root@host03 ~]# cat $ORACLE_HOME/log/host03/cssd/ocssd.log |grep ‘master node’ |tail -1
2016-09-24 10:14:37.001: [    CSSD][778700688]clssgmCMReconfig: reconfiguration successful, incarnation 248954981 with 3 nodes, local node number 3, master node number 3

If I take the OCR backup right now, it will be taken by node3 (master node).

 [root@host02 cssd]# ocrconfig -manualbackup

HOST3

2016/09/24 09:54:48    /u01/app/11.2.0/oracle/cdata/cluster01/backup_095448.ocr

Let us check crsd logs of various nodes, looking for the string OCR MASTER.Note that node3 is the master node presently.
[oracle@host01 crsd]$ cat /u01/app/11.2.0/oracle/log/host01/crsd/crsd.log |grep ‘OCR MASTER’ | tail -1

2016-09-24 10:15:01.403: [  OCRMAS][2877356944]th_master: NEW OCR MASTER IS 3

[root@host02 crsd]# cat /u01/app/11.2.0/oracle/log/host02/crsd/crsd.log |grep ‘OCR MASTER’ | tail -1

2016-09-24 10:15:03.561: [  OCRMAS][876976016]th_master: NEW OCR MASTER IS 3

[root@host03 crsd]#  cat /u01/app/11.2.0/oracle/log/host03/crsd/crsd.log |grep ‘OCR MASTER’ | tail -3

2016/09/24 10:11:18.499: [  OCRMAS][877467536]th_master:13I AM THE NEW OCR MASTER at incar 44. Node Number 3

Let me reboot node3 and check which node is assigned the master node now.

[root@host03 ~]# init 6
check the ocssd logs on the remaining two nodes (node1 and node2) for the string ‘master node’ and note that node 1 is the master node.

[oracle@host01 root]$ cat $ORACLE_HOME/log/host01/cssd/ocssd.log |grep ‘master node’ |tail -1

2016/09/24 10:09:23.522: [    CSSD][2778696592]clssgmCMReconfig: reconfiguration successful, incarnation 248954982 with 2 nodes, local node number 1, master node number 1

[root@host02 cssd]# cat $ORACLE_HOME/log/host02/cssd/ocssd.log |grep ‘master node’ |tail -1

2016/09/24 10:09:23.502: [    CSSD][778696592]clssgmCMReconfig: reconfiguration successful, incarnation 248954982 with 2 nodes, local node number 2master node number 1

As can be seen from ocssd logs of the remaining two nodes, node1 has become the master now.

Now If I take the OCR backup, it is taken by node1 while earlier backups were taken by node3 which was the then master.

[root@host02 cssd]# ocrconfig -showbackup

host03   2016/09/24 09:54:48    /u01/app/11.2.0/oracle/cdata/cluster01/backup_095448.ocr

[root@host02 cssd]# ocrconfig -manualbackup

host01  2016/09/24 10:12:29  /u01/app/11.2.0/oracle/cdata/cluster01/backup_101229.ocr 

host03   2016/09/24 09:54:48 /u01/app/11.2.0/oracle/cdata/cluster01/backup_095448.ocr

Let us check crsd logs of various nodes, looking for the string OCR MASTER

[oracle@host01 crsd]$ cat /u01/app/11.2.0/oracle/log/host01/crsd/crsd.log |grep ‘OCR MASTER’ | tail -1

2016-09-24 10:08:45.884: [  OCRMAS][877356944]th_master:13:  NEW OCR MASTER IS 1

[root@host02 crsd]# cat /u01/app/11.2.0/oracle/log/host02/crsd/crsd.log |grep ‘OCR MASTER’ | tail -1
2016-09-24 10:08:45.364: [  OCRMAS][876976016]th_master: NEW OCR MASTER IS 1

[root@host03 crsd]#  cat /u01/app/11.2.0/oracle/log/host03/crsd/crsd.log |grep ‘OCR MASTER’ | tail -1
2016-09-24 10:12:20.282: [  OCRMAS][877422480]th_master: NEW OCR MASTER IS 1



1 comment:

Sridevi Koduru (Oracleappstechnical.com) said...

Regards
Sridevi Koduru (Senior Oracle Apps Trainer Oracleappstechnical.com)
LinkedIn profile - https://in.linkedin.com/in/sridevi-koduru-9b876a8b
Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, SQL, PL/SQL, D2K at training@oracleappstechnical.com | +91 - 9581017828.