-- Query current status of OCR and Voting Files:

oracle@server1:/> cat /etc/oracle/ocr.loc 

oracle@server1:/> crsctl query css votedisk
 0.     0    /dev/voting1_test11g
 1.     0    /dev/voting2_test11g
 2.     0    /dev/voting3_test11g
Located 3 voting disk(s).

-- Check OCR integrity with either ocrcheck or “cluvfy comp ocr” command:

oracle@server1:/> ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :    1048300
         Used space (kbytes)      :       4656
         Available space (kbytes) :    1043644
         ID                       :  182479978
         Device/File Name         : /dev/ocr1_test11g
                                    Device/File integrity check succeeded
         Device/File Name         : /dev/ocr2_test11g
                                    Device/File integrity check succeeded
         Cluster registry integrity check succeeded
         Logical corruption check bypassed due to non-privileged user

oracle@server1:/> cluvfy comp ocr -n db1,db2,db3 -verbose
Verifying OCR integrity 
Checking OCR integrity...
Checking the absence of a non-clustered configuration...
All nodes free of non-clustered, local-only configurations.
Uniqueness check for OCR device passed.
Checking the version of OCR...
OCR of correct Version "2" exists.
Checking data integrity of OCR...
Data integrity check for OCR passed.
OCR integrity check passed.
Verification of OCR integrity was successful. 

-- Prepare new raw devices with correct permissions:

root@server1:/dev> ls -al ocr*
crw-r-----    1 root     dba          36,463 Jan  7 13:26 ocr1_new11g    --> new file
crw-r-----    1 root     dba          36,129 Mar 29 2012  ocr1_test11g
crw-r-----    1 root     dba          36,460 Jan  7 13:26 ocr2_new11g         --> new file
crw-r-----    1 root     dba          36,155 Mar 29 2012  ocr2_test11g
root@server1:/dev> ls -al vot*  
crw-r-----    1 oracle   dba          36,462 Jan  7 13:26 voting1_11g         --> new file
crw-r-----    1 oracle   dba          36,128 Jan  5 19:00 voting1_test11g
crw-r-----    1 oracle   dba          36,461 Jan  7 13:26 voting2_11g         --> new file
crw-r-----    1 oracle   dba          36,133 Jan  5 19:00 voting2_test11g
crw-r-----    1 oracle   dba          36,464 Jan  7 13:26 voting3_11g         --> new file
crw-r-----    1 oracle   dba          36,130 Jan  5 19:00 voting3_test11g

-- Disable the database so it will not start after restarting CRS:

srvctl disable database -d TEST

-- Restart CRS with root user:

 /oracle/product/11.1.0/crs/bin/crsctl start crs  
 /oracle/product/11.1.0/crs/bin/crsctl stop crs  

-- Take backup of OCR with root user:

 /oracle/product/11.1.0/crs/bin/ocrconfig –manualbackup
You’ll find the backup file under CRS HOME:
ls -alrt /oracle/product/11.1.0/crs/cdata/server1_cluster/

-- Take a backup of voting files with dd command: 

 dd if=/dev/voting1_test11g of=/oracle/product/11.1.0/crs/cdata/server1_cluster/voting1_test_yedek bs=131072 count=4000

-- Replace OCR files with root user:

 /oracle/product/11.1.0/crs/bin/ocrconfig -replace ocr /dev/ocr1_11g
 /oracle/product/11.1.0/crs/bin/ocrconfig -replace ocrmirror /dev/ocr2_11g

-- Replace voting files with root user:

 /oracle/product/11.1.0/crs/bin/crsctl delete css votedisk /dev/voting1_test11g
 /oracle/product/11.1.0/crs/bin/crsctl add css votedisk /dev/voting1_11g
 /oracle/product/11.1.0/crs/bin/crsctl delete css votedisk /dev/voting2_test11g
 /oracle/product/11.1.0/crs/bin/crsctl add css votedisk /dev/voting2_11g
 /oracle/product/11.1.0/crs/bin/crsctl delete css votedisk /dev/voting3_test11g
 /oracle/product/11.1.0/crs/bin/crsctl add css votedisk /dev/voting3_11g

If you see the following error after “crsctl delete” command, you can use “-force” option and re-run the command.
 ** Failure 8 with Cluster Synchronization Services while deleting voting disk.

-- Control new raw devices are in use:

 cat /etc/oracle/ocr.loc 
 /oracle/product/11.1.0/crs/bin/cluvfy comp ocr -n db1adm,db2adm,db3adm -verbose
 /oracle/product/11.1.0/crs/bin/crsctl query css votedisk
 /oracle/product/11.1.0/crs/bin/crsctl check crs

3 Responses so far.

  1. Eva Lona says:

    You have a very good oracle blog.Thanks for sharing.

  2. Thanks for the statistics. i discovered your weblog very exciting ,our oracle hcm on line training provider won the excessive common call through worldwide for its training.
    Oracle fusion all modules education
    for more information please check the site
    oracle fusion training in hyderabad

DOAG 2016

Powered by Blogger.

Page Views

- Copyright © Emre Baransel - Oracle Blog -Metrominimalist- Powered by Blogger - Designed by Johanes Djogan -