解析OCR与Voting Disk以及其管理(1)(3)
备份、恢复Voting Disk: [root@rhel1bin]#./crsctlcheckcrs Failure1contactingCSSdaemon CannotcommunicatewithCRS CannotcommunicatewithEVM [root@rhel1bin]#dd if =/u01/ocfs2fs/vdisk f =/home/oracle/v
备份、恢复Voting Disk:
- [root@rhel1 bin]#./crsctl check crs
- Failure 1 contacting CSS daemon
- Cannot communicate with CRS
- Cannot communicate with EVM
- [root@rhel1 bin]# dd if=/u01/ocfs2fs/vdisk f=/home/oracle/vdisk_bak //备份,ocfs2也可直接copy
- 20000+0 records in
- 20000+0 records out
- 10240000 bytes (10 MB) copied, 0.301106 seconds, 34.0 MB/s
- [root@rhel1 bin]# rm -rf /u01/ocfs2fs/vdisk
- [root@rhel1 bin]#dd if=/home/oracle/vdisk_bak f=/u01/ocfs2fs/vdisk //恢复,ocfs2也可直接copy
- 20000+0 records in
- 20000+0 records out
- 10240000 bytes (10 MB) copied, 0.173678 seconds, 59.0 MB/s
- [root@rhel1 bin]# chown oracle:oinstall /u01/ocfs2fs/vdisk
- [root@rhel1 bin]# chmod 775 /u01/ocfs2fs/vdisk
- [root@rhel1 bin]#/etc/init.d/init.crs start
- Startup will be queued to init within 30 seconds.
- [root@rhel1 bin]#./crsctl check crs
- CSS appears healthy
- CRS appears healthy
- EVM appears healthy
备份、恢复OCR:
- [root@rhel1 bin]# ./crsctl stop crs
- Stopping resources. This could take several minutes.
- Successfully stopped CRS resources.
- Stopping CSSD.
- Shutting down CSS daemon.
- Shutdown request successfully issued.
- [root@rhel1 bin]# cat /etc/oracle/ocr.loc
- #Device/file /u01/ocfs2fs/ocr2 being deleted
- ocrconfig_loc=/u01/ocfs2fs/ocr
- local_only=false
- [root@rhel1 bin]# mv /u01/ocfs2fs/ocr /u01/ocfs2fs/ocr_bak
- [root@rhel1 crs_1]# cd cdata
- [root@rhel1 cdata]# cd crs
- [root@rhel1 crs]# ll
- total 23144
- -rwxrwxr-x 1 oracle dba 3514368 Mar 1 11:00 13968559
- -rwxrwxr-x 1 oracle dba 3514368 Mar 1 07:00 33426182
- -rw-r--r-- 1 root root 3182592 Mar 8 15:17 34809936
- -rwxrwxr-x 1 oracle dba 3514368 Feb 27 09:38 backup00.ocr
- -rwxrwxr-x 1 oracle dba 3514368 Feb 8 06:02 backup01.ocr
- -rwxrwxr-x 1 oracle dba 2142208 Nov 8 19:25 backup02.ocr
- -rwxrwxr-x 1 oracle dba 2142208 Nov 8 19:25 day.ocr
- -rwxrwxr-x 1 oracle dba 2142208 Nov 8 19:25 week.ocr
- [root@rhel1 crs]# cd ../../bin
- [root@rhel1 bin]# ./ocrconfig -restore /u01/app/oracle/crs_1/cdata/crs/backup02.ocr
- PROT-16: Internal Error
- [root@rhel1 bin]#touch /u01/ocfs2fs/ocr
- [root@rhel1 bin]#./ocrconfig -restore /u01/app/oracle/crs_1/cdata/crs/backup02.ocr
- [root@rhel1 bin]# ./crsctl start crs
- Attempting to start CRS stack
- The CRS stack will be started shortly
- [root@rhel1 bin]# ./crsctl check crs
- CSS appears healthy
- CRS appears healthy
- EVM appears healthy
查看和改变自动备份目录的命令如下:
./ocrconfig -showbackup //查看自动备份。
./ocrconfig -backuploc
精彩图集
精彩文章