资料引自:
http://askdba.org/weblog/2008/05/ora-15063-asm-discovered-insufficient-amount-of-disks-2/
http://space.itpub.net/7199859/viewspace-660703
在pub上逛,看到http://www.itpub.net/thread-1382800-1-1.html些帖子中提到了kfed (kernel file edit) 这个工具.好奇之下开始google与kfed之相关的文档.
下面是自己整合的部分:
we can also use Oracle utility called kfed to check the problematic disk and verify if disk is part of ASM diskgroup. Kfed is not part of standard oracle installation and has to be generated. Please find below steps for same.
$cd $ORACLE_HOME/rdbms/lib
$ make -f ins_rdbms.mk ikfed
Linking KFED utility (kfed)
rm -f /u01/app/oracle/product/asm10.2/rdbms/lib/kfed
gcc -o /u01/app/oracle/product/asm10.2/rdbms/lib/kfed -L/u01/app/oracle/product/asm10.2/rdbms/lib/ -L/u01/app/oracle/product/asm10.2/lib/ -L/u01/app/oracle/product/asm10.2/lib/stubs/ -L/usr/lib -lirc /u01/app/oracle/product/asm10.2/lib/s0main.o /u01/app/oracle/product/asm10.2/rdbms/lib/sskfeded.o /u01/app/oracle/product/asm10.2/rdbms/lib/skfedpt.o /u01/app/oracle/product/asm10.2/rdbms/lib/defopt.o -ldbtools10 -lclntsh `cat /u01/app/oracle/product/asm10.2/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /u01/app/oracle/product/asm10.2/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lmm -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /u01/app/oracle/product/asm10.2/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /u01/app/oracle/product/asm10.2/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /u01/app/oracle/product/asm10.2/lib/sysliblist` -Wl,-rpath,/u01/app/oracle/product/asm10.2/lib -lm `cat /u01/app/oracle/product/asm10.2/lib/sysliblist` -ldl -lm -L/u01/app/oracle/product/asm10.2/lib
mv -f /u01/app/oracle/product/asm10.2/bin/kfed /u01/app/oracle/product/asm10.2/bin/kfedO
mv: cannot stat `/u01/app/oracle/product/asm10.2/bin/kfed': No such file or directory
make: [ikfed] Error 1 (ignored)
mv /u01/app/oracle/product/asm10.2/rdbms/lib/kfed /u01/app/oracle/product/asm10.2/bin/kfed
(因为kfed不是oracle标准安装部分,因此需要编译才行).
看一下kfed的help (郁闷,竟然没有 --help参数)
$ 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] 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] 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] |
看懂help了吗? 我是没看懂怎么用.接着看老外写的内容了.
Now to use kfed, we need to use synatx as kfed read devicename
->This indicates Redundancy for Group.Check TYPE in query output.
- > This indicates Disk Header status. Here it indicates it is member of Group.
-> This indicates Disk Name
->This indicates the Group Name for the disk.
->This indicates the Failure Group Name.
老外的文档里也只列出了上面几行怎么看.其他地方他让找oracle support.可惜俺水准不够.不会在metalink里找.
老外也很会宣传.让去看这本书
<>
再往下就是引用第二个链接的内容了,这也是位大侠. 不过大侠都不喜欢把参考资料提供出来.
kfed 工具读出的各项内容解释(中文部分是我写的注释)
kfbh.endian
kf3.h /* endianness of writer (字节续.这个跟系统有关) */
Little endian = 1
Big endian = 0
kfbh.hard
kf3.h /* H.A.R.D. magic # and block size */
kfbh.type
kf3.h /* metadata block type */
kfbh.datfmt
kf3.h /* metadata block data format */
kfbh.block
kf3.h /* block location of this block */
blk -- Disk header should have T=0 and NUMB=0x0
obj -- Disk header should have TYPE=0x8 NUMB=
blk and obj values are derived from a series of macros in kf3.h. See "KFBL Macros" in kf3.h for more information. (这段给出了有用的信息,但我还是没google出来. kf3.sh是神马东东?)
kfbh.check
kf3.h /* check value to verify consistency */
kfbh.fcn
kf3.h /* change number of last change */
(kfbh.spare1 kfbh.spare2 这里没有讲)
kfdhdb.driver
kf3.h /* OSMLIB driver reserved block */
If no driver is defined "ORCLDISK" is used.
kfdhdb.compat
kf3.h /* Comaptible software version */
example: 0x0a100000
You get:
a=10 1=1 so10.1.0.0.0
kfdhdb.dsknum
kf3.h /* OSM disk number *
This is the disk number. The first disk being "0". There can be up to
ub2 disks in a diskgroup. This allows for 65336 disks 0 through 65335.
kfdhdb.grptyp
kf3.h /* Disk group type (上面老外有说明) */
kfdhdb.hdrsts
kf3.h /* Disk header status (上面老外有说明) */
This is what is used to determine if a disk is available or not to
the diskgroup. 0x03 is the correct value for a valid status.
kfdhdb.dskname /* OSM disk name (上面老外有说明) */
kfdhdb.grpname /* OSM disk group name (上面老外有说明) */
kfdhdb.fgname /* Failure group name (上面老外有说明)*/
kfdhdb.capname /* Capacity grp, unused*/
kf3.h
kfdhdb.crestmp /* Creation timestamp */
kfdhdb.mntstmp /*Mounttimestamp */
kf3.h To derive the hi and low time`from an unformated dump use the
"KFTS Macros" in kf3.h.
kfdhdb.secsize
kf3.h /* Disk sector size (bytes) */
This is the physical sector size of the disk in bytes. All I/O's to the
disk are described in physical sectors. This must be a power of 2. An
ideal value would be 4096, but most disks are formatted with 512 byte
sectors. (from asmlib.h)
kfdhdb.blksize
kf3.h /* Metadata block (bytes) */
kfdhdb.ausize
kf3.h /* Allocation Unit (bytes) */
kfdhdb.mfact
kf3.h /* Stride between phys addr AUs */
kfdhdb.dsksize
kf3.h /* Disk size in AUs */
Mulitply by AUs to get actual size of disk when added.
kfdhdb.pmcnt
kf3.h /* Permanent phys addressed AUs */
Number of physically addressed allocation units.
kfdhdb.fstlocn
kf3.h /* First FreeSpace table blk num */
Used to find freespace.
kfdhdb.altlocn
kf3.h /* First Alocation table blk num */
Used to find alocated space.
kfdhdb.f1b1locn
kf3.h /* File Directory blk 1 AU num */
Beginging for file directory.
这以下的就没有写了
kfdhdb.redomirrors
kfdhdb.dbcompat
kfdhdb.grpstmp
kfdhdb.ub4spare
kfdhdb.acdb.
kf3.h是一个神马东东?
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11780477/viewspace-682730/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/11780477/viewspace-682730/