ASM ocr盘替换测试
原来ocr、voting在+crs,现在迁移到+ocr_vot,迁移之前提前创建好新的asm磁盘组
1、查看当前ocr
[root@rac1 ~]# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 2988
Available space (kbytes) : 259132
ID : 1486586460
Device/File Name : +CRS
Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check succeeded
2、将ocr指向新的asm磁盘组
[root@rac1 ~]# ocrconfig -add +ocr_vot -->新的asm磁盘组
[root@rac1 ~]# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 2988
Available space (kbytes) : 259132
ID : 1486586460
Device/File Name : +CRS
Device/File integrity check succeeded
Device/File Name : +ocr_vot
Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check succeeded
[root@rac1 ~]# tail /etc/oracle/ocr.loc
#Device/file getting replaced by device +ocr_vot
ocrconfig_loc=+CRS
ocrmirrorconfig_loc=+ocr_vot
local_only=false[root@rac1 ~]# ocrconfig -replace +crs -replacement +ocr_vot
PROT-29: The Oracle Cluster Registry location is already configured
3、查看当前votedisk
[root@rac1 ~]# crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE a03947febfcd4f59bfe6a7cd5f048673 (/dev/asmdisk1) [CRS]
Located 1 voting disk(s).
4、替换到新的voting盘
[root@rac1 ~]# crsctl replace votedisk +ocr_vot
Successful addition of voting disk 80fbfe237e9e4f60bfe9bd70cdb28129.
Successful addition of voting disk 50fffb28c8104f4dbf29363128d1fbc4.
Successful addition of voting disk aaa2b79a886b4fb8bf9278f6c88380fe.
Successful deletion of voting disk a03947febfcd4f59bfe6a7cd5f048673.
Successfully replaced voting disk group with +ocr_vot.
CRS-4266: Voting file(s) successfully replaced
[root@rac1 ~]# crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 80fbfe237e9e4f60bfe9bd70cdb28129 (/dev/asm_4g_2) [OCR_VOT]
2. ONLINE 50fffb28c8104f4dbf29363128d1fbc4 (/dev/asm_4g_3) [OCR_VOT]
3. ONLINE aaa2b79a886b4fb8bf9278f6c88380fe (/dev/asm_4g_1) [OCR_VOT]
Located 3 voting disk(s).
已替换完毕
5、重新生成asm的spfile到新的磁盘组
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +CRS/rac-cluster/asmparameterf
ile/registry.253.965755225
SQL> create pfile='asmpfile.ora' from spfile;
File created.
SQL> create spfile='+ocr_vot' from pfile='asmpfile.ora';
File created.
6、重启集群
crsctl stop cluster -all
crsctl start cluster -all
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +OCR_VOT/rac-cluster/asmparame
terfile/registry.253.101247236
5
7、删除老的crs盘
[root@rac1 ~]# ocrconfig -delete +crs
[root@rac1 ~]# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 2988
Available space (kbytes) : 259132
ID : 1486586460
Device/File Name : +ocr_vot
Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check succeeded
替换完毕