ORACLE ASM - alias directory


oracle 元数据的第2个au的第6个数据块上保存了alias directory的au指针,可以通过x$kffxp查询,

SELECT 
       number_kffxp file#,
       disk_kffxp disk#,
       AU_KFFXP AU_num,
       SIZE_KFFXP as "nummber of au"
  FROM x$kffxp
 WHERE group_kffxp = 1
   AND disk_kffxp <> 65534
 10     AND number_kffxp = 6
 11  /

     FILE#	DISK#	  AU_NUM nummber of au
---------- ---------- ---------- -------------
	 6	    1	      49	     1
	 6	    0	      49	     1
	 6	    2	      49	     1

 

-- 文件编号6对应磁盘1,0,2 au编号为49

   这里磁盘0: /dev/asm-diskb

           1: /dev/asm-diskc

           2: /dev/asm-diskd

  

下面通过分析元数据来验证,  由于file directory au = 2

[root@localhost ~]# kfed read /dev/asm-diskb | grep f1
kfdhdb.f1b1locn:                      2 ; 0x0d4: 0x00000002

alias directory number为6因此我们应该通过kfed查询 au=2 block=6的数据块

[root@localhost ~]# kfed read /dev/asm-diskb aun=2 blkn=6 | grep kfffde | head -20
kfffde[0].xptr.au:                   49 ; 0x4a0: 0x00000031   -- au number都为49
kfffde[0].xptr.disk:                  1 ; 0x4a4: 0x0001     --disk 1
kfffde[0].xptr.flags:                 0 ; 0x4a6: L=0 E=0 D=0 S=0
kfffde[0].xptr.chk:                  26 ; 0x4a7: 0x1a       
kfffde[1].xptr.au:                   49 ; 0x4a8: 0x00000031   
kfffde[1].xptr.disk:                  0 ; 0x4ac: 0x0000     -- disk 0
kfffde[1].xptr.flags:                 0 ; 0x4ae: L=0 E=0 D=0 S=0
kfffde[1].xptr.chk:                  27 ; 0x4af: 0x1b
kfffde[2].xptr.au:                   49 ; 0x4b0: 0x00000031
kfffde[2].xptr.disk:                  2 ; 0x4b4: 0x0002     -- disk 2
kfffde[2].xptr.flags:                 0 ; 0x4b6: L=0 E=0 D=0 S=0
kfffde[2].xptr.chk:                  25 ; 0x4b7: 0x19
可以看到通过kfed 和 前面sql查询完全吻合


那么通过下面命令可以定位到alias directory

[root@localhost ~]# kfed read /dev/asm-diskb aun=49 blkn=0
kfbh.endian:                          1 ; 0x000: 0x01
kfbh.hard:                          130 ; 0x001: 0x82
kfbh.type:                           11 ; 0x002: KFBTYP_ALIASDIR    -- file type  为 alias directory
kfbh.datfmt:                          1 ; 0x003: 0x01
kfbh.block.blk:                       0 ; 0x004: T=0 NUMB=0x0
kfbh.block.obj:                       6 ; 0x008: TYPE=0x0 NUMB=0x6
kfbh.check:                  2830667707 ; 0x00c: 0xa8b88fbb
kfbh.fcn.base:                     2814 ; 0x010: 0x00000afe
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
kfade[0].entry.incarn:                3 ; 0x024: A=1 NUMM=0x1      
kfade[0].entry.hash:         4004320810 ; 0x028: 0xeead162a
kfade[0].entry.refer.number:          1 ; 0x02c: 0x00000001     --指向下一个block编号
kfade[0].entry.refer.incarn:          3 ; 0x030: A=1 NUMM=0x1   --entry部分内容,表示分支号,hash值和指向下一层block的指针等信息
kfade[0].name:                      ASM ; 0x034: length=3		-- 元数据名称
kfade[0].fnum:               4294967295 ; 0x064: 0xffffffff     -- 对应的文件编号这里为最大值
kfade[0].finc:               4294967295 ; 0x068: 0xffffffff     -- 文件分支号 
kfade[0].flags:                       4 ; 0x06c: U=0 S=0 S=1 U=0 F=0 --标志信息
kfade[0].ub1spare:                    0 ; 0x06d: 0x00
kfade[0].ub2spare:                    0 ; 0x06e: 0x0000
kfade[1].entry.incarn:                1 ; 0x070: A=1 NUMM=0x0
kfade[1].entry.hash:          185602149 ; 0x074: 0x0b101065
kfade[1].entry.refer.number:          3 ; 0x078: 0x00000003
kfade[1].entry.refer.incarn:          1 ; 0x07c: A=1 NUMM=0x0
kfade[1].name:                     ORCL ; 0x080: length=4
kfade[1].fnum:               4294967295 ; 0x0b0: 0xffffffff
kfade[1].finc:               4294967295 ; 0x0b4: 0xffffffff
kfade[1].flags:                       4 ; 0x0b8: U=0 S=0 S=1 U=0 F=0
kfade[1].ub1spare:                    0 ; 0x0b9: 0x00
kfade[1].ub2spare:                    0 ; 0x0ba: 0x0000
kfade[2].entry.incarn:                0 ; 0x0bc: A=0 NUMM=0x0
kfade[2].entry.hash:                  0 ; 0x0c0: 0x00000000
kfade[2].entry.refer.number:          0 ; 0x0c4: 0x00000000
kfade[2].entry.refer.incarn:          0 ; 0x0c8: A=0 NUMM=0x0
.....
kfade[52].flags:                      0 ; 0xfdc: U=0 S=0 S=0 U=0 F=0
kfade[52].ub1spare:                   0 ; 0xfdd: 0x00
kfade[52].ub2spare:                   0 ; 0xfde: 0x0000


