天萃荷净
Oracle研究中心学习笔记:分享一篇关于Oracle数据库ASM的内容,那么disk header在什么地方?它的结构如何?其实以前我也写过相关文章。
本站文章除注明转载外,均为本站原创: 转载自love wife & love life —Roger 的Oracle技术博客
本文链接地址: oracle asm 剖析系列(1) –disk header
asm是oracle 10g引入的特性,其好处就不多说了,在10g中存在不少的问题,但是在11g中相对比较稳定了。
曾经何时,asm对大多数dba来讲,犹如一个黑匣子一样,对其内部的原理架构完全不知道,最近两年网上也出现了不少的文档对asm进行了解析,但是目前我尚未发现特别详细的文章。这里我抛砖引玉,将写一个asm研究的系列,当然,这都是个人实验研究的东西,欢迎大家拍砖,供大家参考,后续会陆续分享。
在这个asm系列中,我将对asm涉及的术语,例如如下的元数据信息进行详细剖析:
disk header
free space table (FST)
allocation table (AT)
partnership and atatus table (PST)
file directory
disk directory
active change directory (ACD)
continuing operations directory (COD)
template directory
alias directory
ADVM volume directory
disk used space directory
attributes directory
ASM user directory and user group directory
staleness directory and staleness registry
上述元数据,其中有部分是11g才有的内容,部分在10g是不存在的,在10g版本中查询,你会得到如下结果:
SQL> SELECT number_kffxp file#, disk_kffxp disk#, COUNT(disk_kffxp) extents
2 FROM x$kffxp
3 WHERE group_kffxp=1
4 AND disk_kffxp <> 65534
5 GROUP BY number_kffxp, disk_kffxp
6 ORDER BY 1;
FILE# DISK# EXTENTS
---------- ---------- ----------
1 0 2
2 1 1
3 0 21
3 1 21
4 0 1
4 1 1
5 0 1
6 0 1
256 0 241
256 1 241
257 0 120
.........
263 0 28
263 1 28
264 0 11
264 1 10
265 1 1
27 ROWS selected.
上述查询的file信息,其实就的10g版本中asm所涉及的元数据信息,对应关系如下:
file# 1 ---ASM file 1,file directory
file# 2 ---ASM file 2,disk directory
file# 3 ---ASM file 3,active Change Directory(ACD)
file# 4 ---ASM file 4,continuing Operations Directory (COD)
file# 5 ---ASM file 5,template directory
file# 6 ---ASM file 6,alias directory
然后在11gR2版本中查询,你会得到如下结果:
SQL> SELECT number_kffxp file#, disk_kffxp disk#, COUNT(disk_kffxp) extents
2 FROM x$kffxp
3 WHERE group_kffxp=1
4 AND disk_kffxp <> 65534
5 GROUP BY number_kffxp, disk_kffxp
6 ORDER BY 1;
FILE# DISK# EXTENTS
---------- ---------- ----------
1 0 2
2 0 1
3 0 28
3 3 14
4 0 5
4 3 3
5 0 1
6 0 1
8 3 1
9 0 1
256 0 482
.........
268 3 7
269 0 1
35 ROWS selected.
你可以看到,file 1~9 都是元数据信息。前面的file 1~6 对应的关系不变,那后面的file 8,file 9是什么呢?
file# 7 —volume directory (当你使用ACFS后,你会看到,后面会详细描述)
file# 8 —disk Used Space Directory (USD)
file# 9 —attributes directory
在我的理解中,对于asm,大家可以理解为跟database一样,是一个单独的数据库,而asm元数据,则可以理解为database中的数据字典信息。由此,你可以详细这些元数据是多么的重要,当然对这些元数据的分布等信息了解之后,在今后遇到相关的asm故障时,处理起来将会非常的容易。
这asm系列的第一篇,我们首先来温习asm disk header。曾经何时, 很多人都担心asm disk header的损坏,进而导致磁盘组无法mount,确实,在10.2.0.5版本以前,很容易出现这个问题,特别是aix环境下,如果disk存在pvid,那么很容易在主机重启后pvid被清空,进而导致disk header损坏,进而导致磁盘组无法mount。从10.2.0.5版本开始,oracle会自动备份disk header,我在一片文章中也进行了描述。
那么disk header在什么地方?它的结构如何?其实以前我也写过相关文章,所以这一篇我就相对简单一些。
asm disk header,顾名思义就是磁盘头块,那显然就是在disk的第一个block中。这里需要注意的是,操作系统block是4k,而不是常见的数据库block_size 8k。 我们可以使用oracle提供的kfed工具来对disk header block进行查看。
首先你需要编译kfed工具,如下:
cd $ORACLE_HOME/rdbms/lib
make -f ins_rdbms.mk ikfed
当编译完成后,你可以适当修改下oracle PATH变量,就可以直接调kfed了,例如:
[oracle@10gasm ~]$ kfed -help
as/mlib ASM Library [asmlib='lib']
aun/um AU number to examine or update [AUNUM=number]
aus/z Allocation Unit size in bytes [AUSZ=number]
blkn/um Block number to examine or update [BLKNUM=number]
blks/z Metadata block size in bytes [BLKSZ=number]
ch/ksum Update checksum before each write [CHKSUM=YES/NO]
cn/t Count of AUs to process [CNT=number]
d/ev ASM device to examine or update [DEV=string]
o/p KFED operation type [OP=READ/WRITE/MERGE/NEW/FORM/FIND/STRUCT]
p/rovnm Name for provisioning purposes [PROVNM=string]
te/xt File name for translated block text [TEXT=string]
ty/pe ASM metadata block type number [TYPE=number]
如果你查看11gR2版本中的kfed工具,你会发现其更为强大了,还具有修复功能,换句话讲,在11gR2中你可以直接使用kfed修复disk header block,如下(11gR2中是不需要编译即可使用的):
[ora11g@11gR2test ~]$ kfed -h
as/mlib ASM Library [asmlib='lib']
aun/um AU number to examine or update [AUNUM=number]
aus/z Allocation Unit size in bytes [AUSZ=number]
blkn/um Block number to examine or update [BLKNUM=number]
blks/z Metadata block size in bytes [BLKSZ=number]
ch/ksum Update checksum before each write [CHKSUM=YES/NO]
cn/t Count of AUs to process [CNT=number]
de/v ASM device to examine or update [DEV=string]
dm/pall Don't suppress repeated lines when dumping corrupt blocks [DMPALL=YES/NO]
o/p KFED operation type [OP=READ/WRITE/MERGE/REPAIR/NEW/FORM/FIND/STRUCT]
p/rovnm Name for provisioning purposes [PROVNM=string]
s/eek AU number to seek to [SEEK=number]
te/xt File name for translated block text [TEXT=string]
ty/pe ASM metadata block type number [TYPE=number]
下面我们使用kfed来读取header block,查看其内容:
[oracle@10gasm ~]$ kfed read /dev/sdd | grep kfbh.type
kfbh.type: 1 ; 0x002: KFBTYP_DISKHEAD
当你使用kfed时,不指定AU,默认是读取au 0,block 0(记住,asm中block编号都是从0开始的),当然,如果你指定,得到也是一样的结果:
[oracle@10gasm ~]$ kfed read /dev/sdd aun=0 blkn=0| grep kfbh.type
kfbh.type: 1 ; 0x002: KFBTYP_DISKHEAD
[oracle@10gasm ~]$
下面继续进行详细描述:
[oracle@10gasm ~]$ kfed read /dev/sdd aun=0 blkn=0| more
kfbh.endian: 1 ; 0x000: 0x01
kfbh.hard: 130 ; 0x001: 0x82
kfbh.type: 1 ; 0x002: KFBTYP_DISKHEAD
kfbh.datfmt: 1 ; 0x003: 0x01
kfbh.block.blk: 0 ; 0x004: T=0 NUMB=0x0
kfbh.block.obj: 2147483648 ; 0x008: TYPE=0x8 NUMB=0x0
kfbh.check: 2263475499 ; 0x00c: 0x86e9e52b
kfbh.fcn.base: 0 ; 0x010: 0x00000000
kfbh.fcn.wrap: 0 ; 0x014: 0x00000000
kfbh.spare1: 0 ; 0x018: 0x00000000
kfbh.spare2: 0 ; 0x01c: 0x00000000
kfdhdb.driver.provstr: ORCLDISK ; 0x000: length=8
kfdhdb.driver.reserved[0]: 0 ; 0x008: 0x00000000
kfdhdb.driver.reserved[1]: 0 ; 0x00c: 0x00000000
kfdhdb.driver.reserved[2]: 0 ; 0x010: 0x00000000
kfdhdb.driver.reserved[3]: 0 ; 0x014: 0x00000000
kfdhdb.driver.reserved[4]: 0 ; 0x018: 0x00000000
kfdhdb.driver.reserved[5]: 0 ; 0x01c: 0x00000000
kfdhdb.compat: 168820736 ; 0x020: 0x0a100000
kfdhdb.dsknum: 0 ; 0x024: 0x0000
kfdhdb.grptyp: 1 ; 0x026: KFDGTP_EXTERNAL ---磁盘组冗余方式
kfdhdb.hdrsts: 3 ; 0x027: KFDHDR_MEMBER ---磁盘header 状态 3是可用状态
kfdhdb.dskname: DATA1_0000 ; 0x028: length=10
kfdhdb.grpname: DATA1 ; 0x048: length=5 ---磁盘组名称
kfdhdb.fgname: DATA1_0000 ; 0x068: length=10
kfdhdb.capname: ; 0x088: length=0
kfdhdb.crestmp.hi: 32977478 ; 0x0a8: HOUR=0x6 DAYS=0x12 MNTH=0xc YEAR=0x7dc
kfdhdb.crestmp.lo: 2407340032 ; 0x0ac: USEC=0x0 MSEC=0x346 SECS=0x37 MINS=0x23
kfdhdb.mntstmp.hi: 32977622 ; 0x0b0: HOUR=0x16 DAYS=0x16 MNTH=0xc YEAR=0x7dc
kfdhdb.mntstmp.lo: 1597193216 ; 0x0b4: USEC=0x0 MSEC=0xcf SECS=0x33 MINS=0x17
kfdhdb.secsize: 512 ; 0x0b8: 0x0200
kfdhdb.blksize: 4096 ; 0x0ba: 0x1000
kfdhdb.ausize: 1048576 ; 0x0bc: 0x00100000 ---au单位大小,单位是byte,大小为1m.
kfdhdb.mfact: 113792 ; 0x0c0: 0x0001bc80
kfdhdb.dsksize: 1024 ; 0x0c4: 0x00000400 ---该disk的大小,单位是au,由于默认au是1m,所以大小为1024m.
kfdhdb.pmcnt: 2 ; 0x0c8: 0x00000002
kfdhdb.fstlocn: 1 ; 0x0cc: 0x00000001
kfdhdb.altlocn: 2 ; 0x0d0: 0x00000002
kfdhdb.f1b1locn: 2 ; 0x0d4: 0x00000002 ---file directory所在的au位置,后面会详细描述
kfdhdb.redomirrors[0]: 0 ; 0x0d8: 0x0000
kfdhdb.redomirrors[1]: 0 ; 0x0da: 0x0000
kfdhdb.redomirrors[2]: 0 ; 0x0dc: 0x0000
kfdhdb.redomirrors[3]: 0 ; 0x0de: 0x0000
kfdhdb.dbcompat: 168820736 ; 0x0e0: 0x0a100000
kfdhdb.grpstmp.hi: 32977478 ; 0x0e4: HOUR=0x6 DAYS=0x12 MNTH=0xc YEAR=0x7dc
kfdhdb.grpstmp.lo: 2407301120 ; 0x0e8: USEC=0x0 MSEC=0x320 SECS=0x37 MINS=0x23
kfdhdb.ub4spare[0]: 0 ; 0x0ec: 0x00000000
kfdhdb.ub4spare[1]: 0 ; 0x0f0: 0x00000000
kfdhdb.ub4spare[2]: 0 ; 0x0f4: 0x00000000
........
kfdhdb.ub4spare[56]: 0 ; 0x1cc: 0x00000000
kfdhdb.ub4spare[57]: 0 ; 0x1d0: 0x00000000
kfdhdb.acdb.aba.seq: 0 ; 0x1d4: 0x00000000
kfdhdb.acdb.aba.blk: 0 ; 0x1d8: 0x00000000
kfdhdb.acdb.ents: 0 ; 0x1dc: 0x0000
kfdhdb.acdb.ub2spare: 0 ; 0x1de: 0x0000
关于其他的不再累述,由于2010年底写过一篇详解disk header的文章,我这里摘取过来:
[oracle@10gasm ~]$ dd if=/dev/sdb bs=4096 count=1|od -x | more
1+0 records in
1+0 records out
4096 bytes (4.1 kB) copied, 0.000626222 seconds, 6.5 MB/s
0000000 8201 0101 0000 0000 0002 8000 74b8 5ade
0000020 0000 0000 0000 0000 0000 0000 0000 0000
0000040 524f 4c43 4944 4b53 0000 0000 0000 0000
0000060 0000 0000 0000 0000 0000 0000 0000 0000
0000100 0000 0a10 0002 0301 4144 4154 5f31 3030
0000120 3230 0000 0000 0000 0000 0000 0000 0000
0000140 0000 0000 0000 0000 4144 4154 0031 0000
0000160 0000 0000 0000 0000 0000 0000 0000 0000
0000200 0000 0000 0000 0000 4144 4154 5f31 3030
0000220 3230 0000 0000 0000 0000 0000 0000 0000
0000240 0000 0000 0000 0000 0000 0000 0000 0000
*
0000300 0000 0000 0000 0000 32d7 01f7 5800 b29d
0000320 32d7 01f7 fc00 b29d 0200 1000 0000 0010
0000340 bc80 0001 0400 0000 0002 0000 0001 0000
0000360 0002 0000 0000 0000 0000 0000 0000 0000
0000400 0000 0a10 3246 01f7 8000 8f7c 0000 0000
0000420 0000 0000 0000 0000 0000 0000 0000 0000
*
0010000
由于我这里是32位平台,字节序是反的,所以大家看起来可能有点费力,不过没关系,下面有对于关系的详细描述,我原来的文章是使用dd复制出disk header block,然后使用bbed来进行观察的,如下:
[oracle@roger ~]$ dd if=/dev/sdb bs=4096 count=1 of=asm_header ---首先用dd将ASM disk header备份出来
1+0 records in
1+0 records out
下面将dd备份出来的文件 加入到bbed的 listfile文件中 如下:
[oracle@roger lib]$ cat a.txt
1 /home/oracle/asm_header
[oracle@roger lib]$
[oracle@roger lib]$ ./bbed parfile=parfile.txt
Password:
BBED: Release 2.0.0.0.0 - Limited Production on Sun Nov 21 17:10:36 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
************* !!! For Oracle Internal Use only !!! ***************
BBED> show all
FILE# 1
BLOCK# 1
OFFSET 0
DBA 0x00400001 (4194305 1,1)
FILENAME /home/oracle/asm_header
BIFILE bifile.bbd
LISTFILE a.txt
BLOCKSIZE 512
MODE Edit
EDIT Unrecoverable
IBASE Dec
OBASE Dec
WIDTH 80
COUNT 512
LOGFILE log.bbd
SPOOL Yes
BBED> map /v
File: /home/oracle/asm_header (1)
Block: 1 Dba:0x00400001
------------------------------------------------------------
Undo Segment Header
struct kcbh, 20 bytes @0
ub1 type_kcbh @0
ub1 frmt_kcbh @1
ub1 spare1_kcbh @2
ub1 spare2_kcbh @3
ub4 rdba_kcbh @4
ub4 bas_kcbh @8
ub2 wrp_kcbh @12
ub1 seq_kcbh @14
ub1 flg_kcbh @15
ub2 chkval_kcbh @16
ub2 spare3_kcbh @18
struct ktect, 44 bytes @20
ub4 ktectspare @20
word ktecttsn @24
ub4 ktectobj @28
ub4 ktectnex @32
ub2 ktecttbe @36
ub4 ktectcex @40
ub4 ktectces @44
ub4 ktectcbk @48
struct ktectxid, 8 bytes @52
ub1 ktectlck @60
struct ktetb[1], 8 bytes @64
ub4 ktetbdba @64
ub4 ktetbnbk @68
struct ktuxc, 104 bytes @18776
struct ktuxcscn, 8 bytes @18776
struct ktuxcuba, 8 bytes @18784
sb2 ktuxcflg @18792
ub2 ktuxcseq @18794
sb2 ktuxcnfb @18796
ub4 ktuxcinc @18800
sb2 ktuxcchd @18804
sb2 ktuxcctl @18806
ub2 ktuxcmgc @18808
ub4 ktuxcopt @18816
struct ktuxcfbp[5], 60 bytes @18820
struct ktuxe[255], 10200 bytes @18880
ub4 ktuxexid @18880
ub4 ktuxebrb @18884
struct ktuxescn, 8 bytes @18888
sb4 ktuxesta @18896
ub1 ktuxecfl @18897
sb2 ktuxeuel @18898
ub4 tailchk @508
BBED> p kcbh --block header的信息 一共占了20byte
struct kcbh, 20 bytes @0
ub1 type_kcbh @0 0x01
ub1 frmt_kcbh @1 0x82
ub1 spare1_kcbh @2 0x01
ub1 spare2_kcbh @3 0x01
ub4 rdba_kcbh @4 0x00000000
ub4 bas_kcbh @8 0x80000000
ub2 wrp_kcbh @12 0x1d56
ub1 seq_kcbh @14 0x85
ub1 flg_kcbh @15 0x78 (NONE)
ub2 chkval_kcbh @16 0x0000
ub2 spare3_kcbh @18 0x0000
BBED> d /v count 4096
File: /home/oracle/asm_header (1)
Block: 1 Offsets: 0 to 511 Dba:0x00400001
-------------------------------------------------------
01820101 00000000 00000080 561d8578 l ............V..x
00000000 00000000 00000000 00000000 l ................
4f52434c 4449534b 00000000 00000000 l ORCLDISK........
00000000 00000000 00000000 00000000 l ................
0000100a 00000103 44415441 30315f30 l ........DATA01_0
30303000 00000000 00000000 00000000 l 000.............
00000000 00000000 44415441 30310000 l ........DATA01..
00000000 00000000 00000000 00000000 l ................
00000000 00000000 44415441 30315f30 l ........DATA01_0
30303000 00000000 00000000 00000000 l 000.............
00000000 00000000 00000000 00000000 l ................
00000000 00000000 00000000 00000000 l ................
00000000 00000000 15adf601 00447ca5 l ...........D|
abaef601 00ac21ad 00020010 00001000 l . .......
80bc0100 00140000 02000000 01000000 l . .............
02000000 02000000 00000000 00000000 l ................
0000100a 15adf601 00187ba5 00000000 l ........{ ...
00000000 00000000 00000000 00000000 l ................
00000000 00000000 00000000 00000000 l ................
00000000 00000000 00000000 00000000 l ................
00000000 00000000 00000000 00000000 l ................
00000000 00000000 00000000 00000000 l ................
00000000 00000000 00000000 00000000 l ................
00000000 00000000 00000000 00000000 l ................
00000000 00000000 00000000 00000000 l ................
00000000 00000000 00000000 00000000 l ................
00000000 00000000 00000000 00000000 l ................
00000000 00000000 00000000 00000000 l ................
00000000 00000000 00000000 00000000 l ................
00000000 00000000 00000000 00000000 l ................
00000000 00000000 00000000 00000000 l ................
00000000 00000000 00000000 00000000 l ................
<16 bytes per line>
下面我们来对上面的dump信息进行解释:
1)第1个byte 01 --这里是对应的endian_kfbh 01即使1 表示的是Little Endian 相反,0的话即使表示BIG endian
2)第2个byte 82 --这里对应kfbh.hard
3)第3个byte 01 --这里对应kfbh.type
4)第4个byte 01 --这里对应的是datfmt_kfbh
5)第5~8个byte 00 00 00 00 ---这里对应的是kfbh.block.blk
6)第9~12个byte 00 00 00 08 ---这里对应的是kfbh.block.obj
7)第13~16个byte 561d8578 ---这里对应的是kfbh.check (可以对比下面的kfed结果)
8)第17~20个byte 00000000 ---这里对应的是kfbh.fcn.base
9)第21~23个byte 00000000 ---这里对应的是kfbh.fcn.wrap
10)第24~27个byte 00000000 ---这里对应的是kfbh.spare1
11)第28~32个byte 00000000 ---这里对应的是kfbh.spare2
12)第33~40个byte 4f52434c 4449534b ---这里对应的是kfdhdb.driver.provstr --从上面的dump信息可以看出具体的值
13)第41~64个byte 00 00 00 00 ---这里对应的是kfdhdb.driver.reserved[0] ~~ kfdhdb.driver.reserved[5]
14)第65~68个byte 0000100a ---这里对应的是kfdhdb.compat 即使我们的oracle版本号
15)第69~70个byte 0000 ---这里对应的是kfdhdb.dsknum 即使disk numer 取值范围 0~65335
16)第71个byte 01 ---这里对应的是kfdhdb.grptyp 即磁盘组的冗余方式 01 表示EXTERNAL冗余
下面对该值的属性做一下补充:
KFDGTP_INVALID ((kfdgtp)0) -- Illegal value
KFDGTP_EXTERNAL ((kfdgtp)1) -- External redundancy
KFDGTP_NORMAL ((kfdgtp)2) -- Normal redundancy
KFDGTP_HIGH ((kfdgtp)3) -- High redundancy
17)第72个byte 03 ---这里对应是kfdhdb.hdrsts 即disk group的状态 03表示正常(这里非常重要)
下面对改值的熟悉做一下补充:
KFDHDR_INVALID ((kfdhdr)0) -- Illegal value
KFDHDR_UNKNOWN ((kfdhdr)1) -- Disk header block unreadable
KFDHDR_CANDIDATE ((kfdhdr)2) -- No OSM or OS disk header found
KFDHDR_MEMBER ((kfdhdr)3) -- Normal member of the group ---03 正常状态
KFDHDR_FORMER ((kfdhdr)4) -- Disk dropped cleanly from group
KFDHDR_CONFLICT ((kfdhdr)5) -- Header conflicts
KFDHDR_INCOMPAT ((kfdhdr)6) -- Written by incompatible software
KFDHDR_PROVISIONED ((kfdhdr)7) -- Disk was prepared beforehand
18)第73~104个byte 44415441 到00000000 32个byte ---这里对应的是kfdhdb.dskname 即磁盘名称 我们这里的DATA01_0000
19) 第105~~136个byte 44415441 到00000000 32个byte ---这里对应的是kfdhdb.grpname 即是磁盘组名称 DATA01
20)第137~ 168个byte 也是44415441开始 32个byte ---这里对应的是kfdhdb.fgname 即failgroup name
21)第169~184 个byte 一共16个byte ---这里对应的是kfdhdb.capname 即是Capacitygroup name 当然我这里没有使用
22)第185~188个byte 一共4个byte ---这里对应的是kfdhdb.crestmp.hi 即Creation timestamp high
23)第189~192个byte 一共4个byte ---这里对应的是kfdhdb.crestmp.lo 即Creation timestamp low
24)第193~196个byte 一共4个byte ---这里对应的是kfdhdb.mntstmp.hi
25)第197~200个byte 一共4个byte ---这里对应的是kfdhdb.mntstmp.lo
26)第201~202 一共2个byte ---这里对应的是kfdhdb.secsize 即physical sector size of the disk
27)第203~204 一共2个byte ---这里对应的是fdhdb.blksize 即metadata blocksize asm block大小
28)第205~208 一共4个byte ---这里对应的是kfdhdb.ausize 即AU 的大小1048576 即是1m
29)第209~212 一共4个byte ---这里对应的是kfdhdb.mfact 即Stride between physical addresses of allocation units
30)第213~216 一共4个byte ---这里对应的是kfdhdb.dsksize 即0x00001400 转换为10进制后为5120 即5120个分配units =磁盘组大小
补充:
kfdhdb.ausize * dsksize_kfdhdb = disk size
即是 1m x 5120 =5120m (注意这个大小是整个磁盘组的大小)
31)第217~220 一共4个byte ---这里对应的是kfdhdb.pmcnt 这里该值是2 即 Number of physically addressed allocation units
32)第221~224 一共4个byte ---这里对应的是kfdhdb.fstlocn 即First FreeSpace table block number used to find freespace。
33)第225~228 一共4个byte ---这里对应的是kfdhdb.altlocn 即First Alocation table block numer used to find allocated space
34)第229~232 一共4个byte ---这里对应的是kfdhdb.f1b1locn 即File Directory block 1 Allocation Unit number. Beginging for file directory
即是第一个file directory 通常这里是2
35)第241~244 一共4个byte ---这里对应的是kfdhdb.dbcompat 转换以为即为我们的数据库版本
36)第245~248 一共4个byte ---这里对应的是kfdhdb.grpstmp.hi
我们这里的值是 HOUR=0x15 DAYS=0x8 MNTH=0xb YEAR=0x7da
0x7da -->2010
0xb -->11
0x8 -->8
0x15 -->21 即2010/11/08 21 这里只是精确到小时
37)第249~252 一共4个byte --Oracleо-这里对应的是kfdhdb.grpstmp.lo
我们这里的值是 USEC=0x0 MSEC=0x2c6 SECS=0x17 MINS=0x29
MINS=0x29 -->41 分钟
SECS=0x17 -->23 秒
MSEC=0x2c6 -->710 微秒即0.7s
USEC=0x0 -->0
最后再补充下,从11gR2开始,asm au会随着extent的分配而发生变化,大概是如下一个关系:
当extent < 20000时,au size等于默认大小,如果你指定大小,那么默认是1m;
当extent >= 20000时, au size等于4倍默认au size大小,如果你不指定au大小,那么将是4m;
当extent >= 40000时,au size等于16倍默认au size大小,如果你不指定au大小,那么将是16m.
从asm角度来看,最小的分配单位是au,而一个或多个au又组成extent,所以这里的extent其实跟database中的extent有些类似。
后面还会继续研究分享,欢迎大家关注!这仅仅是个开始~~~
--------------------------------------ORACLE-DBA----------------------------------------
最权威、专业的Oracle案例资源汇总之【学习笔记】Oracle asm 剖析系列(1) –disk header详解
本文由大师惜分飞原创分享,网址:http://www.oracleplus.net/arch/1418.html