rac维护工具集系列(四)--集群层OCR系列
Oracle Clusterware把整个集群的配置信息放在共享存储上,这个存储叫做OCR Disk。
在集群中,又能有一个节点对OCR Disk进行读写操作,这个节点叫做MASTER Node。所有节点都会在内存中保留一份OCR的copy,同时OCR Process
负责同步到其他家电的OCR Process。
CRSD进程完成对OCR内容的自动个备份,
[oracle@rac1 crs]$ pwd
/u01/app/oracle/product/10.2.0/crs_1/cdata/crs
[oracle@rac1 crs]$ ls
backup00.ocr backup01.ocr backup02.ocr day_.ocr day.ocr week_.ocr week.ocr
1. ocrdump
ocrdump以ASCII的方式打印出OCR的内容,但是只能用于阅读,不能用户恢复OCR
日志存放路径:$ORACLE_HOME/log/
e.g
[oracle@rac1 client]$ ocrdump -stdout -keyname ocr -xml|more
PROT-307: The specified key does not exist in cluster registry
[oracle@rac1 client]$ ll -t
total 60
-rw-r----- 1 oracle oinstall 322 Jun 11 13:22 ocrdump_12335.log
-rw-r----- 1 oracle oinstall 329 Jun 11 13:21 ocrdump_12117.log
-rw-r----- 1 oracle oinstall 329 Jun 11 13:17 ocrdump_10758.log
-rw-r----- 1 oracle oinstall 322 Jun 11 13:17 ocrdump_10571.log
-rw-r----- 1 oracle oinstall 2178 Jun 11 13:15 ocrdump_9752.log
-rw-r--r-- 1 oracle oinstall 7991 Jun 10 14:43 oifcfg.log
-rw-r----- 1 oracle oinstall 973 Mar 19 09:57 ocr_8781_7.log
[oracle@rac1 client]$ more ocrdump_12335.log
Oracle Database 10g CRS Release 10.2.0.4.0 Production Copyright 1996, 2008 Oracle. All rights reserved.
2009-06-11 13:22:18.199: [ OCRDUMP][3086935744]ocrdump starts...
2009-06-11 13:22:18.273: [ OCRDUMP][3086935744]Key name [ocr] does not exist
2009-06-11 13:22:18.274: [ OCRDUMP][3086935744]Exiting [status=success]...
2.ocrcheck
用于检查OCR内容的一致性,日志存放路径:$ORACLE_HOME/log/
[oracle@rac1 client]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 262120
Used space (kbytes) : 3848
Available space (kbytes) : 258272
ID : 454097433
Device/File Name : /ocfs/clusterware/ocr
Device/File integrity check succeeded
Device/File not configured
Cluster registry integrity check succeeded
[oracle@rac1 client]$ cd /u01/app/oracle/product/10.2.0/db_1/log/rac1/client/
[oracle@rac1 client]$ ll -t|grep ocrcheck
-rw-r----- 1 oracle oinstall 370 Jun 11 13:32 ocrcheck_16557.log
-rw-r----- 1 oracle oinstall 370 Jun 11 13:31 ocrcheck_15918.log
-rw-r----- 1 oracle oinstall 370 Jun 11 13:30 ocrcheck_15665.log
-rw-r----- 1 oracle oinstall 370 Jun 11 13:28 ocrcheck_15279.log
-rw-r----- 1 oracle oinstall 370 Jun 11 13:24 ocrcheck_13174.log
[oracle@rac1 client]$ more ocrcheck_16557.log
Oracle Database 10g CRS Release 10.2.0.4.0 Production Copyright 1996, 2008 Oracle. All rights reserved.
2009-06-11 13:32:19.951: [OCRCHECK][3086935744]ocrcheck starts...
2009-06-11 13:32:21.825: [OCRCHECK][3086935744]protchcheck: OCR status : total = [262120], used = [3848], avail = [258272]
2009-06-11 13:32:21.861: [OCRCHECK][3086935744]Exiting [status=success]...
[oracle@rac1 client]$
3.ocrconfig
ocrconfig用户维护OCR磁盘。图形化安装Clustterware