Working with Oracle ASM and KFOD

Oracle KFOD

The kfod is another one of those great little, hidden Oracle utilities which can be useful in troubleshooting ASM issues without connecting to an ASM instance.

If you have never used it and want to give it a try, you can find it in $GRID_HOME/bin/kfod

KDOF help

Use kfod -help to list all the options, in this blog post I will cover a couple of commands which I have found useful to check ASM redundancy and disk labels.

$ 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]
_b/oot Running in pre-install env (boot=TRUE/FALSE)
_f/lexinfo Provide flexinfo      (_flexinfo=TRUE/FALSE)
_p/atch_lib Patchlib [_patch_lib=<asmclntsh_path>]
_u/ser OS Username
asm_/diskstring ASM Diskstring [asm_diskstring=discoverystring, discoverystring ...]
asmc/ompatibility Include diskgroup ASM compatibility [asmcompatibility=TRUE/(FALSE)]
ce/ll KFOD display OSS site/rack info [cell=TRUE/(FALSE)]
cli/ent_cluster client cluster name
clus_/version cluster version
clust/er KFOD cluster [cluster=TRUE/(FALSE)]
db_/unique_name db_unique_name for ASM instance[db_unique_name=dbname]
dbc/ompatibility Include diskgroup DB compatibility [dbcompatibility=TRUE/(FALSE)]
disk_/access Disk access method [disk_access=DIRECT/(INDIRECT)]
disks Disks to discover [disks=raw,asm,badsize,all]
ds/cvgroup Include group name [dscvgroup=TRUE/(FALSE)]
f/orce Force option to delete files (force=TRUE/FALSE)
g/roup Disks in diskgroup [group=diskgroup]
h/ostlist hostlist[hostlist=host1,host2,...]
l/abel KFOD display disk labels [label=TRUE/(FALSE)]
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
na/me Include disk name [name=TRUE/(FALSE)]
no/hdr KFOD header suppression [nohdr=TRUE/(FALSE)]
ol/r Import credentials to OLR [olr=TRUE/(FALSE)]
op KFOD options type [OP=DISKS/CANDIDATES/MISSING/GROUPS/INSTS/VERSION/PATCHES/PATCHLVL/CLIENTS/RM/RMVERS/DFLTDSTR/GPNPDSTR/METADATA/CREDCRECLUS/GETCLSTYPE/CREDEXPORT/GETASMGUID/CREDDELCLUS/CREDVERIFY/UPGRADEVERIFY/LSCC/CREDLIST/CELLCONFIG/SETDISKACCESSMODE/SETRIMACCESSMODE/ALL]
p/file ASM parameter file [pfile=parameterfile]
r/im_disk_access Rim disk access method [rim_disk_access=DIRECT/(INDIRECT)]
sh/allow Do shallow discovery and report disk cnt [shallow=TRUE/(FALSE)]
st/atus Include disk header status [status=TRUE/(FALSE)]
v/erbose KFOD verbose [verbose=none,errors,warnings,functions,all]
w/rap wrap file for credentials

Check Oracle ASM Home

$ kfod
-------------------------------------------------------------------
ORACLE_SID ORACLE_HOME                                                          
===================================================================
      +ASM /u01/app/19.0.0/grid

Identify ASM Disks Labels

We can use kfod to easily identify ASM Disk Names, Labels and ASM Filter Driver (AFD) labeled disks.

$ kfod op=DISKS label=TRUE disks=ALL name=TRUE
------------------------------------------------------------------------------------------------
Disk       Size Path                         DiskName    Site Failgroup Disk-Label   User  Group   
================================================================================================
1:    1048576 MB /dev/oracleasm/dg_oradata10 DATA_0000      #    #     #             oracle  dba     
2:    1048576 MB /dev/oracleasm/dg_oradata7  DATA_UDEV_0000 #    #     #             oracle  dba     
3:    1048576 MB /dev/oracleasm/dg_oradata8  DATA_UDEV_0001 #    #     #             oracle  dba     
4:    1048576 MB /dev/oracleasm/dg_oradata9  DATA_UDEV_0002 #    #     #             oracle  dba     
5:   10485760 MB /dev/oracleasm/dg_orafra    FRA1           #    #     FRA1          oracle  dba     
6:    1048576 MB /dev/oracleasm/dg_oraredo   CONTROL_REDO1  #    #     CONTROL_REDO1 oracle  dba     
7:    1048576 MB AFD:DATA_AFD1               DATA_AFD1      #    #     DATA_AFD1                  
8:    1048576 MB AFD:DATA_AFD2               DATA_AFD2      #    #     DATA_AFD2                  
9:    1048576 MB AFD:DATA_AFD3               DATA_AFD3      #    #     DATA_AFD3                  
10:   1048576 MB AFD:DATA_TP1                DATA_TP1       #    #     DATA_TP1                  
11:   1048576 MB AFD:DATA_TP2                DATA_TP2       #    #     DATA_TP2                  
12:   1048576 MB AFD:DATA_TP3                DATA_TP3       #    #     DATA_TP3  

Check DiskGroup Redundancy

Below I have used kfod to check my ASM DiskGroup Redundancy, as my ASM DiskGroups are using a Pure Storage FlashArray I have set them to external (EXTERN), offloading the data protection to the All-Flash-Storage Array.

$ kfod op=groups
-------------------------------------------------------------------
Group          Size          Free Redundancy Name           
===================================================================
   1:   10485760 MB   10415296 MB     EXTERN FRA            
   2:    3145728 MB    2097028 MB     EXTERN DATA_UDEV      
   3:    3145728 MB    3145612 MB     EXTERN DATA_TP        
   4:    3145728 MB    3145612 MB     EXTERN DATA_AFD       
   5:    1048576 MB     758128 MB     EXTERN DATA           
   6:    1048576 MB    1048488 MB     EXTERN CONTROL_REDO 

In the next Blog I will look at using kfed to manage ASM meta data.

[twitter-follow screen_name=’RonEkins’ show_count=’yes’]

Leave a Reply

Create a website or blog at WordPress.com

Up ↑

Discover more from Ron Ekins' - Oracle Technology, DevOps and Kubernetes Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading