Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VVM help

Status
Not open for further replies.

nolim073

IS-IT--Management
Nov 9, 2006
21
US
Hello,
How do i figure out the avilable(free) space in a perticular diskgroup?
 
vxdg -g diskgroup free will list the free disk space on each disk in that group. If a disk is not listed at all it is full. The space is listed in units of 512 byte blocks.

I use this little script called vxdgfreetot to list the total free space for the disk group:

Code:
#!/bin/ksh

[[ -x /usr/bin/nawk ]] && AWK=nawk || AWK=awk

vxdg free | ${AWK} '
        NR > 1 { free[$1]+= $6 }
        END {
                printf "%-20s %20s %20s\n", "GROUP", "BLOCKS_FREE", "MB_FREE"
                for (group in free) {
                        printf "%-20s %20.0f %20.0f\n", group, free[group], free[group]/(2*1024)
                }
        }
'

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top