How To Move - Add - Replace - Delete OCR and Voting Disk
How To Move - Add - Replace - Delete OCR and Voting Disk
Purpose
To provide step to add, remove, replace or move an OCR or voting disk in Oracle
Real Application Clusters (RAC) 10g Realese 2 (10.2.0.1 and later)
environments.
It is highly recommended to take a backup of the voting disk, and OCR device
before making any changes.
Examples are included at the end of OCR and voting disk command.
Make sure there is a recent copy of the OCR file before making any changes:
ocrconfig –showbackup
If there is not a recent backup copy of the OCR file, an export can be taken
for the current OCR file. Use the following command to generate a an export of
the online OCR file:
ocrconfig –export <OCR export_filename> -s online
If you need to recover using this file, the following command can be used:
ocrconfig import <OCR export_filename>
To add an OCR device, provide the full path including file name.
ocrconfig -replace ocr <filename>
To add an OCR mirror device, provide the full path including file name.
ocrconfig -replace ocrmirror <filename>
To replace the OCR device with <filename>, provide the full path including file
name.
ocrconfig -replace ocr <filename>
To replace the OCR mirror device with <filename>, provide the full path
including file name.
ocrconfig -replace ocrmirror <filename>
The OCR disk must be owned by root, must be in the oinstall group, and must
have permissions set to 640. Provide at least 100 MB disk space for the OCR.
In this example the OCR file are located in the ocfs2 file system:
/ocfs2/ocr1
/ocfs2/ocr2
Create raw device files of at least 100 MB. In this example the new OCR file
will be on the following devices:
/dev/raw/raw1
/dev/raw/raw2
Once the raw devices are created, use the dd command to zero out the device and
make sure no data is written to the raw devices:
dd if=/dev/zero of=/dev/raw/raw1
dd if=/dev/zero of=/dev/raw/raw2
Note: Use UNIX man pages for additional information on the dd command.
Now you are ready to move/replace the OCR file to the new storage location.
If you have upgraded your environment from a previous version, where you only
had 1 OCR device file, you can use the following step to add an additional OCR
file.
Note: Use UNIX man pages for additional information on the dd command.
The following can be used to restore the voting disk from the backup file
created.
dd if=backup_file_name of=voting_disk_name
1. To add a Voting Disk, provide the full path including file name.:
crsctl add votedisk css <RAW_LOCATION> -force
2. To delete a Voting Disk, provide the full path including file name.:
crsctl delete votedisk css <RAW_LOCATION> -force
3. To move a Voting Disk, provide the full path including file name.:
crsctl delete votedisk css <OLD_LOCATION> –force
crsctl add votedisk css <NEW_LOCATION> –force
After modifying the voting disk, start the Oracle Clusterware stack on all nodes
crsctl start crs
The voting disk is a partition that Oracle Clusterware uses to verify cluster
node membership and status.
The voting disk must be owned by the oracle user, must be in the dba
group, and must have permissions set to 644. Provide at least 20 MB disk
space for the voting disk.
In this example the Voting Disks are located in the ocfs2 file system:
/ocfs2/voting1
/ocfs2/voting2
/ocfs2/voting3
Create raw device files of at least 20 MB. In this example the new voting
disks will be on the following devices:
/dev/raw/raw3
/dev/raw/raw4
/dev/raw/raw5
Once the raw devices are created, use the dd command to zero out the device and
make sure no data is written to the raw devices:
dd if=/dev/zero of=/dev/raw/raw3
dd if=/dev/zero of=/dev/raw/raw4
dd if=/dev/zero of=/dev/raw/raw5
Note: Use UNIX man pages for additional information on the dd command.
Now you are ready to move/replace the voting disks to the new storage location.
If you have upgraded your environment from a previous version, where you only
had 1 voting disk, you can use the following steps to add additional voting
disk.
After modifying the voting disk, start the Oracle Clusterware stack on all nodes
crsctl start crs