查看当前表决磁盘文件列表
[grid@vmac1 ~]$ crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 458f802427764f59bfc6f6f356e74f5c (/dev/asm-diskb) [SYSDG]
2. ONLINE 07874cf03c834f01bf4b0c7c4e0da628 (/dev/asm-diskc) [SYSDG]
3. ONLINE 9725750dde764fa2bf88c892b884d457 (/dev/asm-diskd) [SYSDG]
Located 3 voting disk(s).
查看当前OCR
[grid@vmac1 ~]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3180
Available space (kbytes) : 258940
ID : 1340449286
Device/File Name : +SYSDG
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
手动备份:
[root@vmac1 ~]# /g01/app/grid/product/11.2.0/bin/ocrconfig -manualbackup
vmac2 2014/06/04 15:55:37 /g01/app/grid/product/11.2.0/cdata/vmac-cluster/backup_20140604_155537.ocr
vmac2 2014/06/04 15:55:22 /g01/app/grid/product/11.2.0/cdata/vmac-cluster/backup_20140604_155522.ocr
vmac1 2014/05/28 11:47:08 /g01/app/grid/product/11.2.0/cdata/vmac-cluster/backup_20140528_114708.ocr
vmac1 2014/05/28 11:45:59 /g01/app/grid/product/11.2.0/cdata/vmac-cluster/backup_20140528_114559.ocr
vmac1 2014/05/28 11:45:46 /g01/app/grid/product/11.2.0/cdata/vmac-cluster/backup_20140528_114546.ocr
清除表决磁盘和OCR的ASM磁盘组所有磁盘的头信息,模拟但磁盘组损坏
[root@vmac1 ~]# dd if=/dev/zero of=/dev/asm-diskc bs=1024 count=2000
2000+0 records in
2000+0 records out
2048000 bytes (2.0 MB) copied, 0.226621 s, 9.0 MB/s
[root@vmac1 ~]# dd if=/dev/zero of=/dev/asm-diskb bs=1024 count=2000
2000+0 records in
2000+0 records out
2048000 bytes (2.0 MB) copied, 0.206666 s, 9.9 MB/s
[root@vmac1 ~]# dd if=/dev/zero of=/dev/asm-diskd bs=1024 count=2000
2000+0 records in
2000+0 records out
2048000 bytes (2.0 MB) copied, 0.188636 s, 10.9 MB/s
以root 用户,以独占模式启动crs:
[root@vmac1 ~]# /g01/app/grid/product/11.2.0/bin/crsctl start crs -excl -nocrs
CRS-4123: Oracle High Availability Services has been started.
CRS-2672: Attempting to start 'ora.mdnsd' on 'vmac1'
CRS-2676: Start of 'ora.mdnsd' on 'vmac1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'vmac1'
CRS-2676: Start of 'ora.gpnpd' on 'vmac1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'vmac1'
CRS-2672: Attempting to start 'ora.gipcd' on 'vmac1'
CRS-2676: Start of 'ora.cssdmonitor' on 'vmac1' succeeded
CRS-2676: Start of 'ora.gipcd' on 'vmac1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'vmac1'
CRS-2672: Attempting to start 'ora.diskmon' on 'vmac1'
CRS-2676: Start of 'ora.diskmon' on 'vmac1' succeeded
CRS-2676: Start of 'ora.cssd' on 'vmac1' succeeded
CRS-2672: Attempting to start 'ora.drivers.acfs' on 'vmac1'
CRS-2679: Attempting to clean 'ora.cluster_interconnect.haip' on 'vmac1'
CRS-2672: Attempting to start 'ora.ctssd' on 'vmac1'
CRS-2681: Clean of 'ora.cluster_interconnect.haip' on 'vmac1' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'vmac1'
CRS-2676: Start of 'ora.ctssd' on 'vmac1' succeeded
CRS-2676: Start of 'ora.drivers.acfs' on 'vmac1' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'vmac1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'vmac1'
CRS-2676: Start of 'ora.asm' on 'vmac1' succeeded
[root@vmac1 ~]#
查看表决磁盘:
[root@vmac1 ~]# /g01/app/grid/product/11.2.0/bin/crsctl query css votedisk
Located 0 voting disk(s).
[root@vmac1 ~]# /g01/app/grid/product/11.2.0/bin/ocrcheck
PROT-602: Failed to retrieve data from the cluster registry
PROC-26: Error while accessing the physical storage
create diskgroup SYSDG normal redundancy
failgroup SYSDG_001 disk '/dev/asm-diskb'
failgroup SYSDG_002 disk '/dev/asm-diskc'
failgroup SYSDG_003 disk '/dev/asm-diskd'
attribute 'compatible.asm'='11.2.0.0.0';
SQL> select name,state from v$asm_diskgroup;
NAME STATE
------------------------------ -----------
SYSDG2 DISMOUNTED
DATADG DISMOUNTED
FLASHDG DISMOUNTED
SYSDG MOUNTED
[root@vmac1 bin]# /g01/app/grid/product/11.2.0/bin/crsctl replace votedisk +SYSDG
Oracle Cluster Registry initialization failed accessing Oracle Cluster Registry device: PROC-26: Error while accessing the physical storage
CRS-4000: Command Replace failed, or completed with errors.
[root@vmac1 bin]#
#### Possible OCR corruption.in $GI_HOME/log/crsd.log
正确的顺序应该是先restore ocr,然后再replace votedisk。
[root@vmac1 ~]# /g01/app/grid/product/11.2.0/bin/ocrconfig -showbackup manual
vmac1 2014/05/28 11:45:59 /g01/app/grid/product/11.2.0/cdata/vmac-cluster/backup_20140528_114559.ocr
vmac1 2014/05/28 11:45:46 /g01/app/grid/product/11.2.0/cdata/vmac-cluster/backup_20140528_114546.ocr
vmac1 2014/05/08 16:27:06 /g01/app/grid/product/11.2.0/cdata/vmac-cluster/backup_20140508_162706.ocr
vmac1 2014/05/08 16:26:51 /g01/app/grid/product/11.2.0/cdata/vmac-cluster/backup_20140508_162651.ocr
[root@vmac1 ~]#
[root@vmac1 ~]# /g01/app/grid/product/11.2.0/bin/ocrconfig -restore /g01/app/grid/product/11.2.0/cdata/vmac-cluster/backup_20140528_114708.ocr
[root@vmac1 ~]# /g01/app/grid/product/11.2.0/bin/crsctl replace votedisk +SYSDG
CRS-4602: Failed 27 to add voting file 835dae3dc74d4fd8bfd470b5ad675e05.
CRS-4602: Failed 27 to add voting file 79b5b5df0f754fa4bff4157c508d43df.
CRS-4602: Failed 27 to add voting file 03325c90c7a94fd9bf81f3b0eb971117.
Failed to replace voting disk group with +SYSDG.
CRS-4000: Command Replace failed, or completed with errors.
tail -f alertvmac1.log
[cssd(2622)]CRS-1638:Unable to locate voting file with ID 835dae3d-c74d4fd8-bfd470b5-ad675e05 that is being added to the list of configured voting files; details at (:CSSNM00027:) in /g01/app/grid/product/11.2.0/log/vmac1/cssd/ocssd.log
2014-06-05 16:40:20.107:
[cssd(2622)]CRS-1630:A configuration change request failed because not all the new voting files were discovered; Details at (:CSSNM00012:) in /g01/app/grid/product/11.2.0/log/vmac1/cssd/ocssd.log
SQL> show parameter disk;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
asm_diskgroups string
asm_diskstring string
SQL> alter system set asm_diskstring='/dev/asm*' ;
System altered.
SQL> select name,state from v$asm_diskgroup;
NAME STATE
------------------------------ -----------
DATADG DISMOUNTED
FLASHDG DISMOUNTED
SYSDG DISMOUNTED
SQL> alter diskgroup SYSDG mount;
Diskgroup altered.
SQL> select name,state from v$asm_diskgroup;
NAME STATE
------------------------------ -----------
DATADG DISMOUNTED
FLASHDG DISMOUNTED
SYSDG MOUNTED
[root@vmac1 ~]# /g01/app/grid/product/11.2.0/bin/crsctl replace votedisk +SYSDG
Successful addition of voting disk ac10ac62ec754f84bfac17b1484fc32f.
Successful addition of voting disk 5c459de6405f4f04bf67afb1d57e41f3.
Successful addition of voting disk 73107787ec7c4f11bf9e205e7df6eb5a.
Successfully replaced voting disk group with +SYSDG.
CRS-4266: Voting file(s) successfully replaced
[root@vmac1 ~]#
[root@vmac1 ~]# /g01/app/grid/product/11.2.0/bin/crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE ac10ac62ec754f84bfac17b1484fc32f (/dev/asm-diskb) [SYSDG]
2. ONLINE 5c459de6405f4f04bf67afb1d57e41f3 (/dev/asm-diskc) [SYSDG]
3. ONLINE 73107787ec7c4f11bf9e205e7df6eb5a (/dev/asm-diskd) [SYSDG]
Located 3 voting disk(s).
/g01/app/grid/product/11.2.0/bin/crsctl stop crs -f
ref:
http://blog.itpub.net/23135684/viewspace-748816
http://blog.csdn.net/bamuta/article/details/9493703
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27036311/viewspace-1176445/,如需转载,请注明出处,否则将追究法律责任。