这里记录了ASM文件信息,和ORCL文件信息,分别指向了1,3 block , 那么第3个block应该就是orcl实例相关的文件信息,如下

[root@localhost ~]# kfed read /dev/asm-diskb aun=49 blkn=3
kfbh.endian:                          1 ; 0x000: 0x01
kfbh.hard:                          130 ; 0x001: 0x82
kfbh.type:                           11 ; 0x002: KFBTYP_ALIASDIR
kfbh.datfmt:                          1 ; 0x003: 0x01
kfbh.block.blk:                       3 ; 0x004: T=0 NUMB=0x3
kfbh.block.obj:                       6 ; 0x008: TYPE=0x0 NUMB=0x6
kfbh.check:                  2672927140 ; 0x00c: 0x9f51a1a4
kfbh.fcn.base:                     5677 ; 0x010: 0x0000162d
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:                 3 ; 0x01c: 0x00000003
kffdnd.fstblk.incarn:                 1 ; 0x020: A=1 NUMM=0x0
kfade[0].entry.incarn:                1 ; 0x024: A=1 NUMM=0x0
kfade[0].entry.hash:          710518681 ; 0x028: 0x2a59a799
kfade[0].entry.refer.number:          4 ; 0x02c: 0x00000004        -- 数据文件block编号
kfade[0].entry.refer.incarn:          1 ; 0x030: A=1 NUMM=0x0
kfade[0].name:                 DATAFILE ; 0x034: length=8            
kfade[0].fnum:               4294967295 ; 0x064: 0xffffffff
kfade[0].finc:               4294967295 ; 0x068: 0xffffffff
kfade[0].flags:                       4 ; 0x06c: U=0 S=0 S=1 U=0 F=0
kfade[0].ub1spare:                    0 ; 0x06d: 0x00
kfade[0].ub2spare:                    0 ; 0x06e: 0x0000
kfade[1].entry.incarn:                3 ; 0x070: A=1 NUMM=0x1
kfade[1].entry.hash:         4053320104 ; 0x074: 0xf198c1a8
kfade[1].entry.refer.number:          5 ; 0x078: 0x00000005      -- 控制文件block编号
kfade[1].entry.refer.incarn:          3 ; 0x07c: A=1 NUMM=0x1
kfade[1].name:              CONTROLFILE ; 0x080: length=11
kfade[1].fnum:               4294967295 ; 0x0b0: 0xffffffff
kfade[1].finc:               4294967295 ; 0x0b4: 0xffffffff
kfade[1].flags:                       4 ; 0x0b8: U=0 S=0 S=1 U=0 F=0
kfade[1].ub1spare:                    0 ; 0x0b9: 0x00
kfade[1].ub2spare:                    0 ; 0x0ba: 0x0000
kfade[2].entry.incarn:                1 ; 0x0bc: A=1 NUMM=0x0
kfade[2].entry.hash:         2803485489 ; 0x0c0: 0xa719cb31
kfade[2].entry.refer.number:          6 ; 0x0c4: 0x00000006    -- 日志文件block 编号
kfade[2].entry.refer.incarn:          1 ; 0x0c8: A=1 NUMM=0x0
kfade[2].name:                ONLINELOG ; 0x0cc: length=9            
kfade[2].fnum:               4294967295 ; 0x0fc: 0xffffffff
kfade[2].finc:               4294967295 ; 0x100: 0xffffffff
kfade[2].flags:                       4 ; 0x104: U=0 S=0 S=1 U=0 F=0
kfade[2].ub1spare:                    0 ; 0x105: 0x00
kfade[2].ub2spare:                    0 ; 0x106: 0x0000
kfade[3].entry.incarn:                1 ; 0x108: A=1 NUMM=0x0
kfade[3].entry.hash:         2905271101 ; 0x10c: 0xad2aeb3d
kfade[3].entry.refer.number:          7 ; 0x110: 0x00000007
kfade[3].entry.refer.incarn:          1 ; 0x114: A=1 NUMM=0x0
kfade[3].name:                 TEMPFILE ; 0x118: length=8      -- 临时数据文件block编号
kfade[3].fnum:               4294967295 ; 0x148: 0xffffffff
kfade[3].finc:               4294967295 ; 0x14c: 0xffffffff
kfade[3].flags:                       4 ; 0x150: U=0 S=0 S=1 U=0 F=0
kfade[3].ub1spare:                    0 ; 0x151: 0x00
kfade[3].ub2spare:                    0 ; 0x152: 0x0000
kfade[4].entry.incarn:                3 ; 0x154: A=1 NUMM=0x1
kfade[4].entry.hash:         3261836913 ; 0x158: 0xc26bae71
kfade[4].entry.refer.number:          8 ; 0x15c: 0x00000008
kfade[4].entry.refer.incarn:          3 ; 0x160: A=1 NUMM=0x1
kfade[4].name:            PARAMETERFILE ; 0x164: length=13   -- 参数文件block编号
kfade[4].fnum:               4294967295 ; 0x194: 0xffffffff
kfade[4].finc:               4294967295 ; 0x198: 0xffffffff
kfade[4].flags:                       4 ; 0x19c: U=0 S=0 S=1 U=0 F=0
kfade[4].ub1spare:                    0 ; 0x19d: 0x00
kfade[4].ub2spare:                    0 ; 0x19e: 0x0000
kfade[5].entry.incarn:                3 ; 0x1a0: A=1 NUMM=0x1
kfade[5].entry.hash:         2014481262 ; 0x1a4: 0x78128b6e
kfade[5].entry.refer.number: 4294967295 ; 0x1a8: 0xffffffff
kfade[5].entry.refer.incarn:          0 ; 0x1ac: A=0 NUMM=0x0
kfade[5].name:           spfileorcl.ora ; 0x1b0: length=14
kfade[5].fnum:                      265 ; 0x1e0: 0x00000109
kfade[5].finc:                857256271 ; 0x1e4: 0x3318b14f
kfade[5].flags:                      17 ; 0x1e8: U=1 S=0 S=0 U=0 F=1
kfade[5].ub1spare:                    0 ; 0x1e9: 0x00
kfade[5].ub2spare:                    0 ; 0x1ea: 0x0000
kfade[6].entry.incarn:                0 ; 0x1ec: A=0 NUMM=0x0
kfade[6].entry.hash:                  0 ; 0x1f0: 0x00000000
kfade[6].entry.refer.number:          0 ; 0x1f4: 0x00000000
kfade[6].entry.refer.incarn:          0 ; 0x1f8: A=0 NUMM=0x0
kfade[6].name:                          ; 0x1fc: length=0
kfade[6].fnum:                        0 ; 0x22c: 0x00000000
kfade[6].finc:                        0 ; 0x230: 0x00000000
kfade[6].flags:                       0 ; 0x234: U=0 S=0 S=0 U=0 F=0
kfade[6].ub1spare:                    0 ; 0x235: 0x00
kfade[6].ub2spare:                    0 ; 0x236: 0x0000
......
kfade[52].ub1spare:                   0 ; 0xfdd: 0x00
kfade[52].ub2spare:                   0 ; 0xfde: 0x0000


