Oracle RAC的OCR和VOTING DISK管理的小技巧,用的時候參考一下。
Oracle Cluster Registry (OCR )檔案,是CRS 關鍵的組成部分。用於維護在Cluster 中高可用性群組件的資訊。例如,Cluster 節點列表,Cluster 資料庫Instance 到節點的映射和CRS 應用資源的列表(如Services 、虛擬內部連結協議地址等)。
Voting disk 通過健全狀態檢查和在網路失敗的情況下在多個進程間確定叢集的所有者來管理群集的成員,RAC 的投票權使用磁碟,以確定哪些進程是一個群整合員。
OCR 設定檔使用兩種方式查詢:
使用ocrcheck 命令
/u01/oracle/home@webdb1=>servdb1$ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 1003760
Used space (kbytes) : 7016
Available space (kbytes) : 996744
ID : 1292524385
Device/File Name : /dev/raw/raw1
Device/File integrity check succeeded
Device/File not configured
Cluster registry integrity check succeeded
查詢ocr.loc 檔案內容
/u01/oracle/home@webdb1=>servdb1$cat /etc/oracle/ocr.loc
ocrconfig_loc=/dev/raw/raw1
local_only=FALSE
OCR 設定檔,RAC 系統會自動備份,使用ocrconfig 可以查詢自動備份情況,也可以使用它自己手工備份一下。
/u01/oracle/home@webdb1=>servdb1$ocrconfig -showbackup
webdb1 2012/06/29 13:20:58 /u01/oracle/app/oracle/product/10.2.0/crs/cdata/crs
webdb1 2012/06/29 09:20:58 /u01/oracle/app/oracle/product/10.2.0/crs/cdata/crs
webdb1 2012/06/29 05:20:57 /u01/oracle/app/oracle/product/10.2.0/crs/cdata/crs
webdb1 2012/06/28 01:21:01 /u01/oracle/app/oracle/product/10.2.0/crs/cdata/crs
webdb1 2012/06/27 05:21:00 /u01/oracle/app/oracle/product/10.2.0/crs/cdata/crs
/u01/oracle/home@webdb1=>servdb1$
VOTING DISK 設定檔使用crsctl 查詢:
/u01/oracle/home@webdb1=>servdb1$crsctl query css votedisk
0. 0 /dev/raw/raw2
located 1 votedisk(s).
VOTING DISK 就是一個仲裁,儲存臨時資訊,無須備份,即使格式化系統重啟後也會重寫。