当前位置:文档之家› 非常经典Oracle RAC CRS、OCR、Voting破坏重建

非常经典Oracle RAC CRS、OCR、Voting破坏重建

1、主机名:
#Public Network - (eth0)
192.168.10.11 rac1
192.168.10.12 rac2
#Private Interconnect - (eth1)
10.10.10.11 rac1priv
10.10.10.12 rac2priv
#Public Virtual IP (VIP) addresses - (eth0)
192.168.10.21 rac1vip
192.168.10.22 rac2vip
2、生成listener的cap文件,用于重建ocr后注册监听(也可以用后面的netca)
crs_stat -p ora.rac1.LISTENER_RAC1.lsnr > /oracle/backup/ora.rac1.LISTENER_RAC1.lsnr.cap
crs_stat -p ora.rac2.LISTENER_RAC2.lsnr > /oracle/backup/ora.rac2.LISTENER_RAC2.lsnr.cap
3、停掉所有的资源,备份ocr、votingdisk并重新格式化
crs_stop -all
crsctl stop crs
备份OCR:
[root@rac1 ~]# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 104216
Used space (kbytes) : 4640
Available space (kbytes) : 99576
ID : 1718671696
Device/File Name : /dev/raw/raw1
Device/File integrity check succeeded
Device/File not configured
Cluster registry integrity check succeeded

ocrconfig -export /oracle/backup/ocr_20100531.bak
[root@rac1 ~]# ocrconfig -export /oracle/backup/ocr_20100531.bak
备份votedisk:
[root@rac1 ~]# crsctl query css votedisk
0. 0 /dev/raw/raw2
located 1 votedisk(s).

破坏OCR,Voting磁盘
在两边用root执行:
/oracle/app/crs/install/rootdelete.sh
/oracle/app/crs/install/rootdeinstall.sh
[root@rac1 ~]# dd if=/dev/raw/raw2 f=/oracle/backup/votedisk_20100531.bak
208864+0 records in
208864+0 records out
106938368 bytes (107 MB) copied, 78.8653 seconds, 1.4 MB/s
[root@rac1 ~]#
[root@rac1 ~]# dd if=/dev/zero f=/dev/raw/raw2 bs=1024000 count=120
1+0 records in
1+0 records out
1024 bytes (1.0 kB) copied, 0.00235728 seconds, 434 kB/s
[root@rac1 ~]# dd if=/dev/zero f=/dev/raw/raw1 bs=1024000 count=120
1+0 records in
1+0 records out
1024 bytes (1.0 kB) copied, 0.0335442 seconds, 30.5 kB/s

在每个节点依次执行(root 用户):
如果是10.2.0.1 版本,在最后一个节点上执行的时候会因为静默vipca的bug抛出异常,在该节点上图形化
界面调用VIPCA。
/oracle/app/crs/root.sh
Checking to see if Oracle CRS stack is already configured
Setting the permissions on OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory '/oracle/app' is not owned by root
WARNING: directory '/oracle' is not owned by root
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :
node 1: rac1 rac1priv rac1
node 2: rac2 rac2priv rac2
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Now formatting voting device: /dev/raw/raw2
Format of 1 voting devic

相关主题
文本预览
相关文档 最新文档