OCR And Voting Disk In Oracle 10gR2 Clusterware (RAC) [ID 1092293.1]

rongshiyuan發表於2012-11-20
  Information On OCR And Voting Disk In Oracle 10gR2 Clusterware (RAC) [ID 1092293.1]

In this Document

Goal
Fix
  1. Storage options
  2. Storage requirement
  3. Ownership and Permissions
  4. Configuration commands
  5. Querying OCR and Voting Disks
  6. Adding and removing Voting Disks
  7. Backup and Recovery of OCR and Voting Disk
  8. Backup of OCR files
  9. Restoring the OCR file
  Scalability RAC Community

Applies to:

Oracle Server - Enterprise Edition - Version 10.2.0.1 to 11.1.0.7 [Release 10.2 to 11.1]
Information in this document applies to any platform.

Goal

This document provides complete information about OCR and Voting disks for Oracle 10gR2 clusterware.

Fix

1. Storage options

Common for all platforms

Storage OCR and Voting Disk
Local File System No
ASM No



Linux

Storage OCR and Voting Disk
OCFS Yes
OCFS2 Yes
GPFS (for Linux on POWER) Yes
NFS file system (Requires a certified NAS device) Yes
Shared raw partitions Yes
Block devices (IBM zSeries based systems only) Yes


HP Tru 64

Storage OCR and Voting Disk
Cluster File System with TruCluster v.5.1B Yes
Logical Storage Manager with TruCluster v. 5.1B Voting Disk only
Shared raw partitions Voting Disk Only


HP UX and Solaris

Storage OCR and Voting Disk
NFS file system
Note: Requires a certified NAS device
Yes
Shared raw partitions Yes


AIX

Storage OCR and Voting Disk
General Parallel File System (GPFS) Yes
Raw Logical Volumes Managed by HACMP Yes


Windows

Storage OCR and Voting Disk
Cluster file system (OCFS) Yes
Shared raw storage Yes

 

2. Storage requirement

OCR              : 256 MB each
Voting Disk    : 20   MB each

3. Ownership and Permissions

# OCR
root:oinstall:0640

# Voting Disks
crs:oinstall:0640

 

Here the "crs" is the owner of the clusterware installation. In most cases "oracle" is used for both clusterware and Oracle RAC s/w installation.

 

4. Configuration commands

ocrconfig : Use the ocrconfig command to perform. OCR Configuration Tool operations with administrative privileges on UNIX-based systems or as a user with Administrator privileges on Windows-based systems.

ocrconfig - Description
-backuploc To change an OCR backup file location. For this entry, use a full path that is accessible by all of the nodes.
-downgrade To downgrade an OCR to an earlier version.
-export To export the contents of an OCR into a target file.
-help To display help for the ocrconfig commands.
-import To import the OCR contents from a previously exported OCR file.
-overwrite To update an OCR configuration that is recorded on the OCR with the current OCR configuration information that is found on the node from which you are running this command.
-repair To update an OCR configuration on the node from which you are running this command with the new configuration information specified by this command.
-replace To add, replace, or remove an OCR location.
-restore To restore an OCR from an automatically created OCR backup file.
-showbackup To display the location, timestamp, and the originating node name of the backup files that Oracle created in the past 4 hours, 8 hours, 12 hours, and in the last day and week. You do not have to be the root user to execute the -showbackup option.
-upgrade To upgrade an OCR to a later version.

 

5. Querying OCR and Voting Disks

a. To check the location of existing OCR files and their health:

$ORA_CRS_HOME/bin/ocrcheck


b. To dump the contents of the OCR file use following command:

$ORA_CRS_HOME/bin/ocrdump MYFILE

The above command writes the OCR content to a file called MYFILE in the current directory.

c. To check the location of the voting disks:

$ORA_CRS_HOME/bin/crsctl query css votedisk

 

6. Adding and removing Voting Disks

You can add and remove voting disks after installing Oracle Real Application Clusters. Do this using the following commands where path is the fully qualified path for the additional voting disk. Run the following command as the root user to add a voting disk:

crsctl add css votedisk path


Run the following command as the root user to remove a voting disk:

crsctl delete css votedisk path

 

7. Backup and Recovery of OCR and Voting Disk

Backing up Voting disk:

dd if=voting_disk_name f=backup_file_name

 

You can use the ocopy command in Windows environments or use the crsctl commands.


Recovering the Voting disk:

dd if=backup_file_name f=voting_disk_name

 

8. Backup of OCR files

The Oracle Clusterware automatically creates OCR backups every four hours. At any one time, Oracle always retains the last three backup copies of the OCR. The CRSD process that creates the backups also creates and retains an OCR backup for each full day and at the end of each week.

You cannot customize the backup frequencies or the number of files that Oracle retains. You can use any backup software to copy the automatically generated backup files at least once daily to a different device from where the primary OCR resides.

The default location for generating backups on UNIX-based systems is CRS_home/cdata/cluster_name where cluster_name is the name of your cluster. The Windows-based default location for generating backups uses the same path structure.

9. Restoring the OCR file

Unix:

1. Identify the OCR backups using the ocrconfig -showbackup command. Review the contents of the backup using ocrdump -backupfile file_name where file_name is the name of the backup file.

2. Stop Oracle Clusterware on all the nodes in your Oracle RAC cluster by running the following command as root:
# crsctl stop crs
Repeat this command on each node in your Oracle RAC cluster.

3. Perform. the restore by applying an OCR backup file that you identified in Step 1 using the following command where file_name is the name of the OCR that you want to restore. Make sure that the OCR devices that you specify in the OCR configuration exist and that these OCR devices are valid before running this command.

# ocrconfig -restore file_name

4. Start Oracle Clusterware on all the nodes in your Oracle RAC cluster by running the following command as root:

# crsctl start crs
Repeat this command on each node in your Oracle RAC cluster.

5. Run the following command to verify the OCR integrity where the -n all argument retrieves a listing of all of the cluster nodes that are configured as part of your cluster:

# cluvfy comp ocr -n all [-verbose]


Windows:

1. Identify the OCR backups using the ocrconfig -showbackup command. Review the contents of the backup using ocrdump -backupfile file_name where file_name is the name of the backup file.

2. On all of the remaining nodes, disable the following OCR clients and stop them using the Service Control Panel: OracleClusterVolumeService, OracleCSService, OracleCRService, and the OracleEVMService.

3.Execute the restore by applying an OCR backup file that you identified in Step 1 with the ocrconfig -restore file name command. Make sure that the OCR devices that you specify in the OCR configuration exist and that these OCR devices are valid.

4.Start all of the services that were stopped in step 2. Restart all of the nodes and resume operations in cluster mode.

5. Run the following command to verify the OCR integrity where the -n all argument retrieves a listing of all of the cluster nodes that are configured as part of your cluster:

cluvfy comp ocr -n all [-verbose]

 

Scalability RAC Community

To discuss this topic further with Oracle experts and industry peers, we encourage you to review, join or start a discussion in the My Oracle Support Scalability RAC Community.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17252115/viewspace-749517/,如需轉載,請註明出處,否則將追究法律責任。

相關文章