当前位置: 首页 > news >正文

ASM kfed工具的部分说明

资料引自:

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) 这个工具.好奇之下开始googlekfed之相关的文档.

 

下面是自己整合的部分:

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标准安装部分,因此需要编译才行).

 

看一下kfedhelp (郁闷,竟然没有 --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/

相关文章:

  • sqlplus uptime过久事件
  • RMAN-06207 rman恢复数据库后备份delete出错
  • RMAN异库恢复之EM(1)
  • RMAN异库恢复之EM(2)遭遇 2010/12/31 root认证过期 bug
  • 丢失redo log的恢复
  • RMAN异库恢复之EM(3)
  • LOCK_SGA=TRUE causes an ORA-27126 during database startup on AIX
  • exp/imp parfile 用到的参数
  • 日志挖掘
  • RMAN备份脚本
  • sqlldr 控制文件样例
  • 审计相关
  • RAC 修改IP (转)
  • oracle oem 启动不起来(半解决)
  • 还是oem
  • JavaScript-如何实现克隆(clone)函数
  • 【跃迁之路】【463天】刻意练习系列222(2018.05.14)
  • Create React App 使用
  • Java面向对象及其三大特征
  • session共享问题解决方案
  • 彻底搞懂浏览器Event-loop
  • 开发基于以太坊智能合约的DApp
  • 力扣(LeetCode)56
  • 聊聊flink的BlobWriter
  • 项目管理碎碎念系列之一:干系人管理
  • ​MPV,汽车产品里一个特殊品类的进化过程
  • # .NET Framework中使用命名管道进行进程间通信
  • #预处理和函数的对比以及条件编译
  • $(selector).each()和$.each()的区别
  • (Matlab)遗传算法优化的BP神经网络实现回归预测
  • (ZT) 理解系统底层的概念是多么重要(by趋势科技邹飞)
  • (待修改)PyG安装步骤
  • (全注解开发)学习Spring-MVC的第三天
  • (转)winform之ListView
  • (转)创业的注意事项
  • (转载)Google Chrome调试JS
  • (最全解法)输入一个整数,输出该数二进制表示中1的个数。
  • .Net 8.0 新的变化
  • .NET Core Web APi类库如何内嵌运行?
  • .Net IOC框架入门之一 Unity
  • .NET MVC第三章、三种传值方式
  • .NetCore 如何动态路由
  • .net获取当前url各种属性(文件名、参数、域名 等)的方法
  • .NET平台开源项目速览(15)文档数据库RavenDB-介绍与初体验
  • .Net中wcf服务生成及调用
  • @ComponentScan比较
  • @SpringBootApplication 包含的三个注解及其含义
  • @德人合科技——天锐绿盾 | 图纸加密软件有哪些功能呢?
  • [2544]最短路 (两种算法)(HDU)
  • [AIGC codze] Kafka 的 rebalance 机制
  • [AIGC] Spring Interceptor 拦截器详解
  • [BUG]Datax写入数据到psql报不能序列化特殊字符
  • [bzoj1324]Exca王者之剑_最小割
  • [C]编译和预处理详解
  • [CareerCup] 14.5 Object Reflection 对象反射