oracle迁移OCR盘

来源:这里教程网 时间:2026-03-03 19:03:50 作者:

迁移OCR 1.dd新的盘 dd if=/dev/zero of=/dev/mapper/mpathd bs=1M count=1024 2.创建新的ocr磁盘组(1节点) create diskgroup VOT external redundancy disk '/dev/asm-diskd' attribute 'compatible.rdbms'='11.2','compatible.asm'='11.2'; 3.2节点mount磁盘组 alter diskgroup VOT mount; 4.用ocrcheck查看ocr信息 [grid@ear1 ~]$ ocrcheck Status of Oracle Cluster Registry is as follows :          Version                  :          3          Total space (kbytes)     :     262120          Used space (kbytes)      :       2984          Available space (kbytes) :     259136          ID                       : 1650000229          Device/File Name         :       +OCR                                     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 bypassed due to non-privileged user 5.新的磁盘组添加ocr /oracle/grid/crs_1/bin/ocrconfig -add +VOT 6.用ocrcheck查看ocr信息 [grid@ear1 ~]$ ocrcheck Status of Oracle Cluster Registry is as follows :          Version                  :          3          Total space (kbytes)     :     262120          Used space (kbytes)      :       2980          Available space (kbytes) :     259140          ID                       : 1650000229          Device/File Name         :       +OCR                                     Device/File integrity check succeeded          Device/File Name         :       +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 bypassed due to non-privileged user 7.查看vote信息 [grid@ear1 ~]$ crsctl query css votedisk ##  STATE    File Universal Id                File Name Disk group --  -----    -----------------                --------- ---------  1. ONLINE   9884ef58d7f64ff2bf0ac7302563830b (/dev/asm-diskb) [OCR] Located 1 voting disk(s). 8.vote替换磁盘组 crsctl replace votedisk +VOT 9.再次查看vote信息 [grid@ear1 ~]$ crsctl query css votedisk ##  STATE    File Universal Id                File Name Disk group --  -----    -----------------                --------- ---------  1. ONLINE   b0669b6b47b74f94bfe83061594de6d5 (/dev/asm-diskd) [VOT] Located 1 voting disk(s). 10.查看集群状态 crsctl stat res -t 11.重建spfile(gi) show parameter spfile; create pfile='/tmp/asmpfile.ora' from spfile; create spfile='+VOT' from pfile='/tmp/asmpfile.ora'; 12.重启crs(cluster -all是2边同时关、开)(1边操作即可) /oracle/grid/crs_1/bin/crsctl stop cluster -all /oracle/grid/crs_1/bin/crsctl start cluster -all 13.确认spfile更改自动更改过 SQL> show parameter spfile; NAME                                 TYPE        VALUE ------------------------------------ ----------- ------------------------------ spfile                               string      +VOT/ear-cluster/asmparameterf                                                  ile/registry.253.1088567353 14.查看ocr.loc文件 [root@ear1 ~]# more /etc/oracle/ocr.loc #Device/file  getting replaced by device +VOT ocrconfig_loc=+OCR ocrmirrorconfig_loc=+VOT local_only=false 15.删除旧ocr盘的ocr信息(1节点) /oracle/grid/crs_1/bin/ocrconfig -delete +OCR 16.2节点dismount掉旧ocr磁盘组(如果先dismount再跑上一步,会报ORA-15027: active use of diskgroup "OCR" precludes its dismount) alter diskgroup OCR dismount; 17.1节点删除磁盘组 drop diskgroup OCR including contents; 如果使用上述方法无法删除ocrvote磁盘组,采用强制删除的方法来完成(以下命令分别在一二节点执行): alter diskgroup OCRVOTE dismount force; drop diskgroup OCRVOTE  including contents; 18.确认vote迁移完成 方法一、 [grid@ear1 ~]$ ocrcheck Status of Oracle Cluster Registry is as follows :          Version                  :          3          Total space (kbytes)     :     262120          Used space (kbytes)      :       2960          Available space (kbytes) :     259160          ID                       : 1650000229          Device/File Name         :       +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 bypassed due to non-privileged user 方法二、 [grid@ear1 ~]$ crsctl query css votedisk ##  STATE    File Universal Id                File Name Disk group --  -----    -----------------                --------- ---------  1. ONLINE   b0669b6b47b74f94bfe83061594de6d5 (/dev/asm-diskd) [VOT] Located 1 voting disk(s). 方法三、 [grid@ear1 ~]$ more /etc/oracle/ocr.loc #Device/file +OCR getting replaced by device +VOT ocrconfig_loc=+VOT local_only=false

相关推荐