Friday, April 27, 2012

Voting disk and OCR Management


Voting disk and OCR Management

The recommendations for the addition or removal of a voting disk is shutdown Oracle Clusterware first on all nodes and then utilize the commands below as root user were path is completely qualified path for the additional voting disk. In case of new voting disk over the network file system NFS, create an empty voting disk file location with the correct owner and permissions before execute the commands mentioned below. Three extra raw devices partitions /dev/raw/raw3, /dev/raw/raw4, /dev/raw/raw5 have been created to practice following exercises:

$ crsctl query css votedisk
on Node1
$ crsctl stop crs
on Node2
$crsctl stop crs

$crsctl add css votedisk /dev/raw/raw3 force

after successful addition of votedisk

Node1
$crsctl start crs

Node2
$crsctl start crs

$crsctl query css votedisk
[oracle@crs1 ~]$ crsctl query css votedisk
 0.     0    /dev/raw/raw2
 1.     0    /dev/raw/raw3

located 2 votedisk(s).

---deleting a votedisk
# crsctl delete css votedisk path

-- backup and recovery of votedisk
dd if=voting_disk_name of=backup_file_name

dd if=/dev/raw/raw2 of=/home/oracle/backup/votedisk1

recovering votedisk

dd if=backup_filename of=voting_disk_name

--administering Oracle Cluster registry

OCR file location is in following file

Solaris /var/opt/oracle.ocr.loc
Linux /etc/oracle/ocr.loc

If ocr files resides on a cluster file system file or if the ocr is on network file system, then create the target OCR file before adding OCR.

Use OCRCHECK utility to verify ocr integrity

It will display
- the version of the OCR's block format
- total space used and available
- OCRID
- and OCR locations that have been configured

A block by block checksum operation for all the blocks in all the configured OCRs is performed by OCRCHECK. It also returns an individual status for each file as well as a result OCR integrity check


[oracle@crs1 ~]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     524184
         Used space (kbytes)      :       4592
         Available space (kbytes) :     519592
         ID                       : 1059761621
         Device/File Name         : /dev/raw/raw1
                                    Device/File integrity check succeeded

                                    Device/File not configured

         Cluster registry integrity check succeeded


OCRCHECK also create a log file in CRS_HOME/log/hostname/client.
to change amoun of logging edit the CRS_HOME/srvm/admin/ocrlog.ini

-- Run the following command to add OCR mirror location using either destination_file or disk to designate the target location of the additional OCR

-- First make sure that proper backup of OCR is available --

#ocrconfig -showbackup

#ocrconfig -replace ocr destination_file or disk
#ocrconfig -replace ocrmirror destination_file or disk

First select the raw device

If your OCR configuration were altered while a particular node is stopped, you would be required to repair OCR configuration on that particular node, for instance, there may be need to repair the OCR on a node that was not up at the time of removing, replacing or adding an OCR.
For repairing an OCR configuration, run the following command on the node on which Oracle Clusterware daemon was stopped.

#ocrconfig -repaire ocrmirror device_name



No comments:

Post a Comment