RAC - OCR Disk和Voting Disk的冗余

RAC - OCR Disk和Voting Disk的冗余

   OCR Disk用来保存整个集群的配置信息,整个集群中,只能有一个节点对OCR Disk进行读写操作,这个节点叫做Master Node,所有节点都会在内存中保留一份OCR的拷贝,OCR内容发生改变时,由Master Node的OCR Process负责同步到其他节点。
   Oracle每4小时对OCR进行一次备份,并且保留最后的3个备份,以及前一天、前一周的最后一个备份,这个备份由Master Node的CRSD进程完成。每次备份后,备份文件会自动更改,以反映备份时间顺序,最近一次的备份是backup00.ocr。DBA在备份数据库的同 时,也要做好OCR的备份,防止存储意外故障。
  在添加OCR Disk和Voting Disk以前,要做好相应备份。

[root@rac01 crs]# pwd
/u01/app/oracle/product/10.2.0/crs_1/cdata/crs
[root@rac01 crs]# ll
total 23856
-rw-r--r--  1 root root 4067328 Apr 28 15:24 backup00.ocr
-rw-r--r--  1 root root 4067328 Apr 28 11:24 backup01.ocr
-rw-r--r--  1 root root 4067328 Apr 28 07:24 backup02.ocr
-rw-r--r--  1 root root 4067328 Apr 28 11:24 day_.ocr
-rw-r--r--  1 root root 4067328 Apr 27 11:24 day.ocr
-rw-r--r--  1 root root 4067328 Apr 28 07:24 week_.ocr
[root@rac01 crs]#

  OCR最多只能有两个,一个Primary OCR和一个Mirror OCR。
  添加一个Mirror OCR。

[root@rac01 crs]# ocrconfig -showbackup

rac01     2010/04/28 15:24:43     /u01/app/oracle/product/10.2.0/crs_1/cdata/crs

rac01     2010/04/28 11:24:39     /u01/app/oracle/product/10.2.0/crs_1/cdata/crs

rac01     2010/04/28 07:24:34     /u01/app/oracle/product/10.2.0/crs_1/cdata/crs

rac01     2010/04/27 11:24:14     /u01/app/oracle/product/10.2.0/crs_1/cdata/crs

rac02     2010/04/21 03:44:38     /u01/app/oracle/product/10.2.0/crs_1/cdata/crs
[root@rac01 crs]# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     293640
         Used space (kbytes)      :       3840
         Available space (kbytes) :     289800
         ID                       : 1141004385
         Device/File Name         : /dev/raw/raw1
                                    Device/File integrity check succeeded

                                    Device/File not configured

         Cluster registry integrity check succeeded

[root@rac01 crs]# ocrconfig -replace ocrmirror /dev/raw/raw2
[root@rac01 crs]# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     293640
         Used space (kbytes)      :       3840
         Available space (kbytes) :     289800
         ID                       : 1141004385
         Device/File Name         : /dev/raw/raw1
                                    Device/File integrity check succeeded
         Device/File Name         : /dev/raw/raw2
                                    Device/File integrity check succeeded

         Cluster registry integrity check succeeded

[root@rac01 crs]# cat /etc/oracle/ocr.loc
#Device/file  getting replaced by device /dev/raw/raw2
ocrconfig_loc=/dev/raw/raw1
ocrmirrorconfig_loc=/dev/raw/raw2
local_only=false
[root@rac01 crs]# ssh rac02 cat /etc/oracle/ocr.loc
root@rac02's password:
#Device/file  getting replaced by device /dev/raw/raw2
ocrconfig_loc=/dev/raw/raw1
ocrmirrorconfig_loc=/dev/raw/raw2
local_only=false
[root@rac01 crs]#

  Voting disk必须半数以上同时可用,clusterware才能正常工作,oracle建议voting disk为奇数个。
  添加voting disk时,必须停止数据库,asm,crs stack后操作,并且必须使用-force参数。

[root@rac01 crs]# crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora....SM1.asm application    OFFLINE   OFFLINE              
ora....01.lsnr application    OFFLINE   OFFLINE              
ora.rac01.gsd  application    OFFLINE   OFFLINE              
ora.rac01.ons  application    OFFLINE   OFFLINE              
ora.rac01.vip  application    OFFLINE   OFFLINE              
ora....SM2.asm application    OFFLINE   OFFLINE              
ora....02.lsnr application    OFFLINE   OFFLINE              
ora.rac02.gsd  application    OFFLINE   OFFLINE              
ora.rac02.ons  application    OFFLINE   OFFLINE              
ora.rac02.vip  application    OFFLINE   OFFLINE              
ora.racdb.db   application    OFFLINE   OFFLINE              
ora....b1.inst application    OFFLINE   OFFLINE              
ora....b2.inst application    OFFLINE   OFFLINE              
[root@rac01 crs]# crsctl stop crs
Stopping resources. This could take several minutes.
Successfully stopped CRS resources.
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
[root@rac01 crs]# crsctl query css votedisk
0.     0    /dev/raw/raw3

located 1 votedisk(s).
[root@rac01 crs]# crsctl check crs
Failure 1 contacting CSS daemon
Cannot communicate with CRS
Cannot communicate with EVM
[root@rac01 crs]# crsctl add css votedisk /dev/raw/raw4
Cluster is not in a ready state for online disk addition
[root@rac01 crs]# crsctl add css votedisk /dev/raw/raw4 -force
Now formatting voting disk: /dev/raw/raw4
successful addition of votedisk /dev/raw/raw4.
[root@rac01 crs]# crsctl add css votedisk /dev/raw/raw5 -force
Now formatting voting disk: /dev/raw/raw5
successful addition of votedisk /dev/raw/raw5.
[root@rac01 crs]# crsctl query css votedisk
0.     0    /dev/raw/raw3
1.     0    /dev/raw/raw4
2.     0    /dev/raw/raw5

located 3 votedisk(s).
[root@rac01 crs]# crsctl start crs
Attempting to start CRS stack
The CRS stack will be started shortly
[root@rac01 crs]#


come from:http://sean-dba.spaces.live.com/Blog/cns!5C964E8E7AA647F9!234.entry

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/90618/viewspace-672247/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/90618/viewspace-672247/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值