Saturday, 18 May 2013

Show which hdisk(s) each of your filesystems reside on for AIX

Here is a small script to map out which hdisk(s) each of your filesystems reside on for AIX: 
#!/bin/ksh
for vg in `lsvg -o`; do
        for fs in `lsvgfs $vg`; do
                printf "%-22s" $fs;
                for disk in `lsvg -p $vg | tail +3 | awk '{print $1}'`; do
                        lspv -l $disk | grep -q " ${fs}$" && printf "%-8s" $disk;
                done;
                echo
        done;
done

Here is what the output looks like:


0 blogger-disqus:

Post a comment