Thursday, February 11, 2010

Finding CRS Master Node

As Metalink Document 220970.1(RAC: Frequently Asked Questions) states:
"For the cluster synchronization service (CSS), the master can be found by searching $ORACLE_HOME/log/cssd/ocssd.log" Where ORACLE_HOME is the CRS Home.

e.g
Use olsnodes -n to find out the node numbers:

nodea 1
nodeb 2
nodec 3

Then on the directory mentioned check for each node the latest entry :
e.g from nodec (3)
grep MASTER ocsdd.log
ocssd.log:[ CSSD]2010-02-05 03:26:03.320 [3861] >TRACE: clssgmEstablishMasterNode: MASTER for 63 is node(2) birth(58)

This tell as that for incarnation 63 the master node is 2

But is this the last incarnation ??? You must also check the other nodes to see.

For more accurate information (always combined with the previous method) check the crsd.log

cd $ORACLE_HOME/log/crsd/crsd.log

2010-02-05 02:32:32.139: [ OCRMAS][3348]th_master:13: I AM THE NEW OCR MASTER at incar 67. Node Number 3

This means that we had another incarnation and the master node is 2.

Confusing a little beat. This is happening because the logs rotate or are write in a matter of events happening between the nodes.

So for my opinion please check the crsd.log from each node and the master is the one in the latest incarnation.

e.g

From node1 crsd.log :
2010-02-02 13:05:44.424: [ OCRMAS][3348]th_master:13: I AM THE NEW OCR MASTER at incar 62. Node Number 1

From node2 crsd.log :
2010-01-18 09:58:19.932: [ OCRMAS][3352]th_master:13: I AM THE NEW OCR MASTER at incar 53. Node Number 2

From node3 crsd.log :
2010-02-05 02:32:32.139: [ OCRMAS][3348]th_master:13: I AM THE NEW OCR MASTER at incar 67. Node Number 3

So the master node is 3 !!!

You can also check with :

ocrconfig -showbackup

where the latest backup is, that's the master node. But remember that by default ocrbackups are taken every 4 hours.

Friday, February 5, 2010

Collecting CRS diagnostic files 1OgR2

In order to collect all crs all at once ou can run the following command :

As root :

diagcollection.pl --collect --crs --crshome [$ORA_CRS_HOME]

e.g

diagcollection.pl --collect --crs --crshome /u01/app/oracle/product/crs