Migrate the OCR and VOTEDISK environments in 11g Rac: OEL + oracle rac 11.2.0.3 migration Description: migrate ocr and votedisk from + DATE to + OCR_VOTE. The operation is as follows:
[root@ora2 ~]$ /u01/app/11.2.0/grid/bin/ocrcheckStatus of Oracle Cluster Registry is as follows : Version : 3 Total space (kbytes) : 1469612 Used space (kbytes) : 3784 Available space (kbytes) : 1465828 ID : 1820175369 Device/File Name : +DATA Device/File integrity check succeeded Device/File not configured Device/File not configured Cluster registry integrity check succeeded Logical corruption check bypassed due to non-privileged user
Here we can see that ocr is placed in + DATA and then Add a new OCR device/file:
[root @ora2 ~]/u01/app/11.2.0/grid/bin/ocrconfig -add +OCR_VOTE[root @ora2 ~]$ /u01/app/11.2.0/grid/bin/ocrcheckStatus of Oracle Cluster Registry is as follows : Version : 3 Total space (kbytes) : 1469612 Used space (kbytes) : 3784 Available space (kbytes) : 1465828 ID : 1820175369 Device/File integrity check succeeded +OCR_VOTE Device/File integrity check succeeded Device/File not configured Cluster registry integrity check succeeded Logical corruption check bypassed due to non-privileged user
(At this time, ocr does not exist in + OCR_VOTE)
Migrate ocr: [root @ ora2 ~] $/U01/app/11.2.0/grid/bin/ocrconfig-replace + DATA-replacement + OCR_VOTE and migrate votedisk: [root @ ora2 ~] $ Su-grid [grid @ ora2 ~] $ Crsctl replace votedisk + OCR_VOTE query the storage directory of votedisk: [grid @ ora2 ~] $ Crsctl query css votedisk; query the resource status: [grid @ ora2 ~] $ Crsctl status resource-t
Then log on to asm to view the information of asmdisk:
[sql] sqlplus / as sysasm SQL> select group_number,name,state,type from V$asm_diskgroup; SQL> select group_number,name,path from v$asm_disk;
Use show parameter spfile to view the path. If it is stored in + DATA, you can recreate the spfile:
[sql] SQL>create pfile='/u01/11.2.0/grid/dbs/asmpfile.ora' from spfile; SQL>create spfile='+OCR_VOTE' from pfile='/u01/11.2.0/grid/dbs/asmpfile.ora';
Then restart crs with the root user.
[root @ora2 ~]$/u01/app/11.2.0/grid/bin/crsctl stop crs[root @ora2 ~]$/u01/app/11.2.0/grid/bin/crsctl start crs
Then use the grid user
[sql] su - grid SQL>alter diskgroup OCR_VOTE mount;
Switch root User
/u01/app/11.2.0/grid/bin/ocrconfig -delete +DATA
Delete a disk group + DATA:
[sql] SQL>alter diskgroup DATA dismount; SQL>drop diskgroup DATA including contents