根据上面信息找到数据文件信息如下

[root@localhost ~]# kfed read /dev/asm-diskb aun=49 blkn=4
kfbh.endian:                          1 ; 0x000: 0x01
kfbh.hard:                          130 ; 0x001: 0x82
kfbh.type:                           11 ; 0x002: KFBTYP_ALIASDIR
kfbh.datfmt:                          1 ; 0x003: 0x01
kfbh.block.blk:                       4 ; 0x004: T=0 NUMB=0x4
kfbh.block.obj:                       6 ; 0x008: TYPE=0x0 NUMB=0x6
kfbh.check:                  1563690326 ; 0x00c: 0x5d340556
kfbh.fcn.base:                     5938 ; 0x010: 0x00001732
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:                 3 ; 0x014: 0x00000003
kffdnd.parent.incarn:                 1 ; 0x018: A=1 NUMM=0x0
kffdnd.fstblk.number:                 4 ; 0x01c: 0x00000004
kffdnd.fstblk.incarn:                 1 ; 0x020: A=1 NUMM=0x0
kfade[0].entry.incarn:                1 ; 0x024: A=1 NUMM=0x0
kfade[0].entry.hash:          945453920 ; 0x028: 0x385a7b60
kfade[0].entry.refer.number: 4294967295 ; 0x02c: 0xffffffff
kfade[0].entry.refer.incarn:          0 ; 0x030: A=0 NUMM=0x0
kfade[0].name:                   SYSTEM ; 0x034: length=6      
kfade[0].fnum:                      256 ; 0x064: 0x00000100
kfade[0].finc:                855531633 ; 0x068: 0x32fe6071
kfade[0].flags:                      18 ; 0x06c: U=0 S=1 S=0 U=0 F=1
kfade[0].ub1spare:                    0 ; 0x06d: 0x00
kfade[0].ub2spare:                    0 ; 0x06e: 0x0000
kfade[1].entry.incarn:                1 ; 0x070: A=1 NUMM=0x0
kfade[1].entry.hash:         3582191305 ; 0x074: 0xd583e6c9
kfade[1].entry.refer.number: 4294967295 ; 0x078: 0xffffffff
kfade[1].entry.refer.incarn:          0 ; 0x07c: A=0 NUMM=0x0
kfade[1].name:                   SYSAUX ; 0x080: length=6
kfade[1].fnum:                      257 ; 0x0b0: 0x00000101
kfade[1].finc:                855531635 ; 0x0b4: 0x32fe6073
kfade[1].flags:                      18 ; 0x0b8: U=0 S=1 S=0 U=0 F=1
kfade[1].ub1spare:                    0 ; 0x0b9: 0x00
kfade[1].ub2spare:                    0 ; 0x0ba: 0x0000
kfade[2].entry.incarn:                1 ; 0x0bc: A=1 NUMM=0x0
kfade[2].entry.hash:         1418232765 ; 0x0c0: 0x548883bd
kfade[2].entry.refer.number: 4294967295 ; 0x0c4: 0xffffffff
kfade[2].entry.refer.incarn:          0 ; 0x0c8: A=0 NUMM=0x0
kfade[2].name:                 UNDOTBS1 ; 0x0cc: length=8
kfade[2].fnum:                      258 ; 0x0fc: 0x00000102
kfade[2].finc:                855531635 ; 0x100: 0x32fe6073
kfade[2].flags:                      18 ; 0x104: U=0 S=1 S=0 U=0 F=1
kfade[2].ub1spare:                    0 ; 0x105: 0x00
kfade[2].ub2spare:                    0 ; 0x106: 0x0000
kfade[3].entry.incarn:                1 ; 0x108: A=1 NUMM=0x0
kfade[3].entry.hash:         3450686357 ; 0x10c: 0xcdad4b95
kfade[3].entry.refer.number: 4294967295 ; 0x110: 0xffffffff
kfade[3].entry.refer.incarn:          0 ; 0x114: A=0 NUMM=0x0
kfade[3].name:                    USERS ; 0x118: length=5                  
kfade[3].fnum:                      259 ; 0x148: 0x00000103
kfade[3].finc:                855531635 ; 0x14c: 0x32fe6073
kfade[3].flags:                      18 ; 0x150: U=0 S=1 S=0 U=0 F=1
kfade[3].ub1spare:                    0 ; 0x151: 0x00
kfade[3].ub2spare:                    0 ; 0x152: 0x0000
kfade[4].entry.incarn:                1 ; 0x154: A=1 NUMM=0x0
kfade[4].entry.hash:         3395405755 ; 0x158: 0xca61c7bb
kfade[4].entry.refer.number: 4294967295 ; 0x15c: 0xffffffff
kfade[4].entry.refer.incarn:          0 ; 0x160: A=0 NUMM=0x0
kfade[4].name:                     TEST ; 0x164: length=4    
kfade[4].fnum:                      266 ; 0x194: 0x0000010a
kfade[4].finc:                857133305 ; 0x198: 0x3316d0f9
kfade[4].flags:                      18 ; 0x19c: U=0 S=1 S=0 U=0 F=1
kfade[4].ub1spare:                    0 ; 0x19d: 0x00
kfade[4].ub2spare:                    0 ; 0x19e: 0x0000
kfade[5].entry.incarn:                1 ; 0x1a0: A=1 NUMM=0x0
kfade[5].entry.hash:            8253282 ; 0x1a4: 0x007def62
kfade[5].entry.refer.number: 4294967295 ; 0x1a8: 0xffffffff
kfade[5].entry.refer.incarn:          0 ; 0x1ac: A=0 NUMM=0x0
kfade[5].name:                   SYSTEM ; 0x1b0: length=6
kfade[5].fnum:                      267 ; 0x1e0: 0x0000010b
kfade[5].finc:                857255903 ; 0x1e4: 0x3318afdf
kfade[5].flags:                      18 ; 0x1e8: U=0 S=1 S=0 U=0 F=1
kfade[5].ub1spare:                    0 ; 0x1e9: 0x00
kfade[5].ub2spare:                    0 ; 0x1ea: 0x0000
kfade[6].entry.incarn:                1 ; 0x1ec: A=1 NUMM=0x0
kfade[6].entry.hash:          380931100 ; 0x1f0: 0x16b48c1c
kfade[6].entry.refer.number: 4294967295 ; 0x1f4: 0xffffffff
kfade[6].entry.refer.incarn:          0 ; 0x1f8: A=0 NUMM=0x0
kfade[6].name:                   SYSAUX ; 0x1fc: length=6
kfade[6].fnum:                      268 ; 0x22c: 0x0000010c
kfade[6].finc:                857255903 ; 0x230: 0x3318afdf
kfade[6].flags:                      18 ; 0x234: U=0 S=1 S=0 U=0 F=1
kfade[6].ub1spare:                    0 ; 0x235: 0x00
kfade[6].ub2spare:                    0 ; 0x236: 0x0000
kfade[7].entry.incarn:                1 ; 0x238: A=1 NUMM=0x0
kfade[7].entry.hash:         2903512848 ; 0x23c: 0xad101710
kfade[7].entry.refer.number: 4294967295 ; 0x240: 0xffffffff
kfade[7].entry.refer.incarn:          0 ; 0x244: A=0 NUMM=0x0
kfade[7].name:                 UNDOTBS1 ; 0x248: length=8
kfade[7].fnum:                      269 ; 0x278: 0x0000010d
kfade[7].finc:                857255903 ; 0x27c: 0x3318afdf
kfade[7].flags:                      18 ; 0x280: U=0 S=1 S=0 U=0 F=1
kfade[7].ub1spare:                    0 ; 0x281: 0x00
kfade[7].ub2spare:                    0 ; 0x282: 0x0000
kfade[8].entry.incarn:                1 ; 0x284: A=1 NUMM=0x0
kfade[8].entry.hash:         1636478062 ; 0x288: 0x618aac6e
kfade[8].entry.refer.number: 4294967295 ; 0x28c: 0xffffffff
kfade[8].entry.refer.incarn:          0 ; 0x290: A=0 NUMM=0x0
kfade[8].name:                    USERS ; 0x294: length=5
kfade[8].fnum:                      270 ; 0x2c4: 0x0000010e
kfade[8].finc:                857255903 ; 0x2c8: 0x3318afdf
kfade[8].flags:                      18 ; 0x2cc: U=0 S=1 S=0 U=0 F=1
kfade[8].ub1spare:                    0 ; 0x2cd: 0x00
kfade[8].ub2spare:                    0 ; 0x2ce: 0x0000
kfade[9].entry.incarn:                1 ; 0x2d0: A=1 NUMM=0x0
kfade[9].entry.hash:          704364649 ; 0x2d4: 0x29fbc069
kfade[9].entry.refer.number: 4294967295 ; 0x2d8: 0xffffffff
kfade[9].entry.refer.incarn:          0 ; 0x2dc: A=0 NUMM=0x0
kfade[9].name:                    DITER ; 0x2e0: length=5
kfade[9].fnum:                      276 ; 0x310: 0x00000114
kfade[9].finc:                857458321 ; 0x314: 0x331bc691
kfade[9].flags:                      18 ; 0x318: U=0 S=1 S=0 U=0 F=1
kfade[9].ub1spare:                    0 ; 0x319: 0x00
kfade[9].ub2spare:                    0 ; 0x31a: 0x0000
kfade[10].entry.incarn:               0 ; 0x31c: A=0 NUMM=0x0
kfade[10].entry.hash:                 0 ; 0x320: 0x00000000
kfade[10].entry.refer.number:         0 ; 0x324: 0x00000000
kfade[10].entry.refer.incarn:         0 ; 0x328: A=0 NUMM=0x0
kfade[10].name:                         ; 0x32c: length=0
kfade[10].fnum:                       0 ; 0x35c: 0x00000000
kfade[10].finc:                       0 ; 0x360: 0x00000000
kfade[10].flags:                      0 ; 0x364: U=0 S=0 S=0 U=0 F=0
kfade[10].ub1spare:                   0 ; 0x365: 0x00
kfade[10].ub2spare:                   0 ; 0x366: 0x0000
...
kfade[52].flags:                      0 ; 0xfdc: U=0 S=0 S=0 U=0 F=0
kfade[52].ub1spare:                   0 ; 0xfdd: 0x00
kfade[52].ub2spare:                   0 ; 0xfde: 0x0000


