ITPub博客

首页 > 数据库 > Oracle > 【ORACLE ASM】ASM 支持工具简介

【ORACLE ASM】ASM 支持工具简介

原创 Oracle 作者:renjixinchina 时间:2014-02-17 16:53:25 0 删除 编辑

1.      KFOD

 KFOD 可以从系统级别发现ASM实例 及查看磁盘信息

[grid@oracle10g ~]$ 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 ...]

c/luster                KFOD cluster [cluster=TRUE/(FALSE)]

db/_unique_name         db_unique_name for ASM instance[db_unique_name=dbname]

di/sks          Disks to discover [disks=raw,asm,all]

ds/cvgroup              Include group name [dscvgroup=TRUE/(FALSE)]

g/roup          Disks in diskgroup [group=diskgroup]

h/ostlist               hostlist[hostlist=host1,host2,...]

metadata_a/usize                AU Size for Metadata Size Calculation

metadata_c/lients               Client Count for Metadata Size Calculation

metadata_d/isks         Disk Count for Metadata Size Calculation

metadata_n/odes         Node Count for Metadata Size Calculation

metadata_r/edundancy            Redundancy for Metadata Size Calculation

n/ohdr          KFOD header suppression [nohdr=TRUE/(FALSE)]

o/p             KFOD options type [OP=DISKS/CANDIDATES/MISSING/GROUPS/INSTS/VERSION/CLIENTS/RM/RMVERS/DFLTDSTR/GPNPDSTR/METADATA/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)]

 

 

[grid@node1 ~]$ kfod disk=all

--------------------------------------------------------------------------------

 Disk          Size Path                                     User     Group  

================================================================================

   1:       1024 Mb /dev/asm-diskb                           grid     asmadmin

   2:       1024 Mb /dev/asm-diskc                           grid     asmadmin

   3:       1024 Mb /dev/asm-diskd                           grid     asmadmin

   4:       5120 Mb /dev/asm-diske                           grid     asmadmin

   5:       5120 Mb /dev/asm-diskf                           grid     asmadmin

   6:      10536 Mb /dev/asm-diskg                           grid     asmadmin

--------------------------------------------------------------------------------

ORACLE_SID ORACLE_HOME                                                         

================================================================================

     +ASM2 /u01/app/11.2.0/grid                                                

     +ASM1 /u01/app/11.2.0/grid

2.      KFED - Kernel Files metadata EDitor

  KFEDBBED类似可以查看和修改ASM DISK HEADER 信息

11.1 以前版本需要编译以后才可以使用

[grid@oracle10g ~]$ 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]

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]

 

 

[grid@oracle10g ~]$ 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]—制定AU大小

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]

[grid@oracle10g ~]$  kfed read  /dev/sdb

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: blk=0

kfbh.block.obj:              2147483648 ; 0x008: disk=0

kfbh.check:                  3997357835 ; 0x00c: 0xee42d70b

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:                186646528 ; 0x020: 0x0b200000

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:             32999878 ; 0x0a8: HOUR=0x6 DAYS=0xe MNTH=0x2 YEAR=0x7de

kfdhdb.crestmp.lo:            969903104 ; 0x0ac: USEC=0x0 MSEC=0x3e3 SECS=0x1c MINS=0xe

kfdhdb.mntstmp.hi:             32999878 ; 0x0b0: HOUR=0x6 DAYS=0xe MNTH=0x2 YEAR=0x7de

kfdhdb.mntstmp.lo:            984581120 ; 0x0b4: USEC=0x0 MSEC=0x3e1 SECS=0x2a MINS=0xe

kfdhdb.secsize:                     512 ; 0x0b8: 0x0200

kfdhdb.blksize:                    4096 ; 0x0ba: 0x1000

kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000

kfdhdb.mfact:                    113792 ; 0x0c0: 0x0001bc80

kfdhdb.dsksize:                    2048 ; 0x0c4: 0x00000800

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:             32999878 ; 0x0e4: HOUR=0x6 DAYS=0xe MNTH=0x2 YEAR=0x7de

kfdhdb.grpstmp.lo:            967849984 ; 0x0e8: USEC=0x0 MSEC=0xe SECS=0x1b MINS=0xe

kfdhdb.vfstart:                       0 ; 0x0ec: 0x00000000

kfdhdb.vfend:                         0 ; 0x0f0: 0x00000000

kfdhdb.spfile:                        0 ; 0x0f4: 0x00000000

kfdhdb.spfflg:                        0 ; 0x0f8: 0x00000000

kfdhdb.ub4spare[0]:                   0 ; 0x0fc: 0x00000000

kfdhdb.ub4spare[1]:                   0 ; 0x100: 0x00000000

kfdhdb.ub4spare[2]:                   0 ; 0x104: 0x00000000

