oracle 12c裡如何恢復votedisk

oliseh發表於2014-10-23

Oracle12c votedisk不能單獨的進行備份了,它的備份和ocr的備份放在了一起,用ocrconfig –showbackup可以看到當前存在的備份,下面模擬所有votedisk全部損壞的情況下如何恢復votedisk,若要在ocrvotedisk全部損壞的情況下恢復可以參照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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章