1. 检查votedisk和 ocr备份
[root@rh6rac1 bin]./ocrconfig -showbackup
rh6rac1     2019/03/19 16:57:40     /oracle/grid/cdata/rh6rac-cluster/backup00.ocr

rh6rac1     2019/03/19 12:57:40     /oracle/grid/cdata/rh6rac-cluster/backup01.ocr

rh6rac1     2019/03/19 08:57:40     /oracle/grid/cdata/rh6rac-cluster/backup02.ocr

rh6rac1     2019/03/18 00:57:38     /oracle/grid/cdata/rh6rac-cluster/day.ocr

rh6rac2     2019/03/13 04:13:03     /oracle/grid/cdata/rh6rac-cluster/week.ocr

[root@rh6rac1 bin]# ./crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   4621da78f6cb4f45bfc427515ba7d5fc (/dev/asm-diskb) [OCRVOTE]
Located 1 voting disk(s).

2. 彻底关闭所有节点上的clusterware ,OHASD
[root@rh6rac1 bin]#./crsctl stop has -f

使用dd 命令 破坏ocr和votedisk所在diskgroup
dd if=/dev/zero of=/dev/asm-diskb bs=1024k count=1

[root@rh6rac1 bin]# ./crsctl start has
CRS-4123: Oracle High Availability Services has been started.

root@rh6rac1 bin]# ./crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4530: Communications failure contacting Cluster Synchronization Services daemon
CRS-4534: Cannot communicate with Event Manager

alertrh6rac1.log
[/oracle/grid/bin/orarootagent.bin(3725)]CRS-5822:Agent '/oracle/grid/bin/orarootagent_root' disconnected from server. Details at (:CRSAGF00117
:) {0:5:903} in /oracle/grid/log/rh6rac1/agent/crsd/orarootagent_root//orarootagent_root.log.2019-03-19 17:10:20.811:
[ctssd(3174)]CRS-2405:The Cluster Time Synchronization Service on host rh6rac1 is shutdown by user
2019-03-19 17:10:20.830:
[mdnsd(2820)]CRS-5602:mDNS service stopping by request.
[client(15431)]CRS-10001:19-Mar-19 17:10 ACFS-9290: Waiting for ASM to shutdown.
2019-03-19 17:10:31.655:
[cssd(2915)]CRS-1603:CSSD on node rh6rac1 shutdown by user.
2019-03-19 17:10:31.762:
[ohasd(2230)]CRS-2767:Resource state recovery not attempted for 'ora.cssdmonitor' as its target state is OFFLINE
2019-03-19 17:10:31.857:
[cssd(2915)]CRS-1660:The CSS daemon shutdown has completed
2019-03-19 17:10:35.402:
[gpnpd(2841)]CRS-2329:GPNPD on node rh6rac1 shutdown.
2019-03-19 17:12:07.003:
[ohasd(16139)]CRS-2112:The OLR service started on node rh6rac1.
2019-03-19 17:12:07.013:
[ohasd(16139)]CRS-1301:Oracle High Availability Service started on node rh6rac1.
2019-03-19 17:12:07.014:
[ohasd(16139)]CRS-8017:location: /etc/oracle/lastgasp has 2 reboot advisory log files, 0 were announced and 0 errors occurred
2019-03-19 17:12:10.417:
[/oracle/grid/bin/orarootagent.bin(16241)]CRS-2302:Cannot get GPnP profile. Error CLSGPNP_NO_DAEMON (GPNPD daemon is not running).
2019-03-19 17:12:14.840:
[gpnpd(16359)]CRS-2328:GPNPD started on node rh6rac1.
2019-03-19 17:12:17.341:
[cssd(16429)]CRS-1713:CSSD daemon is started in clustered mode
2019-03-19 17:12:19.093:
[ohasd(16139)]CRS-2767:Resource state recovery not attempted for 'ora.diskmon' as its target state is OFFLINE
2019-03-19 17:12:25.937:
[cssd(16429)]CRS-1714:Unable to discover any voting files, retrying discovery in 15 seconds; Details at (:CSSNM00070:) in /oracle/grid/log/rh6r
ac1/cssd/ocssd.log2019-03-19 17:12:40.950:
[cssd(16429)]CRS-1714:Unable to discover any voting files, retrying discovery in 15 seconds; Details at (:CSSNM00070:) in /oracle/grid/log/rh6r
ac1/cssd/ocssd.log2019-03-19 17:12:55.959:
[cssd(16429)]CRS-1714:Unable to discover any voting files, retrying discovery in 15 seconds; Details at (:CSSNM00070:) in /oracle/grid/log/rh6r
ac1/cssd/ocssd.log2019-03-19 17:13:10.968:
[cssd(16429)]CRS-1714:Unable to discover any voting files, retrying discovery in 15 seconds; Details at (:CSSNM00070:) in /oracle/grid/log/rh6r
ac1/cssd/ocssd.log2019-03-19 17:13:25.976:
[cssd(16429)]CRS-1714:Unable to discover any voting files, retrying discovery in 15 seconds; Details at (:CSSNM00070:) in /oracle/grid/log/rh6r
ac1/cssd/ocssd.log

