OracleRac11.2.0.3遷移OCR和VOTEDISK
環境:AIX7.1+Oracle Rac 11.2.0.3
遷移描述:今天在裝Oracle Rac的時候,錯誤的將500G的數據盤用作OCRDG了,遂後續比較麻煩,只能講ocr和votedisk遷移到新建的OCRDG上,並把DATADG刪除並格式化該盤。(OCRDG為normal 冗余)
操作如下:
grid@rac1:/home/grid>/oraapp/grid/gridhome/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 : +DATADG
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信息到+OCRDG中:
root@rac1:./root>/oraapp/grid/gridhome/bin/ocrconfig -add +OCRDG
刪除+DATADG中ocr:
root@rac1:./root>/oraapp/grid/gridhome/bin/ocrconfig -delete +DATADG
然後遷移votedisk:
grid@rac1:/home/grid>crsctl replace votedisk +OCRDG
查看votedisk的信息:
grid@rac1:/home/grid>crsctl query css votedisk;
查看diskgroup的信息:
sqlplus / as sysasm
SQL> select group_number,name,state,type from V$asm_diskgroup;
此時spfile存放在+DATADG中,需要重建spfile:
SQL>create pfile='/tmp/asmpfile.ora' from spfile;
SQL>create spfile='+OCRDG' from pfile='/tmp/asmpfile.ora';
然後使用root用戶重啟crs即可(兩邊順序重啟)
root@rac1:./root>/oraapp/grid/gridhome/bin/crsctl stop crs
root@rac1:./root>/oraapp/grid/gridhome/bin/crsctl start crs
刪除磁盤組+DATADG:
SQL>alter diskgroup DATADG dismount;
SQL>drop diskgroup DATADG including contents;