kfdhdb.ub4spare[3]:                   0 ; 0x108: 0x00000000

kfdhdb.ub4spare[4]:                   0 ; 0x10c: 0x00000000

kfdhdb.ub4spare[5]:                   0 ; 0x110: 0x00000000

kfdhdb.ub4spare[6]:                   0 ; 0x114: 0x00000000

kfdhdb.ub4spare[7]:                   0 ; 0x118: 0x00000000

kfdhdb.ub4spare[8]:                   0 ; 0x11c: 0x00000000

kfdhdb.ub4spare[9]:                   0 ; 0x120: 0x00000000

kfdhdb.ub4spare[10]:                  0 ; 0x124: 0x00000000

kfdhdb.ub4spare[11]:                  0 ; 0x128: 0x00000000

kfdhdb.ub4spare[12]:                  0 ; 0x12c: 0x00000000

kfdhdb.ub4spare[13]:                  0 ; 0x130: 0x00000000

kfdhdb.ub4spare[14]:                  0 ; 0x134: 0x00000000

kfdhdb.ub4spare[15]:                  0 ; 0x138: 0x00000000

kfdhdb.ub4spare[16]:                  0 ; 0x13c: 0x00000000

kfdhdb.ub4spare[17]:                  0 ; 0x140: 0x00000000

kfdhdb.ub4spare[18]:                  0 ; 0x144: 0x00000000

kfdhdb.ub4spare[19]:                  0 ; 0x148: 0x00000000

kfdhdb.ub4spare[20]:                  0 ; 0x14c: 0x00000000

kfdhdb.ub4spare[21]:                  0 ; 0x150: 0x00000000

kfdhdb.ub4spare[22]:                  0 ; 0x154: 0x00000000

kfdhdb.ub4spare[23]:                  0 ; 0x158: 0x00000000

kfdhdb.ub4spare[24]:                  0 ; 0x15c: 0x00000000

kfdhdb.ub4spare[25]:                  0 ; 0x160: 0x00000000

kfdhdb.ub4spare[26]:                  0 ; 0x164: 0x00000000

kfdhdb.ub4spare[27]:                  0 ; 0x168: 0x00000000

kfdhdb.ub4spare[28]:                  0 ; 0x16c: 0x00000000

kfdhdb.ub4spare[29]:                  0 ; 0x170: 0x00000000

kfdhdb.ub4spare[30]:                  0 ; 0x174: 0x00000000

kfdhdb.ub4spare[31]:                  0 ; 0x178: 0x00000000

kfdhdb.ub4spare[32]:                  0 ; 0x17c: 0x00000000

kfdhdb.ub4spare[33]:                  0 ; 0x180: 0x00000000

kfdhdb.ub4spare[34]:                  0 ; 0x184: 0x00000000

kfdhdb.ub4spare[35]:                  0 ; 0x188: 0x00000000

kfdhdb.ub4spare[36]:                  0 ; 0x18c: 0x00000000

kfdhdb.ub4spare[37]:                  0 ; 0x190: 0x00000000

kfdhdb.ub4spare[38]:                  0 ; 0x194: 0x00000000

kfdhdb.ub4spare[39]:                  0 ; 0x198: 0x00000000

kfdhdb.ub4spare[40]:                  0 ; 0x19c: 0x00000000

kfdhdb.ub4spare[41]:                  0 ; 0x1a0: 0x00000000

kfdhdb.ub4spare[42]:                  0 ; 0x1a4: 0x00000000

kfdhdb.ub4spare[43]:                  0 ; 0x1a8: 0x00000000

kfdhdb.ub4spare[44]:                  0 ; 0x1ac: 0x00000000

kfdhdb.ub4spare[45]:                  0 ; 0x1b0: 0x00000000

kfdhdb.ub4spare[46]:                  0 ; 0x1b4: 0x00000000

kfdhdb.ub4spare[47]:                  0 ; 0x1b8: 0x00000000

kfdhdb.ub4spare[48]:                  0 ; 0x1bc: 0x00000000

kfdhdb.ub4spare[49]:                  0 ; 0x1c0: 0x00000000

kfdhdb.ub4spare[50]:                  0 ; 0x1c4: 0x00000000

kfdhdb.ub4spare[51]:                  0 ; 0x1c8: 0x00000000

kfdhdb.ub4spare[52]:                  0 ; 0x1cc: 0x00000000

kfdhdb.ub4spare[53]:                  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

 

3.      AMDU

AMDU常用的场景有两个

1 dump 磁盘组的源数据进行分析

amdu -diskstring '

如果没有指定 -directory.参数

将在执行命令的当前目录生成一个文件夹

2 磁盘组无法mount 时将asm文件抽出到文件系统

 amdu -diskstring -extract DATA.256 


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15747463/viewspace-1082691/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-01-30

  • 博文量
    373
  • 访问量
    2061221