I must thank my fellow DBA Franky Weber Faust for his publication in his blog.

Objective: Describe the advantages of separating OCR and RV and also present the process needed to do this.

NOTE: Although the procedure was performed in version 11gR2, the steps are the same for version 12c.

In this article, we will cover an advanced topic and to begin I will explain what OCR and Voting Disk are.

Oracle Clusterware has very important components, one manages the cluster configuration and the other manages the nodes that are part of the cluster.

The Oracle Cluster Registry, or OCR, is responsible for managing the configurations and features of Oracle Clusterware and Oracle RAC.We can also include the Oracle Local Registry (OLR) here, it resides on each cluster node and locally manages Oracle Clusterware configurations.

The Voting Disk is where you can store voting files of the cluster that manages information about the nodes that are part of the cluster. For a node to be a member of the cluster this node must have access to the voting files.

OCR and Voting Disk can be stored in Oracle ASM or in a shared Filesystem. The direction of Oracle is to use ASM for this.

Now we know what these components are, but we still do not know how they work.

OCR has the role of knowing the resources of the cluster, such as: ASM instances, database instances, diskgroups, SCAN Listeners, VIPs, Nodeapps, etc. It has the information of which feature is active or inactive, which nodes are in the cluster configuration. When a node is added or removed from the cluster it is in the OCR that this information gets recorded. It is the center of cluster information and must be in storage shared by all nodes, can have up to 4 mirrors, can be managed through the “ocrconfig”, “ocrdump” and “ocrcheck” utilities, it is preferable to use these as Root. OCR can be managed from any cluster node and its backups run automatically every 4 hours. Oracle Clusterware retains the last 3 backups plus the last daily and the last weekly. You can not change the hold or frequency of automatic backups, and these are always done physically. OCR backups can be run manually as physical or logical.

Basically, voting files are used so the cluster knows which nodes are available at any given time. All nodes in the cluster are recording every 5 seconds acknowledgment messages in the voting files to inform the cluster that they are available. If these messages are not written for 30 seconds (default time in Linux), the node that can not communicate is temporarily removed from the cluster until it communicates with the others. The voting disk, where the voting files are stored, is the center of the ping of nodes, it can have multiple mirrors and can also be managed from any cluster node. Voting disk backups are manual and should be included in your backup routines.Operations on the voting disk must be run as root. Up to version 11gR2 after any addition or removal of a node in the cluster a backup of the RV must be done. With the information of the VD Clusterware decides who is part of the cluster and manages the type of operation performed ( election / eviction / split brain ).

OCR and Voting Disk are essential components for running Oracle Clusterware. Without any of these, your entire cluster will stop working.During the process of installing and configuring the Grid Infrastructure, we have the option to choose only one disk-group to store the Clusterware information. This means that if we lose this diskgroup, we will lose both OCR and Voting Disk. The process to recover each one is different, so if we can simplify it means that we will have a faster recovery, therefore less downtime. The process outlined here shows how to separate OCR and Voting Disk into different disk groups .

So that we can separate them into distinct diskgroups we will initially have OCR and VD in a single diskgroup , since we have no other option during Grid Infrastructure installation. Let’s check the current layout then.

We can see that the VD and OCR are stored in the disk-group CONFIG.
Let’s add new disks so we can create the new disk-groups.

Figure 1. Add a new disk in the SATA controller

Figure 2 – Select the desired format

Figure 3 – Choose “Fixed Size” to create the fixed size disk

Figure 4 – Define a name and location to store your disk. 1 GB is sufficient for this exercise

Figure 5 – Repeat the same process for the other disks. Create vd2.vdi, vd3.vdi, ocr1.vdi, ocr2.vdi, and ocr3.vdi

Figure 6 – After creating the rest of the disks, open the “Virtual Media Manager” or “Virtual Media Manager”

Figure 7 – Select one of the created disks and click on “Modify”

Figure 8 – Set the disk to “Shareable”

Repeat the procedure for all other newly created disks: ocr2.vdi, oc3.vdi, vd1.vdi, vd2.vdi, and vd3.vdi.

Figure 9 – After changing the disks, add them to the other node of your cluster

Figure 10 – Choose “Choose existing disk”

Figure 11 – Choose the disc

Figure 12 – Repeat the procedure for the other disks: vd2.vdi, vd3.vdi, ocr1.vdi, ocr2.vdi and ocr3.vdi

Start only one of the nodes , because we will partition them and then configure them in ASM.

The command listed all disks present on the node . Let’s partition only those that are not partitioned.

Do the same for others.
After you finish, run the “fdisk -l” command again to see if all the disks are partitioned.
Now let’s create the disks in ASM.

Start the other node and verify that ASM has identified the disks.

Let’s now check the path of the disks and create the OCR and VD diskgroups .

Observer that the created diskgroups are running only on the node where we created them. Start and enable the newly created diskgroupson the other node .

Change the compatible attributes of diskgroups .

Let’s check the current Voting Disk situation.

Replace the current Voting Disk location with the VD diskgroup we created.

Now we have Voting Disk in your exclusive diskgroup. Let’s do the procedure to leave the OCR in the same situation.

If we wanted to improve redundancy we could keep diskgroup CONFIG.
As a good practice, use ASM and storage redundancy for OCR and VD.

About The Author

Comments

Leave a Reply