Find the master node in the cluster oracle rac
Find the master node in the cluster :
Master node has the least Node-id in the cluster. Node-ids are assigned to the nodes in the same order as the nodes join the cluster. Hence, normally the node which joins the cluster first is the master node.
To find the nodes and their id’s we use the below commands
[root@node1 bin]# olsnodes -n
node1 1
We have three ways to find the master node in the cluster.
1) Check the cssd logs
[oracle@node1 cssd]$ pwd
/u01/upg_11.2.0.3/log/node1/cssd
[oracle@node1 cssd]$ grep ‘master node’ ocssd.log
2014-07-05 20:44:14.553: [ CSSD][1075800384]clssgmCMReconfig: reconfiguration successful, incarnation 293371007
with 1 nodes, local node number 1, master node number 1
local node number means from where we are checking.
2) Check the crsd logs
[oracle@node1 crsd]$ pwd
/u01/upg_11.2.0.3/log/node1/crsd
grep -i ‘master’ crsd.log
2014-07-05 20:45:04.415: [UiServer][1182443840] {1:57526:2} Master change notification has received. New master: 1
3) Master node is responsible for the backup of OCR.
According to backup policy the crsd process on the master node is responsible for the backup.
ocrconfig -backuploc — this is used to tell the location for the manual backups. the location should be avilable on all the nodes in cluster.
When we take any manual backup using the below command
[root@node1 bin]# ocrconfig -manualbackup
node1 2014/07/17 11:23:26 /u01/upg_11.2.0.3/cdata/oguri/backup_20140717_112326.ocr
It took the backup using the “node1” because that is masternode.