- ANKUSH THAVALI
- 03 Sep, 2023
- 0 Comments
- 1 Min Read
Useful Asmcmd Commands
This blog contains the list of useful asmcmd commands which are important in your day to day operations.
-
List all diskgroups:
ASMCMD> lsdg -- Include dismounted diskgroups: ASMCMD> lsdg --discovery -- List diskgroups across all nodes of cluster: ASMCMD> lsdg -g --discovery
2. List asm disks:
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
 3. Get attributes of ASM diskgroups:
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%
 4. Unmount diskgroup:
unmount command works only on the local node. So if you want to unmount the diskgroup from all nodes of cluster, then run this command from all the nodes.a. unmount all diskgroups ASMCMD> umount -a b. unmount specific diskgroup(ARCH) ASMCMD> umount ARCH
5. Mount diskgroup:
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
6. Rebalance a diskgroup:
a. here asm_power_limit is 8 and diskgroup is ARCH ASMCMD> rebal --power 8 ARCH Rebal on progress. b. Monitor progress ASMCMD> lsop
7. Get password file of database
ASMCMD> pwget --dbuniquename PRIM
8. Get password file of asm :
ASMCMD> pwget --asm
9. Get asm template info of a diskgroup:
ASMCMD> lstmpl -l -G ARCH
10. Check whether flex asm is enabled or not :
ASMCMD> showclustermode