Skip to content

Voting Disk in Oracle RAC

    Voting Disk files are files that Oracle Clusterware uses to verify cluster node

    Voting Disk File contains 2 types of data

    • Static data: Information about the nodes in cluster
    • Dynamic data: Disk heartbeat logging

    Why should we have ODD number of Voting Disk?

    A node must be able to access more than half of the voting disks at any time.

    Scenario:

    Let us consider 2 node clusters with even number of voting disks say 2.

    • Let node 1 is able to access voting disk 1.
    • Node 2 is able to access voting disk 2.
    • From the above steps, we see that we don’t have any common file where clusterware can check the heartbeat of both the nodes.
    • If we have 3 voting disks and both the nodes are able to access more than half ie., 2 voting disks, there will be atleast one disk which will be accessed by both the nodes. The clusterware can use this disk to check the heartbeat of the nodes.
    • A node not able to do so will be evicted from the cluster by another node that has more than half the voting disks to maintain the integrity of the cluster.

    Oracle recommends that you configure multiple voting disks during Oracle Clusterware installation to improve availability. If you choose to put the voting disks into an Oracle ASM disk group, then Oracle ASM ensures the configuration of multiple voting disks if you use a normal or high redundancy disk group.

    External redundancy = 1 Voting disk
    Normal redundancy = 3 Voting disks
    High redundancy =      5 Voting disks

    You can have up to 32 voting disks in your cluster

    Although the Voting disk contents are not changed frequently, you will need to back up the Voting disk file every time
    • You add or remove a node from the cluster or
    • Immediately after you configure or upgrade a cluster.

    Identify the voting disk location :

    $ crsctl query css votedisk
    --  -----    -----------------                --------- ---------
    ##  STATE    File Universal Id                File Name Disk group
     1. ONLINE   6f57843d89464c46ea747362e8a3fa43 (/dev/sdb1) [DATA]
     2. ONLINE   7c54856e98474f61bf349401e7c9fb95 (/dev/sdc1) [DATA]
     3. ONLINE   9c46232b76234f61fc934673d5c8ec59 (/dev/sdd1) [DATA]

    Backup the voting disk:

    Voting Disks
    In 11g release 2 you no longer have to take voting disks backup. In fact according 
    to Oracle documentation restoration of voting disks that were copied using the 
    "dd" or "cp" command may prevent your clusterware from starting up.
    So, In 11g Release 2 your voting disk data is automatically backed up in 
    the OCR whenever there is a configuration change.
    Also the data is automatically restored to any voting that is added.
    
    OCR BACKUP
    Automatic backups : -
    a) Oracle Clusterware (CRSD) automatically creates OCR backups every 4 hours.
    b) A backup is created for each full day.
    c) A backup is created at the end of each week.
    d) Oracle Database retains the last three copies of OCR.
    
    Manual backups: -
    a) can be taken using the "ocrconfig -manualbackup" command
    
    Example:
    $ocrconfig -manualbackup

    Run the following command to list the backup files:

    ocrconfig -showbackup

    Run the following command to inspect the contents and verify the integrity of the backup file:

    ocrdump -backupfile backup_file_name

    Run the following command to change the location where OCR creates backups:

    # ocrconfig -backuploc file_name
    For example, to specify an OCR backup location in a directory:
    # ocrconfig -backuploc Grid_home/cdata/cluster3

    Also See:

    Oracle Cluster Registry

    Managing Oracle Cluster Registry and Voting Files