ADVERTISEMENT

ASMCMD Commands for Oracle ASM

ASMCMD (Automatic Storage Management Command-Line Interface) is used to manage ASM disk groups, disks, instances, and configurations. Below are essential commands categorized by their functions.

General ASM Operations

lsdg                          -- List all ASM disk groups
lsdg --discovery              -- List all (mounted/dismounted) disk groups
lsdg -g --discovery           -- List disk groups across all nodes
lsdsk -k                      -- Show all ASM disks with total/free space

Disk & Disk Group Management

lsdsk -k -G <group>           -- List disks in a specific disk group
lsdsk -t -G <group>           -- Show disk creation timestamps
lsdsk --candidate -k          -- List candidate (unused) ASM disks

umount -a                     -- Unmount all disk groups
umount <group>                -- Unmount specific disk group
mount -a                      -- Mount all disk groups
mount <group>                 -- Mount specific disk group

Disk Group Attributes

lsattr -lm                    -- List all disk group attributes
lsattr -lm -G <group>         -- Show attributes for a specific group
lsattr -lm %<pattern>%        -- Filter attributes by name pattern

Rebalance Operations

rebal --power <n> <group>     -- Rebalance disk group with power limit
lsop                          -- Show rebalance operation progress

Password Files & Templates

pwget --dbuniquename <db>     -- Get password file for a database
pwget --asm                   -- Get ASM instance password file
lstmpl -l -G <group>          -- Show templates for a disk group

ASM Cluster & Configuration

showclustermode               -- Check if Flex ASM is enabled
showclusterstate              -- Show ASM cluster state
showversion                   -- Display ASM software version
spget                         -- Show ASM SPFILE location
spbackup <src> <dest>         -- Backup ASM SPFILE to given path

Advanced Utilities

lsof -G <group>               -- List open files in a disk group
lsof --dbname <db>            -- List open files for a database
afd_state                     -- Check ASM Filter Driver state
afd_lsdsk                     -- List AFD-managed disks (if enabled)

ADVERTISEMENT