ocr恢复测试

 

一般情况下ASM磁盘损坏的情况下,ocr才会损坏

下面是ocr的文件:

ASMCMD> ls

REGISTRY.255.826386259

ASMCMD> pwd

+data/dmsdb-scan/ocrfile

ASMCMD>

 

 

1 在两个节点都关闭服务

 

 

使用root用户进入目录/u01/11.2.0/grid/product/bin

 

执行如下命令

[root@dmsdb1 bin]# ./crsctl stop crs

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'dmsdb1'

CRS-2673: Attempting to stop 'ora.crsd' on 'dmsdb1'

CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'dmsdb1'

 

 

 

2 查看最近的备份

 

 

[root@dmsdb2 bin]# ./ocrconfig  -showbackup

 

 

dmsdb1     2013/09/30 14:18:36     /u01/11.2.0/grid/product/cdata/dmsdb-scan/backup00.ocr

 

dmsdb1     2013/09/30 10:18:35     /u01/11.2.0/grid/product/cdata/dmsdb-scan/backup01.ocr

 

dmsdb1     2013/09/30 06:18:35     /u01/11.2.0/grid/product/cdata/dmsdb-scan/backup02.ocr

 

dmsdb2     2200/01/01 06:20:36     /u01/11.2.0/grid/product/cdata/dmsdb-scan/day.ocr

 

dmsdb2     2200/01/01 06:20:36     /u01/11.2.0/grid/product/cdata/dmsdb-scan/week.ocr

 

dmsdb1     2013/09/30 14:46:30     /u01/11.2.0/grid/product/cdata/dmsdb-scan/backup_20130930_144630.ocr

 

 

3 启动数据库为独占模式

 

    [root@dmsdb1 bin]# ./crsctl start crs -excl -nocrs

CRS-4123: Oracle High Availability Services has been started.

CRS-2672: Attempting to start 'ora.mdnsd' on 'dmsdb1'

CRS-2676: Start of 'ora.mdnsd' on 'dmsdb1' succeeded

CRS-2672: Attempting to start 'ora.gpnpd' on 'dmsdb1'

CRS-2676: Start of 'ora.gpnpd' on 'dmsdb1' succeeded

CRS-2672: Attempting to start 'ora.cssdmonitor' on 'dmsdb1'

CRS-2672: Attempting to start 'ora.gipcd' on 'dmsdb1'

CRS-2676: Start of 'ora.cssdmonitor' on 'dmsdb1' succeeded

CRS-2676: Start of 'ora.gipcd' on 'dmsdb1' succeeded

CRS-2672: Attempting to start 'ora.cssd' on 'dmsdb1'

CRS-2672: Attempting to start 'ora.diskmon' on 'dmsdb1'

CRS-2676: Start of 'ora.diskmon' on 'dmsdb1' succeeded

CRS-2676: Start of 'ora.cssd' on 'dmsdb1' succeeded

CRS-2672: Attempting to start 'ora.drivers.acfs' on 'dmsdb1'

CRS-2679: Attempting to clean 'ora.cluster_interconnect.haip' on 'dmsdb1'

CRS-2672: Attempting to start 'ora.ctssd' on 'dmsdb1'

CRS-2681: Clean of 'ora.cluster_interconnect.haip' on 'dmsdb1' succeeded

CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'dmsdb1'

CRS-2676: Start of 'ora.drivers.acfs' on 'dmsdb1' succeeded

CRS-2676: Start of 'ora.ctssd' on 'dmsdb1' succeeded

CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'dmsdb1' succeeded

CRS-2672: Attempting to start 'ora.asm' on 'dmsdb1'

CRS-2676: Start of 'ora.asm' on 'dmsdb1' succeeded

 

 

4 恢复ocr

 

 

[root@dmsdb1 bin]# ./ocrconfig  -restore  /u01/11.2.0/grid/product/cdata/dmsdb-scan/backup_20130930_144630.ocr

 

注:恢复成功!

 

 

5 关闭服务(在节点1 操作)

 

 

[root@dmsdb1 bin]# ./crsctl stop crs

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'dmsdb1'

CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'dmsdb1'

CRS-2673: Attempting to stop 'ora.mdnsd' on 'dmsdb1'

CRS-2673: Attempting to stop 'ora.ctssd' on 'dmsdb1'

CRS-2673: Attempting to stop 'ora.asm' on 'dmsdb1'

CRS-2677: Stop of 'ora.mdnsd' on 'dmsdb1' succeeded

CRS-2677: Stop of 'ora.ctssd' on 'dmsdb1' succeeded

CRS-2677: Stop of 'ora.drivers.acfs' on 'dmsdb1' succeeded

CRS-2677: Stop of 'ora.asm' on 'dmsdb1' succeeded

CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'dmsdb1'

CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'dmsdb1' succeeded

CRS-2673: Attempting to stop 'ora.cssd' on 'dmsdb1'

CRS-2677: Stop of 'ora.cssd' on 'dmsdb1' succeeded

CRS-2673: Attempting to stop 'ora.gipcd' on 'dmsdb1'

CRS-2677: Stop of 'ora.gipcd' on 'dmsdb1' succeeded

CRS-2673: Attempting to stop 'ora.gpnpd' on 'dmsdb1'

CRS-2677: Stop of 'ora.gpnpd' on 'dmsdb1' succeeded

CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'dmsdb1' has completed

CRS-4133: Oracle High Availability Services has been stopped.

 

 

6 重启服务(在两节点中操作)

 

 

[root@dmsdb1 bin]# ./crsctl start crs

CRS-4123: Oracle High Availability Services has been started.

 

 

 

7查看恢复成功

 

[grid@dmsdb1 ~]$ ocrcheck

Status of Oracle Cluster Registry is as follows :

         Version                  :          3

         Total space (kbytes)     :     262120

         Used space (kbytes)      :       3064

         Available space (kbytes) :     259056

         ID                       : 1138657338

         Device/File Name         :      +DATA

                                    Device/File integrity check succeeded

 

                                    Device/File not configured

 

                                    Device/File not configured

 

                                    Device/File not configured

 

                                    Device/File not configured

 

         Cluster registry integrity check succeeded

 

         Logical corruption check bypassed due to non-privileged user

 

 

8 登录PL/SQL窗口

 

 

 

 

 

 

注:说明ocr恢复是成功的

 

9 查看ocr

 

ASMCMD> cd +data/dmsdb-scan/ocrfile

ASMCMD> ls

REGISTRY.255.826386259

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值