以下的文章主要介紹的是Oracle OCR鏡像的增加以及刪除,我們大家都知道Oracle OCR記錄節點成員的相關的配置信息,如ASM、instance、以及listener和VIP等相關的CRS資源的相關配置信息。
檢查Oracle OCR的狀態
- [root@node3 ~]# ocrcheck
- Status of Oracle Cluster Registry is as follows :
- Version : 2
- Total space (kbytes) : 208656
- Used space (kbytes) : 6496
- Available space (kbytes) : 202160
- ID : 844916878
- Device/File Name : /dev/raw/raw2
- Device/File integrity check succeeded
- Device/File not configured
- Cluster registry integrity check succeeded
- [root@node3 ~]# cat /etc/Oracle/ocr.loc
- #Device/file /dev/raw/raw4 being deleted
- ocrconfig_loc=/dev/raw/raw2
- local_only=false
增加一個鏡像
- [root@node3 ~]# ocrconfig -replace ocrmirror /dev/raw/raw4
- [root@node3 ~]# ocrcheck
- Status of Oracle Cluster Registry is as follows :
- Version : 2
- Total space (kbytes) : 208656
- Used space (kbytes) : 6496
- Available space (kbytes) : 202160
- ID : 844916878
- Device/File Name : /dev/raw/raw2
- Device/File integrity check succeeded
- Device/File Name : /dev/raw/raw4
- Device/File integrity check succeeded
- Cluster registry integrity check succeeded
- [root@node3 ~]# cat /etc/Oracle/ocr.loc
- #Device/file getting replaced by device /dev/raw/raw4
- ocrconfig_loc=/dev/raw/raw2
- ocrmirrorconfig_loc=/dev/raw/raw4
- local_only=false
- [root@node3 ~]# ocrconfig -replace ocrmirror /dev/raw/raw6
- [root@node3 ~]# ocrcheck
- Status of Oracle Cluster Registry is as follows :
- Version : 2
- Total space (kbytes) : 208656
- Used space (kbytes) : 6496
- Available space (kbytes) : 202160
- ID : 844916878
- Device/File Name : /dev/raw/raw2
- Device/File integrity check succeeded
- Device/File Name : /dev/raw/raw6
- Device/File integrity check succeeded
- Cluster registry integrity check succeeded
- [root@node3 ~]# cat /etc/Oracle/ocr.loc
- #Device/file /dev/raw/raw4 getting replaced by device /dev/raw/raw6
- ocrconfig_loc=/dev/raw/raw2
- ocrmirrorconfig_loc=/dev/raw/raw6
- local_only=false
Oracle OCR只能有一份鏡像,新增加的鏡像文件會替換掉原來的鏡像。
刪除OCR的鏡像文件
- [root@node3 ~]# ocrconfig -replace ocrmirror
不帶文件路徑名
- [root@node3 ~]# ocrcheck
- Status of Oracle Cluster Registry is as follows :
- Version : 2
- Total space (kbytes) : 208656
- Used space (kbytes) : 6496
- Available space (kbytes) : 202160
- ID : 844916878
- Device/File Name : /dev/raw/raw2
- Device/File integrity check succeeded
- Device/File not configured
- Cluster registry integrity check succeeded
- [root@node3 ~]# cat /etc/Oracle/ocr.loc
- #Device/file /dev/raw/raw6 being deleted
- ocrconfig_loc=/dev/raw/raw2
- local_only=false
注意如果我們刪除了Oracle OCR的主文件,相應的鏡像文件自動的變為主文件。
例如:
- [root@node3 ~]# ocrcheck
- Status of Oracle Cluster Registry is as follows :
- Version : 2
- Total space (kbytes) : 208656
- Used space (kbytes) : 6496
- Available space (kbytes) : 202160
- ID : 844916878
- Device/File Name : /dev/raw/raw2
- Device/File integrity check succeeded
- Device/File Name : /dev/raw/raw4
- Device/File integrity check succeeded
- Cluster registry integrity check succeeded
- [root@node3 ~]# ocrconfig -replace ocr
- [root@node3 ~]# ocrcheck
- Status of Oracle Cluster Registry is as follows :
- Version : 2
- Total space (kbytes) : 208656
- Used space (kbytes) : 6496
- Available space (kbytes) : 202160
- ID : 844916878
- Device/File Name : /dev/raw/raw4
- Device/File integrity check succeeded
- Device/File not configured
- Cluster registry integrity check succeeded
上述的相關內容就是對Oracle OCR鏡像的增加以及刪除的描述,希望會給你帶來一些幫助在此方面。