下面是system alias信息,在添加数据文件不指定文件名,ASM 会自动分配即kfade[5].name.+kfade[5].fnum.+kfade[5].finc.组成

kfade[5].name:                   SYSTEM ; 0x1b0: length=6
kfade[5].fnum:                      267 ; 0x1e0: 0x0000010b
kfade[5].finc:                857255903 ; 0x1e4: 0x3318afdf

那么这里system表空间的file name 应该为 system.267.857255903,同理可以通过查看ASM 与数据对应的alias directory找出控制文件,日志文件等相关信息

下面是查询v$datafile的结果

SQL> select  name from v$datafile;

NAME
---------------------------------------------
+DATA/orcl/datafile/system.267.857255903
+DATA/orcl/datafile/sysaux.268.857255903
+DATA/orcl/datafile/undotbs1.269.857255903
+DATA/orcl/datafile/users.270.857255903
+DATA/orcl/datafile/diter.276.857458321

通过alias directory找到了数据文件信息,那么就可以根据这些信息找到file directory au 分布

也可以通过x$kffxp查询相关数据文件au 分布信息

 

SELECT NAME         "FILE NAME",
       NUMBER_KFFXP "FILE NUMBER",
       XNUM_KFFXP   "EXTENT NUMBER",
       DISK_KFFXP   "DISK NUMBER",
       AU_KFFXP     "AU NUMBER",
       SIZE_KFFXP   "NUMBER of AUs"
  FROM x$kffxp, v$asm_alias
 WHERE GROUP_KFFXP = GROUP_NUMBER
   AND NUMBER_KFFXP = FILE_NUMBER
   AND system_created = ‘Y‘
   AND lxn_kffxp = 0
   AND NAME = ‘DITER.276.857458321‘
 ORDER BY NAME;
/

FILE NAME				 FILE NUMBER EXTENT NUMBER DISK NUMBER	AU NUMBER NUMBER of AUs
---------------------------------------- ----------- ------------- ----------- ---------- -------------
DITER.276.857458321				 276		 0	     1	     2233	      1
DITER.276.857458321				 276		 1	     0	     2227	      1
DITER.276.857458321				 276		 2	     2	     2226	      1
DITER.276.857458321				 276		 3	     1	     2235	      1
DITER.276.857458321				 276		 4	     0	     2229	      1
DITER.276.857458321				 276		 5	     2	     2229	      1

-- 前面通过kefed读取的信息:

kfade[9].name:                    DITER ; 0x2e0: length=5
kfade[9].fnum:                      276 ; 0x310: 0x00000114
kfade[9].finc:                857458321 ; 0x314: 0x331bc691



从asm元数据得到了这些信息,就可以通过amdu工具或者dd命令直接将数据文件从asm磁盘组抽取出来,后面会详细介绍。


本文出自 “专注于Oracle性能调优” 博客,谢绝转载!

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。