Pages

Tuesday, February 25, 2014

How to Recreate OCR/Voting Disk Accidentally Deleted


How to Recreate OCR/Voting Disk Accidentally Deleted (The note applies to 10gR2 and 11gR1)     

·         Shutdown the Oracle Clusterware stack on all the nodes using command crsctl stop crs as root user.

·         Backup the entire Oracle Clusterware home.

·         Execute <CRS_HOME>/install/rootdelete.sh on all nodes

·         Execute <CRS_HOME>/install/rootdeinstall.sh on the node which is supposed to be the first node

The following commands should return nothing

ps -e | grep -i 'ocs[s]d' 
ps -e | grep -i 'cr[s]d.bin' 
ps -e | grep -i 'ev[m]d.bin'     
                                  
·         Execute <CRS_HOME>/root.sh on first node

·         After successful root.sh execution on first node Execute root.sh on the rest of the nodes of the cluster

·         For 10gR2, use racgons; for 11g use onsconfig command. Using onsconfig stops and starts ONS so the changes take effect, while racgons doesn't do that so the changes won't take effect until ONS is restarted on all nodes. Examples for each are provided below.

For 10g : Execute as owner (generally oracle) of CRS_HOME command

<CRS_HOME>/bin/racgons add_config hostname1:port hostname2:port

For 11g : Execute as owner (generally oracle) of CRS_HOME command

<CRS_HOME>/install/onsconfig add_config hostname1:port hostname2:port


·         Execute as owner of CRS_HOME (generally oracle)  <CRS_HOME>/bin/oifcfg setif -global.

$ oifcfg setif -global  eth0/192.168.0.0:cluster_interconnect eth1/10.35.140.0:public

·         Add listener using netca. This may give errors if the listener.ora contains the entries already. If this is the case, move the listener.ora to /tmp from the $ORACLE_HOME/network/admin or from the $TNS_ADMIN directory if the TNS_ADMIN environmental is defined and then run netca. Add all the listeners that were added earlier.

·         Add ASM & database resource to the OCR using the appropriate srvctl add database command as the user who owns the ASM & database resource. Please ensure that this is not run as root user

·         Add  Instance, services using appropriate srvctl add commands. Please refer to the documentation for the exact commands.

No comments:

Post a Comment