Find OCR Master Node

How to Find OCR Master Node ?

There is only a single OCR master node at any time for the whole cluster: The related crsd.log file should have an entry like:

$ ./get_ocr_master_node.csh hrac1 hrac2
-> OCR Master log entry at hrac1 :
  /u01/app/11203/grid/log/hrac1/crsd/crsd.log:2013-06-29 12:27:22.228: 
  [  OCRMAS][3129542400]th_master:12: I AM THE NEW OCR MASTER at incar 1. Node Number 1
-> OCR Master log entry at hrac2 :
  /u01/app/11203/grid/log/hrac2/crsd/crsd.log:2013-06-29 12:38:22.814: 
  [  OCRMAS][333440768]th_master: NEW OCR MASTER IS 1

 

If you have cross NFS mounted  the cluster logfile directories you can use the following csh script to get the required info:

 Script

#! /bin/csh
set cnt =  $#argv
if ($cnt <1 ) then
  echo "Usage: $0 cluster_node1 [cluster_node2] "
  echo "Error: You entered $cnt arguments"
  exit -1 
endif

foreach HOST ($argv)
   echo "-> OCR Master log entry at Node $HOST :"
   grep "OCR MASTER" $GRID_HOME/log/$HOST/crsd/crsd.l*  | tail -n 1  
end

 

Reference

  • For further info please read Oracle Note:   [ID 1281982.1]

Leave a Reply

Your email address will not be published. Required fields are marked *