当前位置:  数据库>oracle

Oracle入门教程:ASM的kfed工具

    来源: 互联网  发布时间:2017-04-23

    本文导语:  ASM常用kfod来获取ASM磁盘组的物理磁盘信息,其用法如下: -bash-3.2$ kfod -help_asm_a/llow_only_raw_disks              KFOD allow only raw devices [_asm_allow_only_raw_disks=TRUE/(FALSE)]_asm_l/ibraries         ASM Libraries[_asm_libraries='lib1',&#...

ASM常用kfod来获取ASM磁盘组的物理磁盘信息,其用法如下:

-bash-3.2$ kfod -help
_asm_a/llow_only_raw_disks              KFOD allow only raw devices [_asm_allow_only_raw_disks=TRUE/(FALSE)]
_asm_l/ibraries         ASM Libraries[_asm_libraries='lib1','lib2',...]
_asms/id                ASM Instance[_asmsid=sid]
a/sm_diskstring         ASM Diskstring [asm_diskstring='discoverystring', 'discoverystring' ...]
d/isks          Disks to discover [disks=raw,asm,all]
g/roup          Group discover [group=controlfile]
n/ohdr          KFOD header suppression [nohdr=TRUE/(FALSE)]
o/p             KFOD options type [OP=DISKS/GROUPS/ALL]
p/file          ASM parameter file [pfile='parameterfile']
s/tatus         Include disk header status [status=TRUE/(FALSE)]
v/erbose                KFOD verbose errors [verbose=TRUE/(FALSE)]










获取asm磁盘的情况:

-bash-3.2$ kfod disk=all
--------------------------------------------------------------------------------
 Disk          Size Path      
================================================================================
   1:       8032 Mb /dev/raw/raw3
--------------------------------------------------------------------------------
Oracle_SID ORACLE_HOME                                                          
================================================================================
     +ASM1 /opt/rac/database      
而kfed工具支持对于ASM信息的READ/WRITE/MERGE/NEW/ FORM/FIND/STRUCT等操作,但是需要手工编译









-bash-3.2$ cd $ORACLE_HOME/rdbms/lib 

-bash-3.2$ make -f ins_rdbms.mk ikfed

Linking KFED utility (kfed)
rm -f /opt/rac/database/rdbms/lib/kfed
gcc -o /opt/rac/database/rdbms/lib/kfed -L/opt/rac/database/rdbms/lib/ -L/opt/rac/database/lib/ -L/opt/rac/database/lib/stubs/ -L/usr/lib -lirc  /opt/rac/database/lib/s0main.o /opt/rac/database/rdbms/lib/sskfeded.o /opt/rac/database/rdbms/lib/skfedpt.o  /opt/rac/database/rdbms/lib/defopt.o -ldbtools10 -lclntsh  `cat /opt/rac/database/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /opt/rac/database/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 /opt/rac/database/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /opt/rac/database/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 /opt/rac/database/lib/sysliblist` -Wl,-rpath,/opt/rac/database/lib -lm    `cat /opt/rac/database/lib/sysliblist` -ldl -lm   -L/opt/rac/database/lib
mv -f /opt/rac/database/bin/kfed /opt/rac/database/bin/kfedO
mv /opt/rac/database/rdbms/lib/kfed /opt/rac/database/bin/kfed
chmod 751 /opt/rac/database/bin/kfed
-bash-3.2$ 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]
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]

如下是用法:

