您好,登錄后才能下訂單哦!
1.ocr磁盤(pán)簡(jiǎn)介
健忘問(wèn)題是由于每個(gè)節(jié)點(diǎn)都有配置信息的拷貝,修改節(jié)點(diǎn)的配置信息不同步引起的。Oracle采用的解決方法就是把這個(gè)配置文件放在共享的存儲(chǔ)上, 這個(gè)文件就是 OCR Disk.整個(gè)OCR的信息是樹(shù)形結(jié)構(gòu)的,主要分為3大分支.分別是SYSTEM,DATABASE和CRS,每個(gè)人分支都有許多小分支,只能由root用戶(hù)修改.ocr每4個(gè)小時(shí)備份一次,只保留5個(gè)文件,當(dāng)天保留3個(gè)文件,上個(gè)星期保留一個(gè),上個(gè)月也保留一個(gè).
OCR DISK內(nèi)容包含:
1).節(jié)點(diǎn)信息
2).數(shù)據(jù)庫(kù)實(shí)例,節(jié)點(diǎn),以及其它映射關(guān)系
3).rac 資源配置信息(VIP,SERVICES)
4).數(shù)據(jù)庫(kù)啟動(dòng)相關(guān)進(jìn)程
5).CRS每三方應(yīng)用程序信息
2.ocrcheck(檢查ocr內(nèi)容的一至性,查看ocr的狀態(tài))
[grid@rac2 ~]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes): 262120
Used space (kbytes) : 3140
Available space (kbytes) : 258980
ID : 1119662722
Device/File Name : +OCR
Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check bypassed due to non-privileged user
[grid@rac2 ~]$
3.ocrdump(查看ocr文件中的內(nèi)容)
[root@rac1 ~]# ll /home/grid/11.2.0/grid/cdata/scan-cluster/
total 58360
-rw------- 1 root root 7462912 Oct 8 18:44 27255153.ocr
-rw------- 1 root root 7462912 Oct 10 14:44 backup00.ocr
-rw------- 1 root root 7462912 Oct 9 17:58 backup01.ocr
-rw------- 1 root root 7462912 Oct 9 13:58 backup02.ocr
-rw------- 1 root root 7462912 Oct 10 14:45 day_.ocr
-rw------- 1 root root 7462912 Oct 9 13:58 day.ocr
-rw------- 1 root root 7462912 Oct 9 17:58 week_.ocr
-rw------- 1 root root 7421952 Sep 26 14:48 week.ocr
[root@rac1 ~]# /home/grid/11.2.0/grid/bin/ocrdump -backupfile /home/grid/11.2.0/grid/cdata/scan-cluster/backup00.ocr
[root@rac1 ~]# ll OCRDUMPFILE -此時(shí)當(dāng)前目生成OCRDUMPFILE文件
-rw------- 1 root root 220258 Oct 10 16:32 OCRDUMPFILE
[root@rac1 ~]# more OCRDUMPFILE
10/10/2016 16:32:25
/home/grid/11.2.0/grid/cdata/scan-cluster/backup00.ocr
/home/grid/11.2.0/grid/bin/ocrdump.bin -backupfile /home/grid/11.2.0/grid/cdata/scan-cluster/backup00.ocr
[SYSTEM]
UNDEF :
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : PROCR_READ, OTHER_PERMISSION : PROCR_READ, USER_NAME : root, GROUP_NAME : root}
[root@rac1 ~]#
4.ocrconfig(維護(hù)ocr磁盤(pán))
[root@rac1 ~]# /home/grid/11.2.0/grid/bin/ocrconfig -showbackup
rac1 2016/10/10 14:45:03 /home/grid/11.2.0/grid/cdata/scan-cluster/backup00.ocr
rac1 2016/10/09 17:58:37 /home/grid/11.2.0/grid/cdata/scan-cluster/backup01.ocr
rac1 2016/10/09 13:58:33 /home/grid/11.2.0/grid/cdata/scan-cluster/backup02.ocr
rac1 2016/10/09 13:58:33 /home/grid/11.2.0/grid/cdata/scan-cluster/day.ocr
rac1 2016/09/26 14:48:52 /home/grid/11.2.0/grid/cdata/scan-cluster/week.ocr
[root@rac1 ~]# /home/grid/11.2.0/grid/bin/ocrconfig -manualbackup --啟用手動(dòng)備份
rac1 2016/10/10 17:44:03 /home/grid/11.2.0/grid/cdata/scan-cluster/backup_20161010_174403.ocr
[root@rac1 ~]# /home/grid/11.2.0/grid/bin/ocrconfig -restore /home/grid/11.2.0/grid/cdata/scan-cluster/backup_20161010_174403.ocr --恢復(fù)ocr信息
[root@rac1 ~]#
5.手動(dòng)備份ocr磁盤(pán)
[root@rac1 ~]# /home/grid/11.2.0/grid/bin/ocrconfig -export /tmp/ocr-20161010.back
[root@rac1 ~]# ll /tmp/ocr-20161010.back
-rw------- 1 root root 125185 Oct 10 17:49 /tmp/ocr-20161010.back
[root@rac1 ~]# /home/grid/11.2.0/grid/bin/ocrconfig -import /tmp/ocr-20161010.back --導(dǎo)入時(shí)必須停止crs服務(wù)
6.vote disk磁盤(pán)簡(jiǎn)介
Voting Disk這個(gè)文件主要用于記錄節(jié)點(diǎn)成員狀態(tài),在出現(xiàn)腦裂時(shí),決定那個(gè)Partion獲得控制權(quán),其他的 Partion必須從集群中剔除。在安裝RAC時(shí)也會(huì)提示指定這個(gè)位置。安裝完成后可以通過(guò)crsctl query css votedisk命令來(lái)查看Voting Disk位置.oracle rac 10G可以用dd工具備份表決磁盤(pán),oracle rac 11g的表決磁盤(pán)和ocr磁盤(pán)是在一起的,不能用dd工具備份.
1).備份表決磁盤(pán)
dd if=/dev/raw/raw3 of=/tmp/votedisk.back bs=1024M count=10
2).恢復(fù)表決磁盤(pán)
dd if=/tmp/votedisk.back of=/dev/raw/raw3 bs=1024M count=10
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。