ASM DISK HEADER CORRUPTION & REPAIR
In this article I will demonstrate how to corrupt the ASM DISK header and to repair it using kfed utility.
ASM metadata is stored in disk groups and each ASM disk has ASM metadata. ASM metadata block size is 4 KB (kfdhdb.blksize=4096).Typically first Allocation unit on every ASM disk will always have the disk header(block0).
Below are the detailed steps –
Step 1 – Backup the ASM metadata (first 2MB of disk – VOL1 )
$ dd if=/dev/oracleasm/disks/VOL1 of=/tmp/asmvol_bkp.dd bs=1M count=2
Step 2 – Corrupt the Disk header Metadata
· dd zero out the disk header metadata
$ dd if=/dev/zero of=/dev/oracleasm/disks/VOL1 bs=4096 count=1
1+0 records in
1+0 records out
4096 bytes (4.1 kB) copied, 3.8e-05 seconds, 108 MB/s
Step 3 - Check for damage to ASM disk header metadata ( Allocation unit # 0 , block # 0)
SQL> select DISK_NUMBER,HEADER_STATUS,substr(PATH,1,20),label from v$asm_disk;
DISK_NUMBER HEADER_STATUS PATH LABEL
----------- --------------------------------------------------------------------------
0 CANDIDATE ORCL:VOL1 VOL1
1 MEMBER ORCL:VOL2 VOL2
0 MEMBER ORCL:VOL3 VOL3
$ asmcmd lsdsk –p
Group_Num Disk_Num Incarn Mount_Stat Header_Stat Mode_Stat State Path
1 0 3607148357 CACHED CANDIDATE ONLINE NORMAL ORCL:VOL1
1 1 3607148358 CACHED MEMBER ONLINE NORMAL ORCL:VOL2
2 0 3607148368 CACHED MEMBER ONLINE NORMAL ORCL:VOL3
$ kfed read /dev/oracleasm/disks/VOL1 aun=0 blkn=0
kfbh.endian: 0 ; 0x000: 0x00
kfbh.hard: 0 ; 0x001: 0x00
kfbh.type: 0 ; 0x002: KFBTYP_INVALID
kfbh.datfmt: 0 ; 0x003: 0x00
kfbh.block.blk: 0 ; 0x004: T=0 NUMB=0x0
kfbh.block.obj: 0 ; 0x008: TYPE=0x0 NUMB=0x0
kfbh.check: 0 ; 0x00c: 0x00000000
kfbh.fcn.base: 0 ; 0x010: 0x00000000
kfbh.fcn.wrap: 0 ; 0x014: 0x00000000
kfbh.spare1: 0 ; 0x018: 0x00000000
kfbh.spare2: 0 ; 0x01c: 0x00000000
2B6BCD150400 00000000 00000000 00000000 00000000 [................]
Repeat 255 times
KFED-00322: Invalid content encountered during block traversal: [kfbtTraverseBlock][Invalid OSM block type][][0]
Note- Here If you see kfbh.type=KFBTYP_INVALID , then it indicates that ASM disk header is corrupted.Typically Valid ASM disk should have kfbh.type=KFBTYP_DISKHEAD (ASM disk header).
Step 4 - Check available Copy Of ASM DISK HEADER in disk.
· ASM contains the copy of ASM disk header in (Allocation unit# 1, Block# 254) of every ASM disk.
$ kfed read /dev/oracleasm/disks/VOL1 aun=1 blkn=254 |grep KFBTYP
kfbh.type: 1 ; 0x002: KFBTYP_DISKHEAD
Note - Here we can see that ASM disk “VOL1” has valid copy of ASM disk header.
Step 5 - Repair the ASM Disk Header
$ kfed repair /dev/oracleasm/disks/VOL1
Step 6 – Verify the ASM Disk Header Metadata
$ kfed read /dev/oracleasm/disks/VOL1 aun=0 blkn=0 | grep KFBTYP
kfbh.type: 1 ; 0x002: KFBTYP_DISKHEAD
SQL> select DISK_NUMBER,HEADER_STATUS,substr(PATH,1,20),label from v$asm_disk;
DISK_NUMBER HEADER_STATUS PATH LABEL
----------- ----------------------------------------------------------------------------
0 MEMBER ORCL:VOL1 VOL1
1 MEMBER ORCL:VOL2 VOL2
0 MEMBER ORCL:VOL3 VOL3
$ asmcmd lsdsk -p
Group_Num Disk_Num Incarn Mount_Stat Header_Stat Mode_Stat State Path
1 0 3607148357 CACHED MEMBER ONLINE NORMAL ORCL:VOL1
1 1 3607148358 CACHED MEMBER ONLINE NORMAL ORCL:VOL2
2 0 3607148368 CACHED MEMBER ONLINE NORMAL ORCL:VOL3
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/13750068/viewspace-1475438/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle ASM Disk HeaderOracleASMHeader
- ASM 翻譯系列第十彈:ASM Internal ASM DISK headerASMHeader
- RAC關鍵資訊(OCR/VOTE DISK/ASM DISK HEADER)備份ASMHeader
- oracle10g_asm_v$asm_disk之header_statusOracleASMHeader
- disk_repair_timeAI
- Oracle 使用BBED 檢視 ASM Disk Header 內容OracleASMHeader
- [翻譯]-Detect And Repair Corruption in an Oracle DatabaseAIOracleDatabase
- Oracle OCP IZ0-053 Q240(ASM DISK_REPAIR_TIME)OracleASMAI
- drop asm disk、撤銷drop asm diskASM
- 手工建立ASM Disk Groups、為 ASM Disk Groups 新增 diskASM
- Oracle RAC ASM disk header 備份 恢復 與 重建 示例說明OracleASMHeader
- Asm disk managerASM
- 11g Active Standby Database Automatic Block Corruption RepairDatabaseBloCAI
- script of check repair ASM DISKGROUPAIASM
- oracle 10.2.0.5 版本之後 asm disk header 自動備份機制OracleASMHeader
- Oracle ASM Disk DirectoryOracleASM
- Oracle ASM Disk PartnerOracleASM
- ASM Disk Group TemplateASM
- 10205以下需要使用kfed或者dd命令備份asm disk headerASMHeader
- ASM: Device is already labeled for ASM diskASMdev
- Oracle ASM spfile in a disk groupOracleASM
- Repair U Disk logo unvisiable in task bar on windows XPAIGoWindows
- IZ0-053 Q542(DISK_REPAIR_TIME)AI
- Oracle ASM Disk Used Space DirectoryOracleASM
- Oracle ASM ACFS disk group rebalanceOracleASM
- Oracle ASM Disk Group AttributesOracleASM
- ASM Normal需要3個disk ?ASMORM
- asm disk 的結構(1)ASM
- oracleasm createdisk ASM: Device is already labeled for ASM diskOracleASMdev
- Using ASMLIB Management ASM DiskASM
- [Oracle Script] ASM Disk Groups UsedOracleASM
- ASM磁碟組刪除DISK操作ASM
- Identify If A Disk/Part Is Still Used By ASM,Used by ASM Or Used by ASM_603210.1IDEASM
- 8198906-Segment header corruption if extent allocation operation is-1229669.1Header
- ASM 11g New Features - How ASM Disk Resync WorksASM
- Oracle ASM disk誤被格式化OracleASM
- V$ASM_DISK 檢視含義ASM
- Oracle OCP 1Z0 053 Q124(DISK_REPAIR_TIME)OracleAI