Sunday, May 18, 2008

KFOD:An ASM Hidden Goodie....

Automatic Storage Management(ASM) is one of the most exciting yet most confusion creating invention that Oracle has done. This feature has added lots of benefits but still, there are a lot of issues that come with it.

To manage ASM, we need RAW devices and one of the most common issues in ASM is the configuration or discovery of the disks. For this the parameter asm_diskstring is there but 9/10 times , this parameter doesn't give the results which are expected. While browsing OTN forums, I read a thread where there was a discussion about a utility called KFOD utility which can help to troubleshoot the errors coming for the disk discoveries. Its an undocumented ( I believe) utility but Amit Bansal has described it in good length over his blog post.. I am just quoting the entire post here just for my own reference but the entire credit for this post goes to Amit only.

While creating ASM diskgroup or adding new disk to a existing diskgroup, Disk should be visible in V$ASM_DISK.

ASM discovers and examines the contents of all of the disks that are in the paths that you designated with values in the ASM_DISKSTRING initialization parameter.

As per Oracle Docs, Disk discovery also occurs when you:


- Query the V$ASM_DISKGROUP and V$ASM_DISK views

Note: - You should try to use V$ASM_DISK_STAT to get faster results as access to this view does not lead to Disk Discovery.

While creating ASM Diskgroup, Disk Discovery is the most common issue. This is mostly due to Disk permission issue or incorrect setting for ASM_DISKSTRING parameter.

So as to check this , you can use KFOD utility provided by Oracle.

This can be found in $ASM_HOME/bin directory. Help can be seen using
oracle@asm]/home/oracle> kfod help=y

_asm_a/llow_only_raw_disks              KFOD allow only raw devices [_asm_allow_


_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)]

KFOD-01000: file not found

To discover the disks , you need to use disks=all clause

[oracle@asm] /home/oracle>kfod disks=all
kfod disks=all
 Disk          Size Path
   1:     345648 Mb /dev/sda7
     +ASM2 /u01/app/oracle/product/asm10.2
     +ASM1 /u01/app/oracle/product/asm10.2

As seen from help menu, we can use raw and asm as option. One more important parameter which can be used is asm_diskstring to make sure that problem is not with initialization parameter.
[oracle@asm]/home/oracle>kfod asm_diskstring=’/raw/*’ disks=all
     +ASM2 /u01/app/oracle/product/asm10.2
     +ASM1 /u01/app/oracle/product/asm10.2

By default asm_diskstring looks in all the directories.

ASM is a nice tool but I guess still there is a lot of research is required for it, at least by me. Thanks Amit for this nice post.


Post a Comment

<< Home