龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > 数据库类 > Oracle 技术 >

解析OCR与Voting Disk以及其管理(1)(3)

时间:2011-04-12 23:18来源:未知 作者:admin 点击:
分享到:
备份、恢复Voting Disk: [root@rhel1bin]#./crsctlcheckcrs Failure1contactingCSSdaemon CannotcommunicatewithCRS CannotcommunicatewithEVM [root@rhel1bin]#dd if =/u01/ocfs2fs/vdisk f =/home/oracle/v

备份、恢复Voting Disk:

  1. [root@rhel1 bin]#./crsctl check crs  
  2.  
  3. Failure 1 contacting CSS daemon  
  4.  
  5. Cannot communicate with CRS  
  6.  
  7. Cannot communicate with EVM  
  8.  
  9. [root@rhel1 bin]# dd if=/u01/ocfs2fs/vdisk f=/home/oracle/vdisk_bak //备份,ocfs2也可直接copy  
  10.  
  11. 20000+0 records in   
  12.  
  13. 20000+0 records out   
  14.  
  15. 10240000 bytes (10 MB) copied, 0.301106 seconds, 34.0 MB/s  
  16.  
  17. [root@rhel1 bin]# rm -rf /u01/ocfs2fs/vdisk  
  18.  
  19. [root@rhel1 bin]#dd if=/home/oracle/vdisk_bak f=/u01/ocfs2fs/vdisk //恢复,ocfs2也可直接copy  
  20.  
  21. 20000+0 records in  
  22.  
  23. 20000+0 records out  
  24.  
  25. 10240000 bytes (10 MB) copied, 0.173678 seconds, 59.0 MB/s  
  26.  
  27. [root@rhel1 bin]# chown oracle:oinstall /u01/ocfs2fs/vdisk  
  28.  
  29. [root@rhel1 bin]# chmod 775 /u01/ocfs2fs/vdisk   
  30.  
  31. [root@rhel1 bin]#/etc/init.d/init.crs start   
  32.  
  33. Startup will be queued to init within 30 seconds.   
  34.  
  35. [root@rhel1 bin]#./crsctl check crs   
  36.  
  37. CSS appears healthy   
  38.  
  39. CRS appears healthy   
  40.  
  41. EVM appears healthy 

备份、恢复OCR:

  1. [root@rhel1 bin]# ./crsctl stop crs   
  2.  
  3. Stopping resources. This could take several minutes.   
  4.  
  5. Successfully stopped CRS resources.   
  6.  
  7. Stopping CSSD.   
  8.  
  9. Shutting down CSS daemon.   
  10.  
  11. Shutdown request successfully issued.   
  12.  
  13. [root@rhel1 bin]# cat /etc/oracle/ocr.loc   
  14.  
  15. #Device/file /u01/ocfs2fs/ocr2 being deleted   
  16.  
  17. ocrconfig_loc=/u01/ocfs2fs/ocr   
  18.  
  19. local_only=false   
  20.  
  21. [root@rhel1 bin]# mv /u01/ocfs2fs/ocr /u01/ocfs2fs/ocr_bak   
  22.  
  23. [root@rhel1 crs_1]# cd cdata   
  24.  
  25. [root@rhel1 cdata]# cd crs   
  26.  
  27. [root@rhel1 crs]# ll   
  28.  
  29. total 23144   
  30.  
  31. -rwxrwxr-x 1 oracle dba 3514368 Mar 1 11:00 13968559   
  32.  
  33. -rwxrwxr-x 1 oracle dba 3514368 Mar 1 07:00 33426182   
  34.  
  35. -rw-r--r-- 1 root root 3182592 Mar 8 15:17 34809936   
  36.  
  37. -rwxrwxr-x 1 oracle dba 3514368 Feb 27 09:38 backup00.ocr   
  38.  
  39. -rwxrwxr-x 1 oracle dba 3514368 Feb 8 06:02 backup01.ocr   
  40.  
  41. -rwxrwxr-x 1 oracle dba 2142208 Nov 8 19:25 backup02.ocr   
  42.  
  43. -rwxrwxr-x 1 oracle dba 2142208 Nov 8 19:25 day.ocr   
  44.  
  45. -rwxrwxr-x 1 oracle dba 2142208 Nov 8 19:25 week.ocr   
  46.  
  47. [root@rhel1 crs]# cd ../../bin   
  48.  
  49. [root@rhel1 bin]# ./ocrconfig -restore /u01/app/oracle/crs_1/cdata/crs/backup02.ocr   
  50.  
  51. PROT-16: Internal Error   
  52.  
  53. [root@rhel1 bin]#touch /u01/ocfs2fs/ocr   
  54.  
  55. [root@rhel1 bin]#./ocrconfig -restore /u01/app/oracle/crs_1/cdata/crs/backup02.ocr   
  56.  
  57. [root@rhel1 bin]# ./crsctl start crs   
  58.  
  59. Attempting to start CRS stack   
  60.  
  61. The CRS stack will be started shortly   
  62.  
  63. [root@rhel1 bin]# ./crsctl check crs   
  64.  
  65. CSS appears healthy   
  66.  
  67. CRS appears healthy   
  68.  
  69. EVM appears healthy 

查看和改变自动备份目录的命令如下:

./ocrconfig -showbackup //查看自动备份。

./ocrconfig -backuploc //改变自动备份目录。

收藏文章
表情删除后不可恢复,是否删除
取消
确定
图片正在上传,请稍后...
评论内容为空!
还没有评论,快来抢沙发吧!

热评话题

按钮 内容不能为空!
立刻说两句吧! 查看0条评论
精彩图集

赞助商链接