【Oracle ASM Metadata】Template Directory (file #5)中存放的是template directory 模板目录,template directory 模板目录提供 对现有文件组的属性信息,当ASM文件被创建出来时将应用这些属性。
每一个template directory元数据块均由template directory记录的队列组成。
由于template模板的数量一般很少,也仅在ASM 文件创建时被使用,所以该模板目录中的记录是无序存放。同时解析一个模板名则要求对该目录的全扫描。
当一个diskgroup被创建出来,就会有几个SYSTEM系统template模板被自动创建,每一个系统模板对应一种ORACLE文件类型。 系统模板为ORACLE文件类型定义默认属性,在之后可以修改以满足用户需求。
除了系统模板外, 还可以有用户创建模板。以进一步客制化各文件创建后的属性。
SQL> SELECT xnum_kffxp "Extent", au_kffxp "AU", disk_kffxp "Disk" from x$kffxp
2 WHERE group_kffxp=1 and number_kffxp=5
3 and xnum_kffxp <> 2147483648;
Extent AU Disk
---------- ---------- ----------
0 4 12
0 2 14
0 2 9
SQL> select path ,disk_number from v$asm_disk where disk_number=12;
PATH
--------------------------------------------------------------------------------
DISK_NUMBER
-----------
/oracleasm/asm-disk13
12
[oracle@mlab2 ~]$ kfed read /oracleasm/asm-disk13 aus=4194304 aun=4 blkn=0|less
kfbh.endian: 1 ; 0x000: 0x01
kfbh.hard: 130 ; 0x001: 0x82
kfbh.type: 10 ; 0x002: KFBTYP_TMPLTDIR
kfbh.datfmt: 1 ; 0x003: 0x01
kfbh.block.blk: 0 ; 0x004: blk=0
kfbh.block.obj: 5 ; 0x008: file=5
kfbh.check: 17465861 ; 0x00c: 0x010a8205
kfbh.fcn.base: 0 ; 0x010: 0x00000000
kfbh.fcn.wrap: 0 ; 0x014: 0x00000000
kfbh.spare1: 0 ; 0x018: 0x00000000
kfbh.spare2: 0 ; 0x01c: 0x00000000
kffdnd.bnode.incarn: 1 ; 0x000: A=1 NUMM=0x0
kffdnd.bnode.frlist.number: 4294967295 ; 0x004: 0xffffffff
kffdnd.bnode.frlist.incarn: 0 ; 0x008: A=0 NUMM=0x0
kffdnd.overfl.number: 4294967295 ; 0x00c: 0xffffffff
kffdnd.overfl.incarn: 0 ; 0x010: A=0 NUMM=0x0
kffdnd.parent.number: 0 ; 0x014: 0x00000000
kffdnd.parent.incarn: 1 ; 0x018: A=1 NUMM=0x0
kffdnd.fstblk.number: 0 ; 0x01c: 0x00000000
kffdnd.fstblk.incarn: 1 ; 0x020: A=1 NUMM=0x0
kftmde[0].entry.incarn: 0 ; 0x024: A=0 NUMM=0x0
kftmde[0].entry.hash: 0 ; 0x028: 0x00000000
kftmde[0].entry.refer.number: 0 ; 0x02c: 0x00000000
kftmde[0].entry.refer.incarn: 0 ; 0x030: A=0 NUMM=0x0
kftmde[0].templ.name: ; 0x034: length=0
kftmde[0].templ.flags: 0 ; 0x054: S=0 S=0 S=0 H=0
kftmde[0].templ.redun: 0 ; 0x058: SCHE=0x0 NUMB=0x0
kftmde[0].templ.strpwdth: 0 ; 0x059: 0x00
kftmde[0].templ.strpsz: 0 ; 0x05a: 0x00
kftmde[0].templ.priZn: 0 ; 0x05b: 0x00
kftmde[0].templ.secZn: 0 ; 0x05c: 0x00
kftmde[0].templ.ub1spare: 0 ; 0x05d: 0x00
kftmde[0].templ.ub2spare: 0 ; 0x05e: 0x0000
kftmde[0].templ.dXsiz[0]: 0 ; 0x060: 0x00000000
kftmde[0].templ.dXsiz[1]: 0 ; 0x064: 0x00000000
kftmde[0].templ.dXsiz[2]: 0 ; 0x068: 0x00000000
kftmde[0].templ.iXsiz[0]: 0 ; 0x06c: 0x00000000
kftmde[0].templ.iXsiz[1]: 0 ; 0x070: 0x00000000
kftmde[0].templ.iXsiz[2]: 0 ; 0x074: 0x00000000
kftmde[0].templ.entry: 0 ; 0x078: 0x00000000
kftmde[0].templ.idx: 0 ; 0x07c: 0x00000000
kftmde[0].templ.spare[0]: 0 ; 0x080: 0x00000000
kftmde[0].templ.spare[1]: 0 ; 0x084: 0x00000000
kftmde[0].templ.spare[2]: 0 ; 0x088: 0x00000000
kftmde[0].templ.spare[3]: 0 ; 0x08c: 0x00000000
kftmde[0].templ.spare[4]: 0 ; 0x090: 0x00000000
kftmde[0].templ.spare[5]: 0 ; 0x094: 0x00000000
kftmde[0].templ.spare[6]: 0 ; 0x098: 0x00000000
kftmde[0].templ.spare[7]: 0 ; 0x09c: 0x00000000
kftmde[0].templ.spare[8]: 0 ; 0x0a0: 0x00000000
kftmde[0].templ.spare[9]: 0 ; 0x0a4: 0x00000000
kftmde[0].templ.spare[10]: 0 ; 0x0a8: 0x00000000
kftmde[1].entry.incarn: 0 ; 0x0ac: A=0 NUMM=0x0
kftmde[1].entry.hash: 0 ; 0x0b0: 0x00000000
- KFBTYP_TMPLTDIR Template directory block
- kftmde[0].templ.name Template name
- kftmde[0].templ.flags Template attribute flags
- kftmde[0].templ.redun Template redundancy policy
- kftmde[0].templ.strpwdth stripe width in extents
- kftmde[0].templ.strpsz stripe size in 2^N bytes, 9-20 ok
- kftmde[0].templ.priZn primary extent allocation zone
- kftmde[0].templ.secZn secondary extent allocation zone
- kftmde[0].templ.entry Entry number index for fix table
- kftmde[0].templ.idx Compound index for fixed table

Leave a Reply