Oracle12c 里votedisk不能单独的进行备份了,它的备份和ocr的备份放在了一起,用ocrconfig –showbackup可以看到当前存在的备份,下面模拟所有votedisk全部损坏的情况下如何恢复votedisk,若要在ocr和votedisk全部损坏的情况下恢复可以参照MOS 1383888.1-How to start CRS stack when having missing disks from diskgroup storing voting disk:
损坏前的状态:
grid@ora12c2:/home/grid>crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 1ad25b7075e74f15bf49a25f7a5303bb (/dev/asm-diskk) [DATADG2]
2. ONLINE d99e5f80de344f4dbfc28f80352a4c5f (/dev/asm-diskl) [DATADG2]
3. ONLINE f188b70c561f4f4dbf0ab2ce30e741d9 (/dev/asm-diskm) [DATADG2]
Located 3 voting disk(s).
破坏votedisk:
root@ora12c2:/root>dd if=/dev/zero of=/dev/asm-diskk bs=1M count=200
200+0 records in
200+0 records out
209715200 bytes (210 MB) copied, 2.35354 s, 89.1 MB/s
root@ora12c2:/root>dd if=/dev/zero of=/dev/asm-diskl bs=1M count=200
200+0 records in
200+0 records out
209715200 bytes (210 MB) copied, 2.60946 s, 80.4 MB/s
root@ora12c2:/root>dd if=/dev/zero of=/dev/asm-diskm bs=1M count=200
200+0 records in
200+0 records out
209715200 bytes (210 MB) copied, 2.54389 s, 82.4 MB/s
连接入ASM instance,修改asm_diskgroups中去掉已经损坏的datadg2,否则后面crsctl start crs会启动不了:
SQL> show parameter diskgroup
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
asm_diskgroups string DATADG1, DATADG2
SQL> alter system set asm_diskgroups=DATADG1;
System altered.
以exclusive方式重新启动crs,改启动方式不启动votedisk
root@ora12c2:/root>crsctl stop crs
root@ora12c2:/root>crsctl start crs -excl
CRS-4123: Oracle High Availability Services has been started.
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'ora12c2'
CRS-2677: Stop of 'ora.drivers.acfs' on 'ora12c2' succeeded
CRS-2672: Attempting to start 'ora.evmd' on 'ora12c2'
CRS-2672: Attempting to start 'ora.mdnsd' on 'ora12c2'
CRS-2676: Start of 'ora.mdnsd' on 'ora12c2' succeeded
CRS-2676: Start of 'ora.evmd' on 'ora12c2' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'ora12c2'
CRS-2676: Start of 'ora.gpnpd' on 'ora12c2' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'ora12c2'
CRS-2672: Attempting to start 'ora.gipcd' on 'ora12c2'
CRS-2676: Start of 'ora.cssdmonitor' on 'ora12c2' succeeded
CRS-2676: Start of 'ora.gipcd' on 'ora12c2' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'ora12c2'
CRS-2672: Attempting to start 'ora.diskmon' on 'ora12c2'
CRS-2676: Start of 'ora.diskmon' on 'ora12c2' succeeded
CRS-2676: Start of 'ora.cssd' on 'ora12c2' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'ora12c2'
CRS-2672: Attempting to start 'ora.drivers.acfs' on 'ora12c2'
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'ora12c2'
CRS-2676: Start of 'ora.drivers.acfs' on 'ora12c2' succeeded
CRS-2676: Start of 'ora.ctssd' on 'ora12c2' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'ora12c2' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'ora12c2'
CRS-2676: Start of 'ora.asm' on 'ora12c2' succeeded
CRS-2672: Attempting to start 'ora.storage' on 'ora12c2'
CRS-2676: Start of 'ora.storage' on 'ora12c2' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'ora12c2'
CRS-2676: Start of 'ora.crsd' on 'ora12c2' succeeded
grid@ora12c2:/home/grid>crsctl status res -init -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.asm
1 ONLINE ONLINE ora12c2 STABLE
ora.cluster_interconnect.haip
1 ONLINE ONLINE ora12c2 STABLE
ora.crsd
1 ONLINE INTERMEDIATE ora12c2 EXCLUSIVE,STABLE
ora.cssd
1 ONLINE ONLINE ora12c2 STABLE
ora.cssdmonitor
1 ONLINE ONLINE ora12c2 STABLE
ora.ctssd
1 ONLINE ONLINE ora12c2 OBSERVER,STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.drivers.acfs
1 ONLINE ONLINE ora12c2 STABLE
ora.evmd
1 ONLINE INTERMEDIATE ora12c2 STABLE
ora.gipcd
1 ONLINE ONLINE ora12c2 STABLE
ora.gpnpd
1 ONLINE ONLINE ora12c2 STABLE
ora.mdnsd
1 ONLINE ONLINE ora12c2 STABLE
ora.storage
1 ONLINE ONLINE ora12c2 STABLE
--------------------------------------------------------------------------------
创建磁盘组,指定votedisk创建在磁盘组上
SQL> create diskgroup datadg2 normal redundancy disk '/dev/asm-diskk','/dev/asm-diskl','/dev/asm-diskm' attribute 'compatible.asm'='11.2.0.0.0';
Diskgroup created.
grid@ora12c1:/home/grid>crsctl replace votedisk +datadg2
Successful addition of voting disk 2b88fc63069d4fbdbf40fbf37896bece.
Successful addition of voting disk 14856a5958db4f06bf128fdb8df8aba7.
Successful addition of voting disk 0b7908200bae4f3dbf936b7ea8276898.
Successfully replaced voting disk group with +datadg2.
CRS-4266: Voting file(s) successfully replaced
grid@ora12c1:/home/grid>crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 2b88fc63069d4fbdbf40fbf37896bece (/dev/asm-diskk) [DATADG2]
2. ONLINE 14856a5958db4f06bf128fdb8df8aba7 (/dev/asm-diskl) [DATADG2]
3. ONLINE 0b7908200bae4f3dbf936b7ea8276898 (/dev/asm-diskm) [DATADG2]
Located 3 voting disk(s).
最后crsctl stop crs-> crsctl start crs生效
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/53956/viewspace-1308461/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/53956/viewspace-1308461/