How To Change the location of OCR & Voting Disk in 10gR2 Oracle RAC
Voting Disk:
1.) Login as root
2.) Shutdown CRS on all nodes:
3.) Check the the location of the voting disk:
4.) Copy the voting disk to the new location:
root@oracle-server:/home/crs/bin[bin]# cp /mnt/db_crs/vd2 /mnt/db_crs_mirror1/
root@oracle-server:/home/crs/bin[bin]# cp /mnt/db_crs/vd3 /mnt/db_crs_mirror2/
5.) Change the location in CRS:
6.) Delete the old Voting Disks:
7.) Query CRS to see if the changes where proper:
PS: The permission to the voting disk should be root:dba, while copying and creating voting disk as we are using the root user, the permission will change to root:root, which will give error when starting crs.
OCR:
1.) Login as root.
2.) Start CRS on all nodes:
3.) Check OCR configuration/backups:
4.) Copy the OCR mirror to the new location:
5.) Change the OCR location in the CRS:
root@oracle-server:/home/crs/bin[bin]# ./ocrconfig -replace ocrmirror /mnt/db_crs_mirror1/crs_mirror
Same way to can move the ocr:
OCR AND VOTING DISK MOVED!!!!
Voting Disk:
1.) Login as root
2.) Shutdown CRS on all nodes:
root@oracle-server:/home/crs/bin[bin]# ./crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
root@oracle-server:/home/crs/bin[bin]# ./crsctl check crs
Failure 1 contacting CSS daemon
Cannot communicate with CRS
Cannot communicate with EVM3.) Check the the location of the voting disk:
root@oracle-server:/home/crs/bin[bin]# ./crsctl query css votedisk
0. 0 /mnt/db_crs/vd1
1. 0 /mnt/db_crs/vd2
2. 0 /mnt/db_crs/vd34.) Copy the voting disk to the new location:
root@oracle-server:/home/crs/bin[bin]# cp /mnt/db_crs/vd2 /mnt/db_crs_mirror1/
root@oracle-server:/home/crs/bin[bin]# cp /mnt/db_crs/vd3 /mnt/db_crs_mirror2/
5.) Change the location in CRS:
root@oracle-server:/home/crs/bin[bin]# ./crsctl add css votedisk /mnt/db_crs_mirror1/vd2
Now formatting voting disk: /mnt/db_crs_mirror1/vd2
successful addition of votedisk /mnt/db_crs_mirror1/vd2.
root@oracle-server:/home/crs/bin[bin]# ./crsctl add css votedisk /mnt/db_crs_mirror2/vd3
Now formatting voting disk: /mnt/db_crs_mirror2/vd3
successful addition of votedisk /mnt/db_crs_mirror2/vd3.6.) Delete the old Voting Disks:
root@oracle-server:/home/crs/bin[bin]# crsctl delete css votedisk /mnt/db_crs/vd2 -force
successful deletion of votedisk /mnt/db_crs/vd2.
root@oracle-server:/home/crs/bin[bin]# crsctl delete css votedisk /mnt/db_crs/vd3 -force
successful deletion of votedisk /mnt/db_crs/vd3.7.) Query CRS to see if the changes where proper:
root@oracle-server:/home/crs/bin[bin]# ./crsctl query css votedisk
0. 0 /mnt/db_crs/vd1
1. 0 /mnt/db_crs_mirror2/vd3
2. 0 /mnt/db_crs_mirror1/vd2PS: The permission to the voting disk should be root:dba, while copying and creating voting disk as we are using the root user, the permission will change to root:root, which will give error when starting crs.
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 healthy3.) 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/db_crs/crs
Device/File integrity check succeeded
Device/File Name : /mnt/db_crs/crs_mirror
Device/File integrity check succeeded
Cluster registry integrity check succeeded
root@oracle-server:/home/crs/bin[bin]# ocrconfig -showbackup
oracle-server 2008/04/10 23:47:02 /oracle/product/10.2.0/crs/cdata/ac4-db-crs
oracle-server 2008/04/10 19:47:03 /oracle/product/10.2.0/crs/cdata/ac4-db-crs
oracle-server 2008/04/10 15:47:04 /oracle/product/10.2.0/crs/cdata/ac4-db-crs
oracle-server 2008/04/08 19:47:17 /oracle/product/10.2.0/crs/cdata/ac4-db-crs
oracle-server 2008/04/03 15:47:53 /oracle/product/10.2.0/crs/cdata/ac4-db-crs4.) Copy the OCR mirror to the new location:
root@oracle-server:/mnt/prdaudit_crs[root@oracle-server db_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/db_crs[root@oracle-server db_crs]# cp crs_mirror /mnt/db_crs_mirror1
Check the permission, it should be root:dba5.) Change the OCR location in the CRS:
root@oracle-server:/home/crs/bin[bin]# ./ocrconfig -replace ocrmirror /mnt/db_crs_mirror1/crs_mirror
Same way to can move the ocr:
oraconfig -replace ocr
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/db_crs/crs
Device/File integrity check succeeded
Device/File Name : /mnt/db_crs_mirror1/crs_mirror
Device/File integrity check succeeded
Cluster registry integrity check succeeded
root@oracle-server:/home/crs/bin[bin]# exitOCR AND VOTING DISK MOVED!!!!
No comments:
Post a Comment