ora.cssd 起不来一般是voting disk数量不够,或者voting disk盘头损坏
ora.crsd 起不来一般是集群的配置信息损坏,ocr损坏
1.使用ocrconfig -showbackup确认ocr备份信息
#/opt/grid/products/12.1.0/bin/ocrconfig -showbackup
rac2 2015/08/16 05:41:40 /opt/grid/products/12.1.0/cdata/rac-cluster/backup00.ocr 0
rac2 2015/08/16 01:41:40 /opt/grid/products/12.1.0/cdata/rac-cluster/backup01.ocr 0
rac2 2015/08/15 21:41:39 /opt/grid/products/12.1.0/cdata/rac-cluster/backup02.ocr 0
rac2 2015/08/15 05:41:37 /opt/grid/products/12.1.0/cdata/rac-cluster/day.ocr 0
rac1 2015/08/03 18:36:46 /opt/grid/products/12.1.0/cdata/rac-cluster/week.ocr 0
PROT-25: Manual backups for the Oracle Cluster Registry are not available
2.停掉所有节点集群
crsctl stop crs -f
如果停不掉:
ps -elf | egrep "PID|d.bin|ohas|oraagent|orarootagent|cssdagent|cssdmonitor" | grep -v grep
ps -elf | egrep "d.bin|ohas|oraagent|orarootagent|cssdagent|cssdmonitor" | grep -v grep |awk '{print $4}' |xargs -n 10 kill -9
3.独占模式启动crs
crsctl start crs -excl -nocrs
会启动ASM实例,如果磁盘组都良好,也会挂载ASM DG
-excl 表示用独占模式启动CRS,不需要OCR和Voting disk。
-nocrs 表示不启动crsd.bin
-nocrs 表示不启动crsd.bin
ASMCMD> lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 4096 1048576 16384 10489 0 10489 0 N DG_DATA/
crsctl query css votedisk
Located 0 voting disk(s).
没有voting盘也可以起得来
crsctl stat res -t -init
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.asm
1 ONLINE ONLINE qc1 Started,STABLE
ora.cluster_interconnect.haip
1 ONLINE ONLINE qc1 STABLE
ora.crf
1 OFFLINE OFFLINE STABLE
ora.crsd
1 OFFLINE OFFLINE STABLE
ora.cssd
1 ONLINE ONLINE qc1 STABLE
ora.cssdmonitor
1 ONLINE ONLINE qc1 STABLE
ora.ctssd
1 ONLINE ONLINE qc1 ACTIVE:0,STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.drivers.acfs
1 ONLINE ONLINE qc1 STABLE
ora.evmd
1 ONLINE INTERMEDIATE qc1 STABLE
ora.gipcd
1 ONLINE ONLINE qc1 STABLE
ora.gpnpd
1 ONLINE ONLINE qc1 STABLE
ora.mdnsd
1 ONLINE ONLINE qc1 STABLE
ora.storage
1 OFFLINE OFFLINE STABLE
--------------------------------------------------------------------------------
CREATE DISKGROUP ocrtest normal REDUNDANCY
failgroup ocr1 disk
'/dev/asm-diskb'
failgroup ocr2 disk
'/dev/asm-diskc'
failgroup ocr3 disk
'/dev/asm-diskd'
attribute
'au_size'='1M',
'compatible.asm' = '12.1',
'compatible.rdbms' = '12.1';
Diskgroup created.
4.先修复ocr再修复voting disk
Diskgroup created.
4.先修复ocr再修复voting disk
cluvfy comp ocr -n all
ocrcheck
-----12C没有这个异常
#crsctl replace votedisk +ocrvote
CRS-4602: Failed 27 to add voting file 5a71f4b0868e4f8abfc4808566c5c7fa.
CRS-4602: Failed 27 to add voting file 66699f04c8a74f57bf08e0682294e449.
CRS-4602: Failed 27 to add voting file 7181a4d009884fecbff2cab4c69f2de2.
Failed to replace voting disk group with +ocrvote.
CRS-4000: Command Replace failed, or completed with errors.
SQL> show parameter disk
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
asm_diskgroups string
OCRVOTE
asm_diskstring string
SQL> alter system set asm_diskstring='/dev/qdata/*';
SQL> create spfile from memory;
System altered.
#crsctl replace votedisk +ocrvote
Successful addition of voting disk 05e07048c0b14f8dbffd4e78783dbd67.
Successful addition of voting disk b15b269bbdec4f61bf9843f707d37882.
Successful addition of voting disk 35b632b097584f09bff462e4b9340ea7.
Successfully replaced voting disk group with +ocrvote.
CRS-4266: Voting file(s) successfully replaced
-----12C没有这个异常
#crsctl replace votedisk +ocrvote
CRS-4602: Failed 27 to add voting file 5a71f4b0868e4f8abfc4808566c5c7fa.
CRS-4602: Failed 27 to add voting file 66699f04c8a74f57bf08e0682294e449.
CRS-4602: Failed 27 to add voting file 7181a4d009884fecbff2cab4c69f2de2.
Failed to replace voting disk group with +ocrvote.
CRS-4000: Command Replace failed, or completed with errors.
SQL> show parameter disk
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
asm_diskgroups string
OCRVOTE
asm_diskstring string
SQL> alter system set asm_diskstring='/dev/qdata/*';
SQL> create spfile from memory;
System altered.
#crsctl replace votedisk +ocrvote
Successful addition of voting disk 05e07048c0b14f8dbffd4e78783dbd67.
Successful addition of voting disk b15b269bbdec4f61bf9843f707d37882.
Successful addition of voting disk 35b632b097584f09bff462e4b9340ea7.
Successfully replaced voting disk group with +ocrvote.
CRS-4266: Voting file(s) successfully replaced
crsctl query css votedisk
5.关闭crs
crsctl stop crs -f
6.正常模式启动集群,每个节点执行
crsctl start crs
至此完事
手工备份ocr
ocrconfig -export /tmp/ocr.bak
ocrconfig -import file_name
ohasd
#vi /etc/init/oracle-ohasd.conf
# Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
#
# Oracle OHASD startup
start on runlevel [35]
stop on runlevel [!35]
respawn
exec /etc/init.d/init.ohasd run >/dev/null 2>&1 </dev/null
Oracle集群每4个小时自动备份一次。在任一时刻,Oracle集群总会保存3份备份文件。他们分别是最近4小时,最近1天和最近1周的备份文件。
#ocrconfig -showbackup
rac2 2015/08/16 05:41:40 /opt/grid/products/12.1.0/cdata/rac-cluster/backup00.ocr 0
rac2 2015/08/16 01:41:40 /opt/grid/products/12.1.0/cdata/rac-cluster/backup01.ocr 0
rac2 2015/08/15 21:41:39 /opt/grid/products/12.1.0/cdata/rac-cluster/backup02.ocr 0
rac2 2015/08/15 05:41:37 /opt/grid/products/12.1.0/cdata/rac-cluster/day.ocr 0
rac1 2015/08/03 18:36:46 /opt/grid/products/12.1.0/cdata/rac-cluster/week.ocr 0
PROT-25: Manual backups for the Oracle Cluster Registry are not available
[
root@qc1 ~]# kfed read /dev/asm-diskb | grep -E 'vfstart|vfend'
kfdhdb.vfstart: 192 ; 0x0ec: 0x000000c0
kfdhdb.vfend: 224 ; 0x0f0: 0x000000e0
[ root@qc1 ~]# kfed read /dev/asm-diskc | grep -E 'vfstart|vfend'
kfdhdb.vfstart: 192 ; 0x0ec: 0x000000c0
kfdhdb.vfend: 224 ; 0x0f0: 0x000000e0
[ root@qc1 ~]# kfed read /dev/asm-diskd | grep -E 'vfstart|vfend'
kfdhdb.vfstart: 192 ; 0x0ec: 0x000000c0
kfdhdb.vfend: 224 ; 0x0f0: 0x000000e0
[ root@qc1 ~]# kfed read /dev/asm-diske | grep -E 'vfstart|vfend'
kfdhdb.vfstart: 0 ; 0x0ec: 0x00000000
kfdhdb.vfend: 0 ; 0x0f0: 0x00000000
kfdhdb.vfstart: 192 ; 0x0ec: 0x000000c0
kfdhdb.vfend: 224 ; 0x0f0: 0x000000e0
[ root@qc1 ~]# kfed read /dev/asm-diskc | grep -E 'vfstart|vfend'
kfdhdb.vfstart: 192 ; 0x0ec: 0x000000c0
kfdhdb.vfend: 224 ; 0x0f0: 0x000000e0
[ root@qc1 ~]# kfed read /dev/asm-diskd | grep -E 'vfstart|vfend'
kfdhdb.vfstart: 192 ; 0x0ec: 0x000000c0
kfdhdb.vfend: 224 ; 0x0f0: 0x000000e0
[ root@qc1 ~]# kfed read /dev/asm-diske | grep -E 'vfstart|vfend'
kfdhdb.vfstart: 0 ; 0x0ec: 0x00000000
kfdhdb.vfend: 0 ; 0x0f0: 0x00000000
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22034023/viewspace-1784147/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/22034023/viewspace-1784147/