KFOD: An ASM Hidden Goodie…. May 18, 2008
Posted by Aman Sharma in Random Stuff.trackback
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:
- Run the ALTER DISKGROUP…ADD DISK and ALTER DISKGROUP…RESIZE DISK commands
- 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
oracle@asm]/home/oracle> kfod help=y
_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)]
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
——————————————————————————–
ORACLE_SID ORACLE_HOME
==================================================================
+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
——————————————————————————–
ORACLE_SID ORACLE_HOME
====================================================================
+ASM2 /u01/app/oracle/product/asm10.2
+ASM1 /u01/app/oracle/product/asm10.2
[oracle@asm]/home/oracle>kfod asm_diskstring=’/raw/*’ disks=all
——————————————————————————–
ORACLE_SID ORACLE_HOME
====================================================================
+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.

Have you disabled pingback on this post. Look’s like my Blog will get some traffic
Where do you normally write about Oracle stuff..
Hey Amit,
? I am supposed to write about Oracle related posts here too but I don’t do it much.I prepare my notes and write there only.But there are blogs that I have where I am going to start writing my Oracle stuff.As soon as I shall start, will ping to you.
Thanks for coming to my blog! Nah I haven’t disabled.Still I shall check again.
>>Where do you normally write about Oracle stuff..
LOL sir I don’t know anything about Oracle so how can I write
Cheers
Aman….
Hi Aman,
My blog has moved to a new location. You can update the links http://www.askdba.org/weblog/
Cheers
Amit
Amit,
.
Yes sir I got it.Too much trouble for a lazy guy like me to do it again and again
Cheers
Aman….
Hi Amit,
Sent you a mail.Check it out.
Aman….
i have not recd mail on that id too
..Anyways can u remove my email id from your previous comment..I dont want to use that id
.. and resend the mail to the id I have u..also delete this comment ..
Thanks
Amit