-bash-3.2$ kfed read /dev/raw/raw3
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:                  1684278340 ; 0x00c: 0x64640c44
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
kfdhdb.dskname:               DATA_0000 ; 0x028: length=9
kfdhdb.grpname:                    DATA ; 0x048: length=4
kfdhdb.fgname:                DATA_0000 ; 0x068: length=9
kfdhdb.capname:                         ; 0x088: length=0
kfdhdb.crestmp.hi:             32949937 ; 0x0a8: HOUR=0x11 DAYS=0x15 MNTH=0x1 YEAR=0x7db
kfdhdb.crestmp.lo:           3184248832 ; 0x0ac: USEC=0x0 MSEC=0x2f2 SECS=0x1c MINS=0x2f
kfdhdb.mntstmp.hi:             32967145 ; 0x0b0: HOUR=0x9 DAYS=0xf MNTH=0x2 YEAR=0x7dc
kfdhdb.mntstmp.lo:           2981271552 ; 0x0b4: USEC=0x0 MSEC=0xa6 SECS=0x1b MINS=0x2c
kfdhdb.secsize:                     512 ; 0x0b8: 0x0200
kfdhdb.blksize:                    4096 ; 0x0ba: 0x1000
kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000
kfdhdb.mfact:                    113792 ; 0x0c0: 0x0001bc80
kfdhdb.dsksize:                    8032 ; 0x0c4: 0x00001f60
kfdhdb.pmcnt:                         2 ; 0x0c8: 0x00000002
kfdhdb.fstlocn:                       1 ; 0x0cc: 0x00000001
kfdhdb.altlocn:                       2 ; 0x0d0: 0x00000002
kfdhdb.f1b1locn:                      2 ; 0x0d4: 0x00000002
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:             32949937 ; 0x0e4: HOUR=0x11 DAYS=0x15 MNTH=0x1 YEAR=0x7db
kfdhdb.grpstmp.lo:           3183422464 ; 0x0e8: USEC=0x0 MSEC=0x3cb SECS=0x1b MINS=0x2f
kfdhdb.ub4spare[0]:                   0 ; 0x0ec: 0x00000000
kfdhdb.ub4spare[1]:                   0 ; 0x0f0: 0x00000000
kfdhdb.ub4spare[2]:                   0 ; 0x0f4: 0x00000000
kfdhdb.ub4spare[3]:                   0 ; 0x0f8: 0x00000000
kfdhdb.ub4spare[4]:                   0 ; 0x0fc: 0x00000000
kfdhdb.ub4spare[5]:                   0 ; 0x100: 0x00000000
kfdhdb.ub4spare[6]:                   0 ; 0x104: 0x00000000
kfdhdb.ub4spare[7]:                   0 ; 0x108: 0x00000000
kfdhdb.ub4spare[8]:                   0 ; 0x10c: 0x00000000
kfdhdb.ub4spare[9]:                   0 ; 0x110: 0x00000000
kfdhdb.ub4spare[10]:                  0 ; 0x114: 0x00000000
kfdhdb.ub4spare[11]:                  0 ; 0x118: 0x00000000
kfdhdb.ub4spare[12]:                  0 ; 0x11c: 0x00000000
kfdhdb.ub4spare[13]:                  0 ; 0x120: 0x00000000
kfdhdb.ub4spare[14]:                  0 ; 0x124: 0x00000000
kfdhdb.ub4spare[15]:                  0 ; 0x128: 0x00000000
kfdhdb.ub4spare[16]:                  0 ; 0x12c: 0x00000000
kfdhdb.ub4spare[17]:                  0 ; 0x130: 0x00000000
kfdhdb.ub4spare[18]:                  0 ; 0x134: 0x00000000
kfdhdb.ub4spare[19]:                  0 ; 0x138: 0x00000000
kfdhdb.ub4spare[20]:                  0 ; 0x13c: 0x00000000
kfdhdb.ub4spare[21]:                  0 ; 0x140: 0x00000000
kfdhdb.ub4spare[22]:                  0 ; 0x144: 0x00000000
kfdhdb.ub4spare[23]:                  0 ; 0x148: 0x00000000
kfdhdb.ub4spare[24]:                  0 ; 0x14c: 0x00000000
kfdhdb.ub4spare[25]:                  0 ; 0x150: 0x00000000
kfdhdb.ub4spare[26]:                  0 ; 0x154: 0x00000000
kfdhdb.ub4spare[27]:                  0 ; 0x158: 0x00000000
kfdhdb.ub4spare[28]:                  0 ; 0x15c: 0x00000000
kfdhdb.ub4spare[29]:                  0 ; 0x160: 0x00000000
kfdhdb.ub4spare[30]:                  0 ; 0x164: 0x00000000
kfdhdb.ub4spare[31]:                  0 ; 0x168: 0x00000000
kfdhdb.ub4spare[32]:                  0 ; 0x16c: 0x00000000
kfdhdb.ub4spare[33]:                  0 ; 0x170: 0x00000000
kfdhdb.ub4spare[34]:                  0 ; 0x174: 0x00000000
kfdhdb.ub4spare[35]:                  0 ; 0x178: 0x00000000
kfdhdb.ub4spare[36]:                  0 ; 0x17c: 0x00000000
kfdhdb.ub4spare[37]:                  0 ; 0x180: 0x00000000
kfdhdb.ub4spare[38]:                  0 ; 0x184: 0x00000000
kfdhdb.ub4spare[39]:                  0 ; 0x188: 0x00000000
kfdhdb.ub4spare[40]:                  0 ; 0x18c: 0x00000000
kfdhdb.ub4spare[41]:                  0 ; 0x190: 0x00000000
kfdhdb.ub4spare[42]:                  0 ; 0x194: 0x00000000
kfdhdb.ub4spare[43]:                  0 ; 0x198: 0x00000000
kfdhdb.ub4spare[44]:                  0 ; 0x19c: 0x00000000
kfdhdb.ub4spare[45]:                  0 ; 0x1a0: 0x00000000
kfdhdb.ub4spare[46]:                  0 ; 0x1a4: 0x00000000
kfdhdb.ub4spare[47]:                  0 ; 0x1a8: 0x00000000
kfdhdb.ub4spare[48]:                  0 ; 0x1ac: 0x00000000
kfdhdb.ub4spare[49]:                  0 ; 0x1b0: 0x00000000
kfdhdb.ub4spare[50]:                  0 ; 0x1b4: 0x00000000
kfdhdb.ub4spare[51]:                  0 ; 0x1b8: 0x00000000
kfdhdb.ub4spare[52]:                  0 ; 0x1bc: 0x00000000
kfdhdb.ub4spare[53]:                  0 ; 0x1c0: 0x00000000
kfdhdb.ub4spare[54]:                  0 ; 0x1c4: 0x00000000
kfdhdb.ub4spare[55]:                  0 ; 0x1c8: 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











































































































