ITPub博客

首页 > Linux操作系统 > Linux操作系统 > OCR和VOTING DISK的MIRROR DISK的添加和删除及备份

OCR和VOTING DISK的MIRROR DISK的添加和删除及备份

原创 Linux操作系统 作者:oracle_ace 时间:2009-06-05 15:17:01 0 删除 编辑
一、添加OCR

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 ---> /var/opt/oracle/ocr.loc(solaris)
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 f=/orabackup/rora_vote_1

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

请登录后发表评论 登录
全部评论

注册时间:2007-12-10

  • 博文量
    284
  • 访问量
    798480