ASM ocr盘替换测试

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

替换完毕

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值