Which node is the OCR master node (AKA “OCR writer”) in a RAC?

There are several ways to answer this question:

  • Look for “OCR master” in the log files of crsd and check olsnodes for the node ID
  • Check which node did the most recent automatic OCR backup

The latter, combined in one line, looks like:

ocrconfig -showbackup auto |head -2 |tail -1  |awk '{ print $1 }'

(OK, you have to be logged in so that you can run “$GRID_HOME/bin/ocrconfig”)

Pat 1 of the command lists all automatic backups (an automatic backup is executed every 4 hours on the OCR master).

Part 2 and 3 (head and tail) filter the output and condense it into one line.

Part 4 – awk – returns the node name.


This entry was posted in Common, RAC. Bookmark the permalink.