Oracle RAC 添加和刪除OCR
Oracle RAC 備份和恢複OCR 參考:
Oracle Clusterware最多隻支援兩個OCR,一個普通OCR,一個鏡像OCR.如果採用的External Redundancy方式儲存OCR,那麼還可以添加一個鏡像OCR,如果才用的Normal Redundancy的方式儲存OCR那麼則不能再添加。
添加普通OCR方法如下:
ocrconfig -replace ocr destination_fileocrconfig -replace ocr disk
--destination_file或disk為想要添加的OCR儲存位置
添加鏡像OCR方法如下:
ocrconfig -replace ocrmirror destination_file ocrconfig -replace ocrmirror disk
--destination_file或disk為想要添加的OCR儲存位置
--以上要用root使用者執行
樣本添加鏡像OCR:
1.查看系統當前OCR情況
[oracle@node1 ~]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 104344
Used space (kbytes) : 3816
Available space (kbytes) : 100528
ID : 497615595
Device/File Name : /dev/raw/raw1
Device/File integrity check succeeded
Device/File not configured
Cluster registry integrity check succeeded
看到當前系統只有一個OCR儲存(為普通OCR),在/dev/raw/raw1.
如果此時再添加一個普通OCR,則會報如下錯誤
[root@node1 bin]# ./ocrconfig -replace ocr /dev/raw/raw7
PROT-16: Internal Error