温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

oralce 11g rac ocr和votedisk迁移

发布时间:2020-08-17 13:28:48 来源:网络 阅读:466 作者:18620626259 栏目:关系型数据库

1、新建一个磁盘组+NEW
Create diskgroup CRS NORMAL REDUNDANCY
FAILGROUP CRS_0000 disk '/dev/asm-orctest1'
FAILGROUP CRS_0001 disk '/dev/asm-orctest2'
FAILGROUP CRS_0002 disk '/dev/asm-orctest3'
ATTRIBUTE 'compatible.asm' = '11.2';


2、查看ocr备份
[root@rac02 bin]# ./ocrconfig -manualbackup

ocrconfig -showbackup
[root@rac02 bin]# ./ocrconfig -showbackup manual
rac01     2017/08/03 06:47:10     /u01/11.2.0/grid/cdata/rac-cluster/backup_20170803_064710.ocr
rac02     2017/08/01 02:32:01     /u01/11.2.0/grid/cdata/rac-cluster/backup_20170801_023201.ocr

2、2个节点停止集群并修改配置文件(更改里面的磁盘组名字为新建的磁盘组)
./crsctl stop crs

vi /etc/oracle/ocr.loc


3、启动一个节点到独占模式并确认磁盘组+NEW是否mount,如没有,手动mount。

crsctl start crs -excl -nocrs


SQL> select  GROUP_NUMBER, NAME,STATE from  v$asm_diskgroup;

GROUP_NUMBER NAME                           STATE
------------ ------------------------------ -----------
           1 ASM_DATA1                      MOUNTED
           2 ASM_FL                         MOUNTED
           3 CRS                            MOUNTED
           4 DATA                           MOUNTED

4、使用OCR备份恢复OCR到新的磁盘组(注意提前更改ocr.loc)
#./ocrconfig -restore  /u01/11.2.0/grid/cdata/rac-cluster/backup_20170801_023201.ocr


[root@rac02 bin]# ./ocrconfig -manualbackup
rac01     2017/08/03 06:47:10     /u01/11.2.0/grid/cdata/rac-cluster/backup_20170803_064710.ocr
rac02     2017/08/01 02:32:01     /u01/11.2.0/grid/cdata/rac-cluster/backup_20170801_023201.ocr


5、恢复votedisk
[root@rac02 bin]# ./crsctl replace votedisk  +CRS
[root@rac02 bin]# ./ocrconfig -restore  /u01/11.2.0/grid/cdata/rac-cluster/backup_20170801_023201.ocr
[root@rac02 bin]# ./crsctl replace votedisk  +CRS
Successful addition of voting disk 99fc4fb627ab4ffabfa4819288ef362d.
Successful addition of voting disk 69c39aef708f4f0abf39c97b4c55dcea.
Successful addition of voting disk 6bef23769bae4f5fbfb594f99707b160.
Successful deletion of voting disk 264b8b526ac54fe9bf80c5eee1350526.
Successfully replaced voting disk group with +CRS.
CRS-4266: Voting file(s) successfully replaced


检查
ocrcheck---------------------------------------------检查结果未变化
crsctl query css votedisk
[root@rac02 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3480
         Available space (kbytes) :     258640
         ID                       : 1128199232
         Device/File Name         :      +DATA
                                    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

[root@rac02 bin]# ./crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   99fc4fb627ab4ffabfa4819288ef362d (/dev/asm-orctest1) [CRS]
 2. ONLINE   69c39aef708f4f0abf39c97b4c55dcea (/dev/asm-orctest2) [CRS]
 3. ONLINE   6bef23769bae4f5fbfb594f99707b160 (/dev/asm-orctest3) [CRS]
Located 3 voting disk(s).


6、删除掉原来
./ocrconfig -delete  +DATA

然后重启集群


向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI