日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
解析OCR與VotingDisk以及其管理

Voting DiskOCR是Oracle Clusterware的2部分。Voting Disk里面記錄著節(jié)點(diǎn)成員的信息。如RAC數(shù)據(jù)庫中有哪些節(jié)點(diǎn)成員,節(jié)點(diǎn)增加或者刪除時(shí)也同樣會將信息記錄進(jìn)來。Voting Disk必須存放在共享存儲上,通常來說是存放在裸設(shè)備上。為了保證Voting Disk的安全,需要配置多個(gè)Voting Disk,Oracle建議Voting Disk的個(gè)數(shù)應(yīng)該為奇數(shù)個(gè),如 1、3、5個(gè),每個(gè)Voting Disk的大小約為20MB。

創(chuàng)新互聯(lián)公司專業(yè)為企業(yè)提供谷城網(wǎng)站建設(shè)、谷城做網(wǎng)站、谷城網(wǎng)站設(shè)計(jì)、谷城網(wǎng)站制作等企業(yè)網(wǎng)站建設(shè)、網(wǎng)頁設(shè)計(jì)與制作、谷城企業(yè)網(wǎng)站模板建站服務(wù),10年谷城做網(wǎng)站經(jīng)驗(yàn),不只是建網(wǎng)站,更提供有價(jià)值的思路和整體網(wǎng)絡(luò)服務(wù)。

OCR 記錄的是節(jié)點(diǎn)成員的配置信息,如數(shù)據(jù)庫、ASM、實(shí)例、監(jiān)聽器、VIP等CRS資源的配置信息。CRS進(jìn)程管理的信息來自O(shè)CR的內(nèi)容。OCR存儲的配置信息是以目錄樹的形式來記錄一系列“鍵-值”對應(yīng)信息的。OCR記錄著 CRS進(jìn)程管理資源的所有配置信息。大小約為100MB。

對Voting Disk的更改必須用root來進(jìn)行。

添加一個(gè)Voting Disk成員:crsctl add css votedisk /dev/raw/raw3'

刪除一個(gè)Voting Disk成員:crsctl delete css votedisk /dev/raw/raw3'

對OCR的增加、刪除和替代配置可以由root用戶通過ocrconfig -replace來操作:

ocrconfig -replace /dev/raw/raw1

注意:增加、刪除Voting Disk及恢復(fù)Voting Disk和OCR時(shí),RAC中的所有資源都必須停止。

Voting Disk和OCR存放的信息是至關(guān)重要的,一旦他們丟失或者損壞的話,Clusterware將無法啟動(dòng),這樣整個(gè)RAC都無法啟動(dòng)。因此需要對Voting Disk和OCR進(jìn)行完備的備份。

對Voting Disk的備份操作可以通過dd命令來操作。

查看位置:

#crsctl query css votedisk

備份操作:

#dd if=/dev/raw/raw2 f=/home/oracle/voting_disk.bak

恢復(fù)操作:

#dd if=/home/oracle/voting_disk.bak f=/dev/raw/raw2

默認(rèn)情況下,RAC會在其中一個(gè)節(jié)點(diǎn)上每4個(gè)小時(shí)都自動(dòng)備份一次OCR。并保留最近的3次備份,另外還保留最近兩天以及最近兩個(gè)周末的備份。這個(gè)可以通過命令ocrconfig -showbackup來查看。OCR默認(rèn)的備份路徑為$CRS_HOME/cdata/crs??梢酝ㄟ^ocrconfig -backuploc來更改OCR的備份路徑。OCR自動(dòng)備份的時(shí)間間隔無法修改。我們還可以通過ocrconfig -export 來到處OCR的內(nèi)容,也可以通過通過ocrconfig -import導(dǎo)入OCR的內(nèi)容。

可以用ocrconfig -restore 命令對OCR進(jìn)行恢復(fù)。

./ocrconfig -restore /u01/oracle/product/10g/crs/cdata/crs/backup00.ocr

添加Voting Disk:

 
 
 
  1. [root@rhel1 bin]#./crsctl add css votedisk /u01/ocfs2fs/vdisk2
  2. Cluster is not in a ready state for online disk addition
  3. [root@rhel1 bin]#./crsctl add css votedisk /u01/ocfs2fs/vdisk2-force
  4. Now formatting voting disk: /u01/ocfs2fs/vdisk2 
  5. successful addition of votedisk /u01/ocfs2fs/vdisk2. chown oracle:oinstall /u01/ocfs2fs/vdisk2
  6. chmod 775 /u01/ocfs2fs/vdisk2
  7. [root@rhel1 bin]# /etc/init.crs start
  8. [root@rhel1 bin]#./crsctl query css votedisk
  9. 0. 0 /u01/ocfs2fs/vdisk
  10. 1. 0 /u01/ocfs2fs/vdisk2

注意:add voting disk必須是所有服務(wù)都關(guān)閉的情況下完成。

#p#

添加OCR鏡像:

 
 
 
  1. [root@rhel1 bin]# touch /u01/ocfs2fs/ocr2
  2. [root@rhel1 bin]#./ocrconfig -replace ocrmirror /u01/ocfs2fs/ocr2 
  3. [root@rhel1 bin]#./ocrcheck 
  4. Status of Oracle Cluster Registry is as follows : 
  5. Version : 2
  6. Total space (kbytes) : 262120 
  7. Used space (kbytes) : 2756 
  8. Available space (kbytes) : 259364 
  9. ID : 2062708016 
  10. Device/File Name : /u01/ocfs2fs/ocr 
  11. Device/File integrity check succeeded 
  12. Device/File Name : /u01/ocfs2fs/ocr2 
  13. Device/File integrity check succeeded 
  14. Cluster registry integrity check succeeded 

注意:add ocr可以是在線完成。

刪除OCR鏡像:

 
 
 
  1. [root@rhel1 bin]#./ocrconfig -replace ocrmirror 
  2. [root@rhel1 bin]#./ocrcheck 
  3. Status of Oracle Cluster Registry is as follows : 
  4. Version : 2 
  5. Total space (kbytes) : 262120 
  6. Used space (kbytes) : 2756 
  7. Available space (kbytes) : 259364 
  8. ID : 2062708016 
  9. Device/File Name : /u01/ocfs2fs/ocr 
  10. Device/File integrity check succeeded 
  11. Device/File not configured 
  12. Cluster registry integrity check succeeded 
  13. [root@rhel1 bin]#cat /etc/oracle/ocr.loc 
  14. #Device/file /u01/ocfs2fs/ocr2 being deleted 
  15. ocrconfig_loc=/u01/ocfs2fs/ocr

刪除Voting Disk:

 
 
 
  1. [root@rhel1 bin]#./crsctl delete css votedisk /u01/ocfs2fs/vdisk2 
  2. Cluster is not in a ready state for online disk removal 
  3. [root@rhel1 bin]#./crsctl stop crs 
  4. Stopping resources. This could take several minutes. 
  5. Successfully stopped CRS resources. 
  6. Stopping CSSD. 
  7. Shutting down CSS daemon. 
  8. Shutdown request successfully issued. 
  9. [root@rhel1 bin]# ./crsctl delete css votedisk /u01/ocfs2fs/vdisk2
  10. Cluster is not in a ready state for online disk removal 
  11. [root@rhel1 bin]#./crsctl delete css votedisk /u01/ocfs2fs/vdisk2-force
  12. successful deletion of votedisk /u01/ocfs2fs/vdisk2.
  13. [root@rhel1 bin]#./crsctl query css votedisk 
  14. 0. 0 /u01/ocfs2fs/vdisk 
  15. located 1 votedisk(s).

 #p#

備份、恢復(fù)Voting Disk:

 
 
 
  1. [root@rhel1 bin]#./crsctl check crs
  2. Failure 1 contacting CSS daemon
  3. Cannot communicate with CRS
  4. Cannot communicate with EVM
  5. [root@rhel1 bin]# dd if=/u01/ocfs2fs/vdisk f=/home/oracle/vdisk_bak //備份,ocfs2也可直接copy
  6. 20000+0 records in 
  7. 20000+0 records out 
  8. 10240000 bytes (10 MB) copied, 0.301106 seconds, 34.0 MB/s
  9. [root@rhel1 bin]# rm -rf /u01/ocfs2fs/vdisk
  10. [root@rhel1 bin]#dd if=/home/oracle/vdisk_bak f=/u01/ocfs2fs/vdisk //恢復(fù),ocfs2也可直接copy
  11. 20000+0 records in
  12. 20000+0 records out
  13. 10240000 bytes (10 MB) copied, 0.173678 seconds, 59.0 MB/s
  14. [root@rhel1 bin]# chown oracle:oinstall /u01/ocfs2fs/vdisk
  15. [root@rhel1 bin]# chmod 775 /u01/ocfs2fs/vdisk 
  16. [root@rhel1 bin]#/etc/init.d/init.crs start 
  17. Startup will be queued to init within 30 seconds. 
  18. [root@rhel1 bin]#./crsctl check crs 
  19. CSS appears healthy 
  20. CRS appears healthy 
  21. EVM appears healthy

備份、恢復(fù)OCR:

 
 
 
  1. [root@rhel1 bin]# ./crsctl stop crs 
  2. Stopping resources. This could take several minutes. 
  3. Successfully stopped CRS resources. 
  4. Stopping CSSD. 
  5. Shutting down CSS daemon. 
  6. Shutdown request successfully issued. 
  7. [root@rhel1 bin]# cat /etc/oracle/ocr.loc 
  8. #Device/file /u01/ocfs2fs/ocr2 being deleted 
  9. ocrconfig_loc=/u01/ocfs2fs/ocr 
  10. local_only=false 
  11. [root@rhel1 bin]# mv /u01/ocfs2fs/ocr /u01/ocfs2fs/ocr_bak 
  12. [root@rhel1 crs_1]# cd cdata 
  13. [root@rhel1 cdata]# cd crs 
  14. [root@rhel1 crs]# ll 
  15. total 23144 
  16. -rwxrwxr-x 1 oracle dba 3514368 Mar 1 11:00 13968559 
  17. -rwxrwxr-x 1 oracle dba 3514368 Mar 1 07:00 33426182 
  18. -rw-r--r-- 1 root root 3182592 Mar 8 15:17 34809936 
  19. -rwxrwxr-x 1 oracle dba 3514368 Feb 27 09:38 backup00.ocr 
  20. -rwxrwxr-x 1 oracle dba 3514368 Feb 8 06:02 backup01.ocr 
  21. -rwxrwxr-x 1 oracle dba 2142208 Nov 8 19:25 backup02.ocr 
  22. -rwxrwxr-x 1 oracle dba 2142208 Nov 8 19:25 day.ocr 
  23. -rwxrwxr-x 1 oracle dba 2142208 Nov 8 19:25 week.ocr 
  24. [root@rhel1 crs]# cd ../../bin 
  25. [root@rhel1 bin]# ./ocrconfig -restore /u01/app/oracle/crs_1/cdata/crs/backup02.ocr 
  26. PROT-16: Internal Error 
  27. [root@rhel1 bin]#touch /u01/ocfs2fs/ocr 
  28. [root@rhel1 bin]#./ocrconfig -restore /u01/app/oracle/crs_1/cdata/crs/backup02.ocr 
  29. [root@rhel1 bin]# ./crsctl start crs 
  30. Attempting to start CRS stack 
  31. The CRS stack will be started shortly 
  32. [root@rhel1 bin]# ./crsctl check crs 
  33. CSS appears healthy 
  34. CRS appears healthy 
  35. EVM appears healthy

查看和改變自動(dòng)備份目錄的命令如下:

./ocrconfig -showbackup //查看自動(dòng)備份。

./ocrconfig -backuploc //改變自動(dòng)備份目錄。


網(wǎng)站欄目:解析OCR與VotingDisk以及其管理
標(biāo)題路徑:http://www.5511xx.com/article/djcddgs.html