如上就是读取到的ASM磁盘头信息。























    
 
 
 
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • 求助:oracle9在redhat9上安装好后,oracle管理工具会在菜单工具栏上显示吗?
  • Oracle 数据库开发工具 Oracle SQL Developer
  • 有谁知道Oracle8的数据库管理工具是用什么开发工具编写的?
  • Oracle数据库开发工具 SQLTools
  • Oracle 11g 相关工具netca,dbca乱码之解决
  • Oracle数据库对比工具 DBT
  • Oracle开发工具 Oracle SQL Handler
  • Oracle数据库工具 WARTS
  • Oracle发布Oracle SQL Developer 1.2数据库开发工具 帮助用户简化开发工作
  • Oracle管理工具 phpOraAdmin
  • 通过win2000在linux上安装oracle,需要一个什么工具?在哪有下?
  • 使用工具 plsqldev将Excel导入Oracle数据库
  • Oracle数据库备份和恢复工具 RMan
  • Oracle XML 开发人员工具包 XDK
  • Oracle为Eclispe工具发布11g企业包
  • Oracle数据库专享工具:SQL*Loader介绍
  • [Oracle] 常用工具集之SQL*Loader的用法
  • 高分请教:有没有在linux使用的oracle数据库操作工具,如Golden,pl/sqlDeveloper之类.
  • 使用Linux下script工具记录Oracle输出
  • Oracle 高速批量数据加载工具sql*loader使用说明
  • Oracle 12c发布简单介绍及官方下载地址
  • 在linux下安装oracle,如何设置让oracle自动启动!也就是让oracle那个服务自动启动,不是手动的
  • oracle 11g最新版官方下载地址
  • 请问su oracle 和su - oracle有什么不同?
  • Oracle 数据库(oracle Database)Select 多表关联查询方式
  • 虚拟机装Oracle R12与Oracle10g
  • Oracle数据库(Oracle Database)体系结构及基本组成介绍
  • Oracle EBS R12 支持 Oracle Database 11g
  • 如何设置让Oracle SQL Developer显示的时间包含时分秒
  • SCO unix下安装oracle,但没有光盘,请大家推荐一个oracle下载站点(unix版本的)。谢谢!!!!
  • Oracle 10g和Oracle 11g网格技术介绍


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,,E-mail:www_#163.com(请将#改为@)

    浙ICP备11055608号-3