Thursday, June 29, 2023

RAC Comp:OLR, GPnP, OCR and Voting Disk

OLR (oracle local registry)

we know that OCR needs to be accessible by Clusterware to know which resources to be started on a node, but as from 11gr2, Oracle has given the luxury to store OCR in ASM how does Clusterware accesses this information while ASM (which itself is a resource for the node) is Down, here comes the OLR. Since OLR is an locally available file on operating system there is no dependencies and this file could be read by any process with appropriate privileges.

The OLR file is present in $GRID_HOME/cdata/ directory. It is named as ‘<hostname>.olr’
The ohasd process get the location of OLR file from /etc/oracle/olr.loc and access the main OLR file and gets the below info which is stored in it:

I.        GPNP file details. It is present in $GRID_HOME/gpnp/<hostname>/profiles/peer
II.       OCR latest backup time and location.

III.        CRS_HOME
IV.        Active crs version.

V.        Local host name and crs version
VI.        Status of the resources to know which are to be started and which are to be kept OFFLINE.

VII.        Start and stop dependencies of the resouces i.e.

Hard Dependency means it must full-fill

Weak Dependency means it should full-fill.

Manage OLR using the OCRCHECK, OCRDUMP, and OCRCONFIG utilities as root with the -local option.

 

GPNP Profile
It stands for Grid Plug and Play Profile. The file is located in CRS_HOME/gpnp/<node_name>/profile/peer/profile.xml. And this profile consists of cluster name, hostname, network profiles with IP addresses, OCR. If we do any modifications for voting disk, profile will be updated.


OCR
Now the question that comes to our mind is if we have OLR then why do we need OCR, to explain this we compared the keys of OLR & OCR.

Comparing the OCR with the OLR reveals that the OLR has far fewer keys; for example, ocrdump reported 704 different keys for the OCR vs. 526 keys for the OLR on our installation. If you compare only the keys again, you will notice that the majority of keys in the OLR deal with the OHASD process, whereas the majority of keys in the OCR deal with the CRSD. This confirms that you need the OLR (along with the GPnP profile) to start the High Availability Services stack.


 cat /etc/oracle/ocr.loc

OCR administration

//Check OCR integrity with either ocrcheck or “cluvfy comp ocr” command:
./ocrcheck - cluster registry integrity check and OCR logical couuroriton check
 cluvfy comp ocr -n all


ocrconfig -showbackup

 

 

 

No comments:

Post a Comment