Dump ASM Disk Header

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

Dump ASM disk header

If you want to dump ASM disk header, you can use an Oracle internal tool to obta
in information about your disk, diskgroup etc. even if the disk is offline.
This tool is named KFED (Kernel File EDitor). It is fitted by default with an Or
acle 11g installation, but you ll need to build it if you want to use it with Ora
cle 10g :
[oracle@oel ~]$ make -f $ORACLE_HOME/rdbms/lib/ins_rdbms.mk ikfed
Well, now have a closer look to a feature of this tool.
If you want to read information stored on the ASM Disk header, you can use it li
ke this :
[oracle@oel ~]$ kfed read /dev/oracleasm/disks/ASM3 dsk1.dump
Now, you have in the dsk1.dump file the content of your ASM file header
leasm/disks/ASM3?. This file can be easily read by a text editor
kfbh.endian:
1
kfbh.hard:
130
kfbh.type:
1
kfbh.datfmt:
1
kfbh.block.blk:
0
kfbh.block.obj:
2147483648
kfbh.check:
2930000864
kfbh.fcn.base:
0
kfbh.fcn.wrap:
0
kfbh.spare1:
0
kfbh.spare2:
0
kfdhdb.driver.provstr:
ORCLDISKASM3
kfdhdb.driver.reserved[0]:
860705601
kfdhdb.driver.reserved[1]:
0
kfdhdb.driver.reserved[2]:
0
kfdhdb.driver.reserved[3]:
0
kfdhdb.driver.reserved[4]:
0
kfdhdb.driver.reserved[5]:
0
kfdhdb.compat:
186646528
kfdhdb.dsknum:
0
kfdhdb.grptyp:
2
kfdhdb.hdrsts:
3
kfdhdb.dskname:
MIRROR_DG_0000
kfdhdb.grpname:
MIRROR_DG
kfdhdb.fgname:
MIRROR_DG_0000
kfdhdb.capname:
kfdhdb.crestmp.hi:
32959021
R=0x7db
kfdhdb.crestmp.lo:
3500063744
NS=0x34
kfdhdb.mntstmp.hi:
32959382
AR=0x7db
kfdhdb.mntstmp.lo:
505578496
NS=0x7
kfdhdb.secsize:
512

;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;

0x000:
0x001:
0x002:
0x003:
0x004:
0x008:
0x00c:
0x010:
0x014:
0x018:
0x01c:
0x000:
0x008:
0x00c:
0x010:
0x014:
0x018:
0x01c:
0x020:
0x024:
0x026:
0x027:
0x028:
0x048:
0x068:
0x088:
0x0a8:

/dev/orac

0x01
0x82
KFBTYP_DISKHEAD
0x01
T=0 NUMB=0x0
TYPE=0x8 NUMB=0x0
0xaea443e0
0x00000000
0x00000000
0x00000000
0x00000000
length=12
0x334d5341
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x0b200000
0x0000
KFDGTP_NORMAL
KFDHDR_MEMBER
length=14
length=9
length=14
length=0
HOUR=0xd DAYS=0x11 MNTH=0xa YEA

; 0x0ac: USEC=0x0 MSEC=0x3af SECS=0x9 MI


; 0x0b0: HOUR=0x16 DAYS=0x1c MNTH=0xa YE
; 0x0b4: USEC=0x0 MSEC=0xa1 SECS=0x22 MI
; 0x0b8: 0x0200

kfdhdb.blksize:
kfdhdb.ausize:
kfdhdb.mfact:
kfdhdb.dsksize:
kfdhdb.pmcnt:
kfdhdb.fstlocn:
kfdhdb.altlocn:
kfdhdb.f1b1locn:
kfdhdb.redomirrors[0]:
kfdhdb.redomirrors[1]:
kfdhdb.redomirrors[2]:
kfdhdb.redomirrors[3]:

4096
1048576
113792
1019
2
1
2
2
0
0
0
0

;
;
;
;
;
;
;
;
;
;
;
;

0x0ba:
0x0bc:
0x0c0:
0x0c4:
0x0c8:
0x0cc:
0x0d0:
0x0d4:
0x0d8:
0x0da:
0x0dc:
0x0de:

0x1000
0x00100000
0x0001bc80
0x000003fb
0x00000002
0x00000001
0x00000002
0x00000002
0x0000
0x0000
0x0000
0x0000

Now, we can read some information about the file : on the structure kfdhdb , at the
offset 0048, and coded on 9 bytes, the name of the diskgroup which owns this ASM
disk file.
Most important information are detailed below :
* kfbh.endian: Endian used on this disk : 1 for little endian.
* kfdhdb.driver.provstr: Provision String used for ASM (which means in our case
: ORCL:DISKASM3)
* kfdhdb.grptyp: type of diskgroup the disk is attached to.
* kfdhdb.hdrsts: header status. Here, the disk is a member of the diskgroup.
* kfdhdb.dskname: disk name in the disk group
* kfdhdb.grpname: disk group name
* kfdhdb.fgname: failure group name which owns the disk
* kfdhdb.secsize: sector size
* kfdhdb.blksize: block size
* kfdhdb.ausize: allocation unit size
If you want to rename the diskgroup the disk belongs to, you can edit the dumpfi
le and use the merge command of KFED to apply changes to the disk header.
[oracle@oel ~]$ kfed merge /dev/oracleasm/disks/ASM3 text=dsk1.dump
Be careful when you use the merge command because, it seems the diskgroup name, or
disk name is coded with a fixed length, so if you change the name, and this one
is based on a 4 bytes word, rename it to a 4 bytes word.
Off course, using kfed is not supported by Oracle.

You might also like