etc oracle ocr.loc,oralce 11g rac ocr和votedisk迁移

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

然后重启集群

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值