在安装GI的时候我们就用到她了(安装的时候kfod会在/tmp的临时目录中)
[root@ohs1 bin]# pwd
/media/stage/ext/bin
[root@ohs1 bin]# echo $LD_LIBRARY_PATH
/media/stage/ext/lib:
[root@ohs1 bin]# id
uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[root@ohs1 bin]# ls
coex kfod.bin lsnodes oifcfg rdbms srawutl
[root@ohs1 bin]# ./kfod.bin nohdr=true verbose=true disks=all status=true op=disks asm_=/dev/oracleasm/disks/ASM*
8189 MEMBER /dev/oracleasm/disks/ASM1 orgrid asmadmin
4102 MEMBER /dev/oracleasm/disks/ASM2 orgrid asmadmin
8181 MEMBER /dev/oracleasm/disks/ASM3 orgrid asmadmin
4102 CANDIDATE /dev/oracleasm/disks/ASM4 orgrid asmadmin
8181 MEMBER /dev/oracleasm/disks/ASM5 orgrid asmadmin
[root@ohs1 bin]#
kfod(12.1.0.2)帮助信息
[oracle@ohs1 ~]$ 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)] 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,...] 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/ALL] p/file ASM parameter file [pfile=parameterfile] r/im_disk_access Rim disk access method [rim_disk_access=DIRECT/(INDIRECT)] s/tatus Include disk header status [status=TRUE/(FALSE)] v/erbose KFOD verbose errors [verbose=TRUE/(FALSE)] w/rap wrap file for credentials [oracle@ohs1 ~]$
常用的命令
kfod status=TRUE asm_diskstring='<your_path_to_ASM_devices>' disks=ALL
kfod命令样例
/pgold/orgrid/oracle/product/121/bin/kfod
[orgrid@ohs1 ~]$ kfod
-------------------------------------------------------------------------------- Disk Size Path User Group ================================================================================ 1: 4102 Mb ORCL:ASM4 -------------------------------------------------------------------------------- ORACLE_SID ORACLE_HOME ================================================================================ [orgrid@ohs1 ~]$
[orgrid@ohs1 ~]$ kfod status=true verbose=true asm_=/dev/oracleasm/disks/ASM* name=true
-------------------------------------------------------------------------------- Disk Size Header Path Diskname User Group ================================================================================ 1: 4102 Mb CANDIDATE /dev/oracleasm/disks/ASM4 ASM5 orgrid asmadmin -------------------------------------------------------------------------------- ORACLE_SID ORACLE_HOME ================================================================================
如果使用了asmlib,可以通过下列方法找到对应的网络磁盘
[orgrid@ohs1 ~]$ ls -l /dev/oracleasm/disks/ASM* brw-rw----. 1 orgrid asmadmin 8, 17 Sep 4 22:35 /dev/oracleasm/disks/ASM1 brw-rw----. 1 orgrid asmadmin 8, 33 Sep 4 22:35 /dev/oracleasm/disks/ASM2 brw-rw----. 1 orgrid asmadmin 8, 34 Sep 4 22:35 /dev/oracleasm/disks/ASM3 brw-rw----. 1 orgrid asmadmin 8, 49 Sep 4 22:35 /dev/oracleasm/disks/ASM4 brw-rw----. 1 orgrid asmadmin 8, 50 Sep 4 22:35 /dev/oracleasm/disks/ASM5 [orgrid@ohs1 ~]$ [orgrid@ohs1 ~]$ oracleasm status Checking if ASM is loaded: yes Checking if /dev/oracleasm is mounted: yes [orgrid@ohs1 ~]$ oracleasm listdisks ASM1 ASM2 ASM3 ASM4 ASM5 [orgrid@ohs1 ~]$ oracleasm querydisk -p ASM1 Disk "ASM1" is a valid ASM disk [orgrid@ohs1 ~]$ oracleasm querydisk -p ASM5 Disk "ASM5" is a valid ASM disk [orgrid@ohs1 ~]$ oracleasm querydisk -p ASM4 Disk "ASM4" is a valid ASM disk Disk label "-v" contains an invalid character [orgrid@ohs1 ~]$ oracleasm querydisk -d ASM1 Disk "ASM1" is a valid ASM disk on device [8,17] [orgrid@ohs1 ~]$ oracleasm querydisk -d ASM2 Disk "ASM2" is a valid ASM disk on device [8,33] [orgrid@ohs1 ~]$ oracleasm querydisk -d ASM3 Disk "ASM3" is a valid ASM disk on device [8,34] [orgrid@ohs1 ~]$ oracleasm querydisk -d ASM4 Disk "ASM4" is a valid ASM disk on device [8,49] [orgrid@ohs1 ~]$ oracleasm querydisk -d ASM5 Disk "ASM5" is a valid ASM disk on device [8,50] [orgrid@ohs1 ~]$[orgrid@ohs1 ~]$ udevadm info --query=path --name=/dev/oracleasm/disks/ASM1
/devices/pci0000:00/0000:00:0d.0/ata3/host2/target2:0:0/2:0:0:0/block/sdb/sdb1
[orgrid@ohs1 ~]$
[orgrid@ohs1 ~]$ udevadm info --query=all --name=/dev/oracleasm/disks/ASM1
P: /devices/pci0000:00/0000:00:0d.0/ata3/host2/target2:0:0/2:0:0:0/block/sdb/sdb1 N: sdb1 W: 110 S: block/8:17 S: disk/by-id/ata-VBOX_HARDDISK_VBf2f33440-ba722249-part1 S: disk/by-id/scsi-SATA_VBOX_HARDDISK_VBf2f33440-ba722249-part1 S: disk/by-path/pci-0000:00:0d.0-scsi-0:0:0:0-part1 S: disk/by-label/ASM1 E: UDEV_LOG=3 E: DEVPATH=/devices/pci0000:00/0000:00:0d.0/ata3/host2/target2:0:0/2:0:0:0/block/sdb/sdb1 E: MAJOR=8 E: MINOR=17 E: DEVNAME=/dev/sdb1 E: DEVTYPE=partition E: SUBSYSTEM=block E: ID_ATA=1 E: ID_TYPE=disk E: ID_BUS=ata E: ID_MODEL=VBOX_HARDDISK E: ID_MODEL_ENC=VBOX\x20HARDDISK\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20 E: ID_REVISION=1.0 E: ID_SERIAL=VBOX_HARDDISK_VBf2f33440-ba722249 E: ID_SERIAL_SHORT=VBf2f33440-ba722249 E: ID_ATA_WRITE_CACHE=1 E: ID_ATA_WRITE_CACHE_ENABLED=1 E: ID_ATA_FEATURE_SET_PM=1 E: ID_ATA_FEATURE_SET_PM_ENABLED=1 E: ID_ATA_SATA=1 E: ID_ATA_SATA_SIGNAL_RATE_GEN2=1 E: ID_SCSI_COMPAT=SATA_VBOX_HARDDISK_VBf2f33440-ba722249 E: ID_PATH=pci-0000:00:0d.0-scsi-0:0:0:0 E: ID_PART_TABLE_TYPE=dos E: ID_FS_LABEL=ASM1 E: ID_FS_LABEL_ENC=ASM1 E: ID_FS_TYPE=oracleasm E: ID_FS_USAGE=filesystem E: LVM_SBIN_PATH=/sbin E: UDISKS_PRESENTATION_NOPOLICY=0 E: UDISKS_PARTITION=1 E: UDISKS_PARTITION_SCHEME=mbr E: UDISKS_PARTITION_NUMBER=1 E: UDISKS_PARTITION_TYPE=0x83 E: UDISKS_PARTITION_SIZE=8587160064 E: UDISKS_PARTITION_SLAVE=/sys/devices/pci0000:00/0000:00:0d.0/ata3/host2/target2:0:0/2:0:0:0/block/sdb E: UDISKS_PARTITION_OFFSET=32256 E: UDISKS_PARTITION_ALIGNMENT_OFFSET=0 E: DEVLINKS=/dev/block/8:17 /dev/disk/by-id/ata-VBOX_HARDDISK_VBf2f33440-ba722249-part1 /dev/disk/by-id/scsi-SATA_VBOX_HARDDISK_VBf2f33440-ba722249-part1 /dev/disk/by-path/pci-0000:00:0d.0-scsi-0:0:0:0-part1 /dev/disk/by-label/ASM1 [orgrid@ohs1 ~]$