ocssd.log:
2019-03-19 17:14:56.025: [    CSSD][1181738752]clssnmReadDiscoveryProfile: voting file discovery string(/dev/asm*)
2019-03-19 17:14:56.025: [    CSSD][1181738752]clssnmvDDiscThread: using discovery string /dev/asm* for initial discovery
2019-03-19 17:14:56.025: [   SKGFD][1181738752]Discovery with str:/dev/asm*:

2019-03-19 17:14:56.025: [   SKGFD][1181738752]UFS discovery with :/dev/asm*:

2019-03-19 17:14:56.025: [   SKGFD][1181738752]Execute glob on the string /dev/asm*
2019-03-19 17:14:56.025: [   SKGFD][1181738752]running stat on disk:/dev/asm-diske
2019-03-19 17:14:56.026: [   SKGFD][1181738752]running stat on disk:/dev/asm-diskd
2019-03-19 17:14:56.026: [   SKGFD][1181738752]running stat on disk:/dev/asm-diskc
2019-03-19 17:14:56.027: [   SKGFD][1181738752]running stat on disk:/dev/asm-diskb
2019-03-19 17:14:56.027: [   SKGFD][1181738752]Fetching UFS disk :/dev/asm-diskb:

2019-03-19 17:14:56.027: [   SKGFD][1181738752]Fetching UFS disk :/dev/asm-diskc:

2019-03-19 17:14:56.027: [   SKGFD][1181738752]Fetching UFS disk :/dev/asm-diskd:

2019-03-19 17:14:56.027: [   SKGFD][1181738752]Fetching UFS disk :/dev/asm-diske:

2019-03-19 17:14:56.027: [   SKGFD][1181738752]OSS discovery with :/dev/asm*:

2019-03-19 17:14:56.027: [   SKGFD][1181738752]Handle 0x7fe334136b60 from lib :UFS:: for disk :/dev/asm-diskb:

2019-03-19 17:14:56.027: [   SKGFD][1181738752]Handle 0x7fe334130f60 from lib :UFS:: for disk :/dev/asm-diskc:

2019-03-19 17:14:56.028: [   SKGFD][1181738752]Handle 0x7fe334131790 from lib :UFS:: for disk :/dev/asm-diskd:

2019-03-19 17:14:56.028: [   SKGFD][1181738752]Handle 0x7fe33413f4a0 from lib :UFS:: for disk :/dev/asm-diske:

2019-03-19 17:14:56.028: [   SKGFD][1181738752]Lib :UFS:: closing handle 0x7fe334136b60 for disk :/dev/asm-diskb:

2019-03-19 17:14:56.028: [   SKGFD][1181738752]Lib :UFS:: closing handle 0x7fe334130f60 for disk :/dev/asm-diskc:

2019-03-19 17:14:56.028: [   SKGFD][1181738752]Lib :UFS:: closing handle 0x7fe334131790 for disk :/dev/asm-diskd:

2019-03-19 17:14:56.028: [   SKGFD][1181738752]Lib :UFS:: closing handle 0x7fe33413f4a0 for disk :/dev/asm-diske:

2019-03-19 17:14:56.028: [    CSSD][1181738752]clssnmvDiskVerify: Successful discovery of 0 disks
2019-03-19 17:14:56.028: [    CSSD][1181738752]clssnmCompleteInitVFDiscovery: Completing initial voting file discovery
2019-03-19 17:14:56.028: [    CSSD][1181738752]clssnmvFindInitialConfigs: No voting files found
2019-03-19 17:14:56.028: [    CSSD][1181738752](:CSSNM00070:)clssnmCompleteInitVFDiscovery: Voting file not found. Retrying discovery in 15 sec
onds

正式的恢复ocr和votedisk所在diskgroup的步骤如下:
清除grid所有进程。
1. 以-excl -nocrs 方式启动cluster,这将可以启动ASM实例 但不启动CRS

[root@rh6rac1 bin]# ./crsctl start crs -excl -nocrs
CRS-4123: Oracle High Availability Services has been started.
CRS-2672: Attempting to start 'ora.mdnsd' on 'rh6rac1'
CRS-2676: Start of 'ora.mdnsd' on 'rh6rac1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'rh6rac1'
CRS-2676: Start of 'ora.gpnpd' on 'rh6rac1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rh6rac1'
CRS-2672: Attempting to start 'ora.gipcd' on 'rh6rac1'
CRS-2676: Start of 'ora.cssdmonitor' on 'rh6rac1' succeeded
CRS-2676: Start of 'ora.gipcd' on 'rh6rac1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'rh6rac1'
CRS-2672: Attempting to start 'ora.diskmon' on 'rh6rac1'
CRS-2676: Start of 'ora.diskmon' on 'rh6rac1' succeeded
CRS-2676: Start of 'ora.cssd' on 'rh6rac1' succeeded
CRS-2672: Attempting to start 'ora.drivers.acfs' on 'rh6rac1'
CRS-2679: Attempting to clean 'ora.cluster_interconnect.haip' on 'rh6rac1'
CRS-2672: Attempting to start 'ora.ctssd' on 'rh6rac1'
CRS-2681: Clean of 'ora.cluster_interconnect.haip' on 'rh6rac1' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'rh6rac1'
CRS-2676: Start of 'ora.drivers.acfs' on 'rh6rac1' succeeded
CRS-2676: Start of 'ora.ctssd' on 'rh6rac1' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'rh6rac1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'rh6rac1'
CRS-2676: Start of 'ora.asm' on 'rh6rac1' succeeded

