This blog contains the list of useful asmcmd commands which are important in your day to day operations.
ASMCMD> lsdg -- Include dismounted diskgroups: ASMCMD> lsdg --discovery -- List diskgroups across all nodes of cluster: ASMCMD> lsdg -g --discovery
a.List all asm disks ASMCMD> lsdsk -k b. List disks of a diskgroup(CDATA) with free and total MB ASMCMD> lsdsk -k -G CDATA c. List disks of a diskgroup(CDATA) with group and disk number ASMCMD> lsdsk -p -G CDATA d. List disks with disk creation date ASMCMD> lsdsk -t -G CDATA e. List candidiate disks only ASMCMD> lsdsk --candidate -k f. List member disks only ASMCMD> lsdsk --candidate -p
a. List attribute of all diskgroups: ASMCMD> lsattr -lm b. List attribute of specific diskgroup(DMARCH) ASMCMD> lsattr -lm -G DMARCH Group_Name Name Value RO Sys DMARCH access_control.enabled FALSE N Y DMARCH access_control.umask 066 N Y DMARCH au_size 1048576 Y Y DMARCH cell.smart_scan_capable FALSE N N c. List attributes with specific pattern ASMCMD> lsattr -lm %au_size%
a. unmount all diskgroups ASMCMD> umount -a b. unmount specific diskgroup(ARCH) ASMCMD> umount ARCH
Mount command works only on the local node. So if you want to Mount the diskgroup from all nodes of cluster, then run this command from all the nodes.
a. mount all diskgroups on local node ASMCMD> mount -a b. mount a specific diskgroup on local node ASMCMD> mount ARCH
a. here asm_power_limit is 8 and diskgroup is ARCH ASMCMD> rebal --power 8 ARCH Rebal on progress. b. Monitor progress ASMCMD> lsop
ASMCMD> pwget --dbuniquename PRIM
ASMCMD> pwget --asm
ASMCMD> lstmpl -l -G ARCH
ASMCMD> showclustermode