Function of OCR Master Node
OCR master is in charge of OCR update and is the only one that’s allowed to update, the post shows a way to find OCR master.
1. The default OCR master is always the first node that’s started in the cluster.
2. When OCR master (crsd.bin process) stops or restarts for whatever reason, the crsd.bin on surviving node with lowest node number will become new OCR master.
Finding OCR Master Node
The following method can be used to find OCR master:
1. By searching crsd.l* on all nodes:
grep "OCR MASTER" $ORA_CRS_HOME/log/$HOST/crsd/crsd.l* crsd.l01:2019-01-05 15:20:26.066: [ OCRMAS][1118370112]th_master: NEW OCR MASTER IS 1 crsd.l01:2019-01-11 09:35:41.843: [ OCRMAS][1113958720]th_master: NEW OCR MASTER IS 1 crsd.log:2019-01-26 09:27:56.960: [ OCRMAS][1119611200]th_master: NEW OCR MASTER IS 1 crsd.log:2019-01-26 15:07:27.486: [ OCRMAS][1119611200]th_master:13: I AM THE NEW OCR MASTER at incar 4. Node Number 2 crsd.log:2019-01-26 15:21:03.347: [ OCRMAS][1125996864]th_master: NEW OCR MASTER IS 1 crsd.log:2019-01-26 15:21:13.411: [ OCRMAS][1125996864]th_master:13: I AM THE NEW OCR MASTER at incar 8. Node Number 2
If there’s output, the last line will show who is OCR master. If the cluster has been up and running on all nodes for a long while, as crsd.log keeps rotating to crsd.l01, and crsd.l01 to crsd.l02 till crsd.l10, there’s a chance the above grep command will not return anything. If that’s the case, see Step 2.
2. By locating automatic OCR backup:
# ocrconfig -showbackup racnode1 2019/01/26 14:24:02 /ocrsh/cdata/gbrac/backup00.ocr racnode1 2019/01/26 10:24:01 /ocrsh/cdata/gbrac/backup01.ocr racnode1 2019/01/26 06:24:00 /ocrsh/cdata/gbrac/backup02.ocr racnode1 2019/01/25 02:23:49 /ocrsh/cdata/gbrac/day.ocr racnode1 2019/01/19 02:22:57 /ocrsh/cdata/gbrac/week.ocr
OCR automatic backup is done by OCR master every 4 hours. In above example, latest automatic backup was done around 2019/01/26 14:24:02 by racnode1 which means racnode1 was and may still be OCR master since 2019/01/26 14:24:02.