2.重建原ocr和votedisk所在diskgroup,注意compatible.asm必须是11.2
[root@rh6rac1 bin]# su - grid
[grid@rh6rac1 ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.4.0 Production on Tue Mar 19 17:29:39 2019

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL> create diskgroup OCRVOTE external redundancy disk '/dev/asm-diskb' ATTRIBUTE 'compatible.rdbms' = '11.2', 'compatible.asm' = '11.2';

Diskgroup created.

3.从ocr backup中恢复ocr并做ocrcheck检验:
[root@rh6rac1 bin]# ./ocrconfig -restore /oracle/grid/cdata/rh6rac-cluster/backup00.ocr
[root@rh6rac1 bin]#
[root@rh6rac1 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
     Version                  :          3
     Total space (kbytes)     :     262120
     Used space (kbytes)      :       3084
     Available space (kbytes) :     259036
     ID                       :  276343585
     Device/File Name         :   +OCRVOTE
                                    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 succeeded
    
4. 准备恢复votedisk ,可能会遇到下面的错误:
[root@rh6rac1 bin]# ./crsctl replace votedisk  +OCRVOTE
CRS-4602: Failed 27 to add voting file 942480699ad84f50bfbd253181a05ad1.
Failed to replace voting disk group with +OCRVOTE.
CRS-4000: Command Replace failed, or completed with errors.
需要重新配置一下ASM的参数,并重启ASM:
SQL> alter system set asm_diskstring='/dev/asm*';

System altered.
SQL> create pfile from memory;

File created.

SQL> startup force mount
ORA-32004: obsolete or deprecated parameter(s) specified for ASM instance
ASM instance started

Total System Global Area 1135747072 bytes
Fixed Size            2260728 bytes
Variable Size         1108320520 bytes
ASM Cache           25165824 bytes
ASM diskgroups mounted
ASM diskgroups volume enabled

[root@rh6rac1 bin]# ./crsctl replace votedisk  +OCRVOTE
Successful addition of voting disk 59835fcfdc874f55bfccc60a6be79ca4.
Successfully replaced voting disk group with +OCRVOTE.
CRS-4266: Voting file(s) successfully replaced

5. 重启has服务,检验cluster是否正常:
[root@rh6rac1 bin]# ./crsctl stop has -f
[root@rh6rac1 bin]# ./crsctl start has
CRS-4123: Oracle High Availability Services has been started.

[root@rh6rac1 bin]# ./crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online

[root@rh6rac1 bin]# ./crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   59835fcfdc874f55bfccc60a6be79ca4 (/dev/asm-diskb) [OCRVOTE]
Located 1 voting disk(s).

查看crs状态
./crsctl status res -t

ocr_vote disk损坏恢复的更多相关文章

  1. RAC 11gR2模拟OCR和Votedisk损坏恢复过程

    1)破坏前的ocr和votedisk信息检查 检查ocr自动备份 [root@rac1 ~]# ocrconfig -showbackup rac2 2013/10/13 09:45:30 /u01/ ...

  2. oracle redo日志文件损坏恢复

    参考:How to Recover from Loss Of Online Redo Log And ORA-312 And ORA-313 (Doc ID 117481.1) 在线重做日志文件丢失后 ...

  3. SqlServer索引页损坏恢复

    问题背景 运维操作失误,在没有正常关闭sqlserver的情况下,将服务器关闭了,重启后某些表损坏(应该是某些页损坏了,没有损坏的页还能访问到数据,但是访问损坏了的页就有问题),目前数据库只有4.20 ...

  4. oracle 操作实例(一)----redolog 损坏恢复

    一,实验前的准备 数据库全备保证自己没成功还能补救一下 vim full.sh export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACL ...

  5. 记数据库数据文件损坏恢复ORA-00376+ORA-01110

    现象:业务平台无法登陆,日志报错为ORACLE的错误. 查看oracle日志的报错, ORA-00376: file 5 cannot be read at this time ORA-01110: ...

  6. ORACLE 11.2.0.4 OCR VOTING DISK 模拟恢复场景

    ① 备份   ocrconfig -export 文件名   或者   ocrconfig -manualbackup   或者   找到备份      ocrconfig -local -showb ...

  7. Suse系统磁盘文件损坏恢复

    进入救援(failSafe)模式检测问题,发现是因为/dev/sda4分区出现文件系统损坏.   /dev/sda4: UNEXPECTED INCONSISTENCY: run fsck manua ...

  8. 11g r2 模拟OCR和voting disk不可用,完整恢复过程,以及一些注意事项

    环境:RHEL5.8 RAC 11.2.0.3.0 1:查看ORC和voting disk信息: In 11g Release 2 your voting disk data is automatic ...

  9. 11G RAC 中 OCR 及Voting Disk 相关操作

    一.启动oracle clusterware先决条件:Oracle High Availability Services daemon(OHASD)运行在所有集群节点上1.启动整个Oracle Clu ...

随机推荐

  1. PHP博大精深,入门容易,精通难,怎么才能真正学好PHP

    基础最重要  (1)熟悉HTML/CSS/JS等网页基本元素,完成阶段可自行制作完整的网页,对元素属性达到熟悉程度  (2)理解动态语言的概念,运做机制,熟悉PHP语法  (3)学习如何将PHP与HT ...

  2. 网赚app

    网赚app有很多目前来说做的比较好的赚的比较多的有四款推荐 宝石星球下载地址:http://www.baoshixingqiu.com/redPacket?key=548341 雪梨网APP下载地址 ...

  3. ORACLE11G R2 RAC的进程启动流程

    简要说明ORACLE11GR2 RAC的进程启动流程: 1.启动流程概览图: 二.RAC启动流程的梳理: 第一层:OHASD 启动:(OHASD派生) 1.CSSDAGENT负责启动CSSD的AGEN ...

  4. TP5对数据库操作的事物作用

    假如: 你写好了一段完整的代码,模型对数据库的操作,增删改查什么的,都没有问题,当然运行速度也是最快的,完全不用担心会出错, 前提肯定是已经写好的一整段代码, 但是,万一服务器中断了呢,执行一半,后面 ...

  5. 利用 SPICE 分析理解心电图前端中的右腿驱动

      [导读] 心电图(ECG)学是一门将心脏离子去极(ionic depolarization) 后转换为分析用可测量电信号的科学.模拟电子接口到电极/患者设计中最为常见的难题之一便是优化右腿驱动 ( ...

  6. hexdump

    一个十六进制格式化输出: #include <stdio.h> #include <stdlib.h> #include <string.h> void hexdu ...

  7. 记录一次axios请求造成的数组初始化失败

    axios请求是一个异步的请求,简单来讲就是在做其他事情的时候可以把这个先放一边等其他的事情做完后再来做这件事件. 我之前这样调用了一个方法: mounted() { this.first() thi ...

  8. ORACLE用户表空间使用情况查询

    1.查询用户使用的表空间: select username,default_tablespace,temporary_tablespace from dba_users where username ...

  9. c++中STL容器中的排序

    1.c++STL中只有list自带了排序函数: (1).若list中存放的是int类型或者string类型,直接利用sort即可: list <int> list1;           ...

  10. ubuntu 安装 pycharm

    添加源: $ sudo add-apt-repository ppa:mystic-mirage/pycharm   安装收费的专业版: $ sudo apt update $ sudo apt in ...