The following script can be used to quickly see the layout of your filesystems on your disks, which disks are fully used and which have space available.
This script is in The AIX Survival Guide by Andreas Siegert published by Addison-Wesley, Copyright 1996.
The script first gives a summary of all disks, including its volume group, name, size of physical partitions, number of physical partitions that are used, number that are free, the hardware address, and the type of disk it is. Next, details of each disk and the logical volumes that are on the disk are given, including the number of logical partitions and distribution of the data on the disk.
Here is the script:
#!/usr/bin/ksh # diskinfo
export LANG=C export LC_MESSAGES=en_US
DoPV=0 DoFS=0 DoLV=0 DoNA=0
if [[ $# -ge 1 ]] ; then for opt do case $opt in -d) DoPV=1 ;; -f) DoFS=1 ;; -l) DoLV=1 ;; -n) DoNA=1 ;; *) echo "Unknown parameter $opt" echo "Usage:\n$(basename $0) [-d][-f][-l][-n]" echo " -d: disks and volume groups" echo " -f: file systems" echo " -l: logical volumes without file systems" echo " -n: unallocated disks" exit 1 ;; esac done else DoPV=1 DoFS=1 DoLV=1 DoNA=1 fi
echo "Disk report for $(hostname -s) (machine id $(uname -m))\n"