Show disk group, disk and directory usage with asmcmd (lsdg / lsdsk / du)
OracleASMCommand
# As the grid user, with ORACLE_SID=+ASM1 (or +ASM):
asmcmd lsdg
# Disks in the disk group: -k sizes, -p state (header/mount/mode):
asmcmd lsdsk -k -G <diskgroup>
asmcmd lsdsk -p -G <diskgroup>
# I/O error and timing statistics:
asmcmd lsdsk --statistics -G <diskgroup>
# Disks that can be added (CANDIDATE/PROVISIONED/FORMER):
asmcmd lsdsk --candidate -p
# Space used by a database directory (MB):
asmcmd du +<diskgroup>/<db_unique_name>
asmcmd ls -l -s +<diskgroup>/<db_unique_name>/DATAFILEWhat it does
Shows from the command line the redundancy, total/free space and Usable_file_MB of disk groups, the state of the disks and the space a database occupies in ASM.
When to use it
For capacity checks, to identify candidate disks before adding disks, and to find which database consumes space when a "disk group full" alert fires.
Caution
Read-only. If Usable_file_MB in lsdg is negative, the disk group cannot restore redundancy after losing a disk/failgroup; free space or add disks immediately. du returns two values: Used_MB and Mirror_used_MB (mirrored usage).