How To Change the location of OCR in 10gR2 Oracle RAC
Posted by apunhiran on April 15, 2008
OCR:
1.) Login as root.
2.) Start CRS on all nodes:
root@oracle-server:/home/crs/bin[bin]# ./crsctl start crs
Attempting to start CRS stack
The CRS stack will be started shortly
root@oracle-server:/home/crs/bin[bin]# ./crsctl check crs
Failure 1 contacting CSS daemon
Cannot communicate with CRS
Cannot communicate with EVM
root@oracle-server:/home/crs/bin[bin]# ./crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy
3.) Check OCR configuration/backups:
root@oracle-server:/home/crs/bin[bin]# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 262144
Used space (kbytes) : 2812
Available space (kbytes) : 259332
ID : 429958626
Device/File Name : /mnt/prdaudit_crs/crs
Device/File integrity check succeeded
Device/File Name : /mnt/prdaudit_crs/crs_mirror
Device/File integrity check succeeded
Cluster registry integrity check succeeded
root@oracle-server:/home/crs/bin[bin]# ocrconfig -showbackup
ac4-irauditdb-002 2008/04/10 23:47:02 /oracle/product/10.2.0/crs/cdata/ac4-iraudit-crs
ac4-irauditdb-002 2008/04/10 19:47:03 /oracle/product/10.2.0/crs/cdata/ac4-iraudit-crs
ac4-irauditdb-002 2008/04/10 15:47:04 /oracle/product/10.2.0/crs/cdata/ac4-iraudit-crs
ac4-irauditdb-002 2008/04/08 19:47:17 /oracle/product/10.2.0/crs/cdata/ac4-iraudit-crs
ac4-irauditdb-002 2008/04/03 15:47:53 /oracle/product/10.2.0/crs/cdata/ac4-iraudit-crs
4.) Copy the OCR mirror to the new location:
root@oracle-server:/mnt/prdaudit_crs[root@oracle-server prdaudit_crs]# ls -rlt
mtotal 38916
-rw-r–r– 1 oracle dba 10240000 Apr 11 02:27 vd2.old
-rw-r–r– 1 oracle dba 10240000 Apr 11 02:27 vd3.old
-rw-r—– 1 root dba 3121152 Apr 11 02:59 crs_mirror
-rw-r—– 1 root dba 3121152 Apr 11 03:22 crs
-rw-r–r– 1 oracle dba 10240000 Apr 11 03:23 vd1
root@oracle-server:/mnt/prdaudit_crs[root@oracle-server prdaudit_crs]# cp crs_mirror /mnt/prdaudit_crs_mirror1
Check the permission, it should be root:dba
5.) Change the OCR location in the CRS:
root@oracle-server:/home/crs/bin[bin]# ./ocrconfig -replace ocrmirror /mnt/prdaudit_crs_mirror1/crs_mirror
root@oracle-server:/home/crs/bin[bin]# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 262144
Used space (kbytes) : 2812
Available space (kbytes) : 259332
ID : 429958626
Device/File Name : /mnt/prdaudit_crs/crs
Device/File integrity check succeeded
Device/File Name : /mnt/prdaudit_crs_mirror1/crs_mirror
Device/File integrity check succeeded
Cluster registry integrity check succeeded
root@oracle-server:/home/crs/bin[bin]# exit