环境:OEL+oracle rac 11.2.0.3
迁移描述:将ocr和votedisk从+DATE上迁移到+OCR_VOTE上;
操作如下:
[root@ora2 ~]$ /u01/app/11.2.0/grid/bin/ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 1469612
Used space (kbytes) : 3784
Available space (kbytes) : 1465828
ID : 1820175369
Device/File Name : +DATA
Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check bypassed due to non-privileged user
这里我们看到ocr放在+DATA中了
然后Add a new OCR device/file:
[root @ora2 ~]/u01/app/11.2.0/grid/bin/ocrconfig -add +OCR_VOTE
[root @ora2 ~]$ /u01/app/11.2.0/grid/bin/ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 1469612
Used space (kbytes) : 3784
Available space (kbytes) : 1465828
ID : 1820175369
Device/File integrity check succeeded
+OCR_VOTE
Device/File integrity check succeeded
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check bypassed due to non-privileged user
(这时候ocr并不存在于+OCR_VOTE中)
迁移 ocr:
[root @ora2 ~]$/u01/app/11.2.0/grid/bin/ocrconfig -replace +DATA -replacement +OCR_VOTE
然后迁移votedisk:
[root @ora2 ~]$su - grid
[grid @ora2 ~]$crsctl replace votedisk +OCR_VOTE
查询一下votedisk的存放目录:
[grid @ora2 ~]$crsctl query css votedisk;
查询一下资源状态:
[grid @ora2 ~]$crsctl status resource -t
然后登录asm查看asmdisk的信息:
sqlplus / as sysasm
SQL> select group_number,name,state,type from V$asm_diskgroup;
SQL> select group_number,name,path from v$asm_disk;
使用show parameter spfile查看路径,如果存放在+DATA中,可以重建spfile:
如下操作:
SQL>create pfile='/u01/11.2.0/grid/dbs/asmpfile.ora' from spfile;
SQL>create spfile='+OCR_VOTE' from pfile='/u01/11.2.0/grid/dbs/asmpfile.ora';
然后使用root用户重启crs即可
[root @ora2 ~]$/u01/app/11.2.0/grid/bin/crsctl stop crs
[root @ora2 ~]$/u01/app/11.2.0/grid/bin/crsctl start crs
然后再使用grid用户
su - grid
SQL>alter diskgroup OCR_VOTE mount;
切换root用户
/u01/app/11.2.0/grid/bin/ocrconfig -delete +DATA
删除磁盘组+DATA:
SQL>alter diskgroup DATA dismount;
SQL>drop diskgroup DATA including contents
--------------------------------------------------------------------------------------------
版权所有,转载请注明作者及原文链接,否则追究法律责任!
QQ: 584307876
作者: Seven
原文链接:http://blog.csdn.net/sunjiapeng/article/details/9791425
邮箱:
[email protected]