Oracle RAC备份和恢复Voting Disks
Oracle RAC备份和恢复Voting Disks
Oracle RAC 添加和删除Voting Disks参考:http://www.zzzyk.com/database/201303/195591.html
Oracle RAC 备份和恢复Voting Disks www.zzzyk.com
Voting Disks 文件不需要每天备份,一般在下面这几种情况下需要备份:
①:Clusterware安装之后。
②:集群中增加和删除节点之后。
③:执行Voting Disk的add或delete操作之后。
备份voting Disk示例:
环境:
[plain]
[oracle@node2 ~]$ uname -a
Linux node2 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:54 EDT 2009 i686 i686 i386 GNU/Linux
[plain]
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
1.查看当前的Voting Disks
[plain]
[oracle@node1 ~]$ crsctl query css votedisk
0. 0 /dev/raw/raw2
located 1 votedisk(s).
2.备份Voting Disk(用root)
[plain]
[root@node1 ~]# dd if=/dev/raw/raw2 of=/home/oracle/backup/votingdisk.bak
208864+0 records in
208864+0 records out
106938368 bytes (107 MB) copied, 150.378 seconds, 711 kB/s
3.检查备份
[plain]
[root@node1 backup]# ll
total 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损坏。
[plain]
[root@node1 bin]# dd if=/dev/urandom of=/dev/raw/raw2
154419+0 records in
154419+0 records out
79062528 bytes (79 MB) copied, 196.121 seconds, 403 kB/s
损坏后用./crsctl start crs无法启动crs。
2.恢复Voting Disk
[plain]
[root@node1 bin]# dd if=/home/oracle/backup/votingdisk.bak of=/dev/raw/raw2
208864+0 records in
208864+0 records out
106938368 bytes (107 MB) copied, 138.541 seconds, 772 kB/s
恢复后用./crsctl start crs正常启动crs