OCR and Voting Disks

posted Aug 6, 2011, 4:33 PM by Sachchida Ojha

Oracle Cluster Registry (OCR)—Maintains cluster configuration information as well as configuration information about any cluster database within the cluster. The OCR also manages information about processes that Oracle Clusterware controls. The OCR stores configuration information in a series of key-value pairs within a directory tree structure. The OCR must reside on shared disk that is accessible by all of the nodes in your cluster. The Oracle Clusterware can multiplex the OCR and Oracle recommends that you use this feature to ensure cluster high availability. You can replace a failed OCR online, and you can update the OCR through supported APIs such as Enterprise Manager, the Server Control Utility (SRVCTL), or the Database Configuration Assistant (DBCA).

  1. The OCR is the CLUSTER REGISTRY and holds information related to Resources that are part of the Cluster.
  2. OCR backup is necessary after any node/service/resource is added/altered/deleted from the cluster.
  3. If you do "ocrdump -stdout" you will see its contents. You have permissions/services definitions etc there. Thats why you should backup ocr every time something changes in your cluster config.

get information about OCR use command in CRS_HOME/bin PATH
$ ocrdump /tmp/a

check /tmp/a file.

Or just check ocr
$ ocrcheck

If you need to get information about resources.., by "crs_stat" at CRS_HOME/bin PATH

$ crs_stat
$ crs_stat -t

Voting disk:

Voting Disk—Manages cluster membership by way of a health check and arbitrates cluster ownership among the instances in case of network failures. Oracle RAC uses the voting disk to determine which instances are members of a cluster. The voting disk must reside on shared disk. For high availability, Oracle recommends that you have multiple voting disks. The Oracle Clusterware enables multiple voting disks but you must have an odd number of voting disks, such as three, five, and so on. If you define a single voting disk, then you should use external mirroring to provide redundancy.

If you had any even numbers of voting disk ( say 2 ) and a 2 node cluster ... what happens if one voting disk has a vote for node1 and the other for node 2? Voting disks among other things can lead to a rac node getting evicted ( thrown out ) of a rac cluster.

Voting disk keeps track of the RESOURCES that are available, active and is polled dynamically when Cluster Service is running. Voting disks contains cluster nodes info. They are used by clusterware to acts a tiebreaker during communication failures. In case of split-brain voting disks are used to decide which part of cluster should be evicted. Thats why you only need to backup voting disks when you add/remove nodes.

VOTE : use command-line in CRS_HOME/bin PATH

$ olsnodes -n -v

check vote configure:
$ crsctl query css votedisk