Oracle RAC 备份和恢复Voting Disks(10g)

来源:互联网 发布:东软数据库安全审计 编辑:程序博客网 时间:2024/06/07 06:45

Oracle RAC 添加和删除Voting Disks参考:http://blog.csdn.net/laoshangxyc/article/details/8674924


Oracle RAC 备份和恢复Voting Disks

Voting Disks 文件不需要每天备份,一般在下面这几种情况下需要备份:

①:Clusterware安装之后。

②:集群中增加和删除节点之后。

③:执行Voting Disk的add或delete操作之后。


备份voting Disk示例:

环境:

[oracle@node2 ~]$ uname -aLinux node2 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:54 EDT 2009 i686 i686 i386 GNU/Linux
SQL> select * from v$version;BANNER----------------------------------------------------------------Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - ProdPL/SQL Release 10.2.0.1.0 - ProductionCORE    10.2.0.1.0      ProductionTNS for Linux: Version 10.2.0.1.0 - ProductionNLSRTL Version 10.2.0.1.0 - Production

1.查看当前的Voting Disks

[oracle@node1 ~]$ crsctl query  css votedisk 0.     0    /dev/raw/raw2located 1 votedisk(s).

2.备份Voting Disk(用root)

[root@node1 ~]# dd if=/dev/raw/raw2 of=/home/oracle/backup/votingdisk.bak208864+0 records in208864+0 records out106938368 bytes (107 MB) copied, 150.378 seconds, 711 kB/s

3.检查备份

[root@node1 backup]# lltotal 104540-rw-r--r-- 1 root root 106938368 Mar 13 21:29 votingdisk.bak

如果Voting Disk的内容没有改变,则可用此备份文件恢复。


恢复Voting Disk示例:

1.停掉crs(./crsctl stop crs),销毁数据模拟,Voting Disk损坏。

[root@node1 bin]# dd if=/dev/urandom of=/dev/raw/raw2154419+0 records in154419+0 records out79062528 bytes (79 MB) copied, 196.121 seconds, 403 kB/s
损坏后用./crsctl start crs无法启动crs。

2.恢复Voting Disk

[root@node1 bin]# dd if=/home/oracle/backup/votingdisk.bak of=/dev/raw/raw2208864+0 records in208864+0 records out106938368 bytes (107 MB) copied, 138.541 seconds, 772 kB/s
恢复后用./crsctl start crs正常启动crs

原创粉丝点击