打杂
全部博文(524)
分类: Oracle
2014-11-21 09:38:44
1) 停止crs,分别在所有节点执行
# /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
2) 导出ocr数据
# /u01/app/oracle/product/10.2.0/crs_1/bin/ocrconfig -export /tmp/ocr.bak
3) 编辑ora.loc文件,增加镜像ocrmirrorconfig_loc,所有需要增加ocr文件的节点都需要执行该操作
# vi /etc/oracle/ocr.loc
ocrconfig_loc=/ocfs/clusterware/ocr
ocrmirrorconfig_loc=/ocfs/clusterware/ocr2
local_only=FALSE
4) 导入ocr数据
# /u01/app/oracle/product/10.2.0/crs_1/bin/ocrconfig -import /tmp/ocr.bak
5) 检查添加后的结果
# /u01/app/oracle/product/10.2.0/crs_1/bin/ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 262144
Used space (kbytes) : 3824
Available space (kbytes) : 258320
ID : 93257176
Device/File Name : /ocfs/clusterware/ocr
Device/File integrity check succeeded
Device/File Name : /ocfs/clusterware/ocr2
Device/File integrity check succeeded
Cluster registry integrity check succeeded
6) 启动crs,可以用crsctl start crs
7) 检查crs状态crsctl check crs
备份,ocr是oracle自动备份每4小时一次:
Ocrconfig –showbackup
二、删除mirror比较简单,关闭crs,去掉/注释掉ocrmirrorconfig_loc这行,然后删除相应的设备/文件就可以了。
三、添加Voting Disk
1) 查看crs状态
# /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy
# /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl query css votedisk
0. 0 /ocfs/clusterware/votingdisk
located 1 votedisk(s).
2) 添加votedisk
# /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl add css votedisk /ocfs/clusterware/votingdisk2 -force
Now formatting voting disk: /ocfs/clusterware/votingdisk2
successful addition of votedisk /ocfs/clusterware/votingdisk2.
# /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl query css votedisk
0. 0 /ocfs/clusterware/votingdisk
1. 0 /ocfs/clusterware/votingdisk2
located 2 votedisk(s).
四、voting disk 的删除,同上,同样需要 -force参数
# /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl delete css votedisk /ocfs/clusterware/votingdisk2 -force
successful deletion of votedisk /ocfs/clusterware/votingdisk2.
平时备份VD,可直接dd完成。
$ dd if=/dev/vg01/rora_vote of=/orabackup/rora_vote_1