星期四, 6月 15, 2017

[轉載] ASM Disk Header 備份與還原

Ref:

--
1. dd備份恢復

備份表決磁片:
dd if=/dev/raw/raw3 of=/tmp/votedisk_lhr.bak bs=1024k count=4
恢復表決磁片:
dd if=/tmp/votedisk_lhr.bak of=/dev/raw/raw3 bs=1024k count=4

註:11g不推薦使用dd來進行備份恢復ASM Disk Header一般是前4K

2. kfed恢復ASM Disk Header

dd if=/dev/rhdisk2 of=/asm_rhdisk2_dd.bak bs=1024 count=4
dd if=/dev/zero of=/dev/rhdisk2 bs=1024 count=4
kfed repair /dev/rhdisk2
關於kfedkfodamdu的更多內容可以參考:http://blog.itpub.net/26736162/viewspace-1694198/

3. md_backupmd_restoreASM Disk Header (11g 以後可以透過md_backup方式來備份ASM disk header)


asmcmd md_backup /oracle/app/11.2.0/grid/cdata/ZFTPCCDB-crs/asm_md_backup.bak
asmcmd md_restore /oracle/app/11.2.0/grid/cdata/ZFTPCCDB-crs/asm_md_backup.bak


#坊間謠傳ASM Disk Header4K , 請在您的test environment實際測試過
dd if=/dev/rhdisk2 of=/asm_rhdisk2_dd.bak bs=1024k count=4
dd if=/dev/zero of=/dev/rhdisk2 bs=1024k count=4
crsctl stop has -f
crsctl start has
ASMCMD [+] > startup force nomount;
ASMCMD [+] > md_restore /asm_rhdisk2_dd.bak


ASMCMD [+] > md_backup /rman/asm_md.bak
dd if=/dev/zero  of=/dev/rhdisk2 bs=1024 count=4
crsctl stop has -f
crsctl start has
ASMCMD [+] > startup force nomount;
ASMCMD [+] > md_restore /rman/asm_md.bak


關於md_backupmd_restore更多內容可以參考:http://blog.itpub.net/26736162/viewspace-2121309/

沒有留言:

LinkWithin-相關文件

Related Posts Plugin for WordPress, Blogger...