Oracle Local Registry (OLR) in RAC - 11gR2
In 11gR2, addition to OCR, we have another component
called OLR installed on each node in the cluster. It is a local registry for
node specific purposes. The OLR is not shared by other nodes in the cluster. It
is installed and configured when clusterware is installed.
Why OLR is used and why was it introduced.
In 10g, we cannot store OCR’s in ASM and hence to
startup the clusterware, oracle uses OCR but what happens when OCR is stored is
ASM in 11g.
OCR should be accessible to find out the resources
that need to be started or not. But, if OCR is on ASM, it can’t read until ASM
(which itself is the resource of the node and this information is stored in
OCR) is up.
To answer this, Oracle introduced a component
called OLR.
Ø It is the first fi
le used to startup the clusterware when
OCR is stored on ASM.
Ø Information about the
resources that needs to be started on a node is stored in an OS file called
ORACLE LOCAL REGISTRY (OLR).
Ø Since OLR is an OS file,
it can be accessed by various processes on the node for read/write irrespective
of the status of cluster (up/down).
Ø When a node joins the
cluster, OLR on that node is read, various resources, including ASM are started
on the node.
Ø Once ASM is up, OCR is
accessible and is used henceforth to manage all the cluster nodes. If OLR is missing or
corrupted, clusterware can’t be started on that node.
Where is OLR located
It is located $GRID_HOME/cdata/<hostname>.olr
. The location of OLR is stored in /etc/oracle/olr.loc and used by OHASD.
What does OLR contain
The OLR stores
· Clusterware version
info.
· Clusterware
configuration
· Configuration of various
resources which needs to be started on the node,etc.
To see the contents in the OLR file, we can use
following commands and see the resources.
[root@rac1 ~]# ocrconfig -local -manualbackup
host01 2014/03/16
01:20:27 /u01/app/grid/11.2.0.3/product/grid_1/cdata/rac1/backup_20140316_012027.olr
[root@rac1 ~]# strings
/u01/app/grid/11.2.0.3/product/grid_1/cdata/rac1/backup_20140316_012027.olr
|grep -v type |grep ora!
ora!drivers!acfs
ora!crsd
ora!asm
ora!evmd
ora!ctssd
ora!cssd
ora!cssdmonitor
ora!diskmon
ora!gpnpd
ora!gipcd
ora!mdnsd
OLR administration
Checking the status of the OLR file on each node.
$ ocrcheck –local
OCRDUMP is used to dump the contents of the OLR to
text terminal
$ocrdump –local –stdout
We can export and import the OLR file using
OCRCONFIG
$ocrconfig –local –export <export file
name>
$ocrconfig –local –import <file_name>
We can even the repair the OLR file if it corrupted.
$ocrconfig –local –repair –olr <filename>
OLR is backed up at the end of the installation or an
upgrade. After that time we need to manually backup the OLR. Automatic backups
are not supported for OLR.
$ocrconfig –local –manualbackup.
Viewing the contents of backup file
$ocrdump -local –backupfile
<olr_backup_file_name>
To change the OLR backup location
$ocrconfig –local –backuploc
<new_backup_location>
To restore OLR
$crsctl stop crs
$ocrconfig –local –restore_file_name
$ocrcheck –local
$crsctl start crs
$cluvfy comp olr -- to check the integrity
of the OLR file which was restored.
Comments
Post a Comment