1

I'm trying to list the size of all files on a volume group in AIX 5.3. I need to backup a volume group and I need to determine if it will fit on the tapes I have available.

This question lists 'pvdisplay' and 'pvs' which aren't available in AIX it seems.

WernerCD
  • 344
  • 2
  • 6
  • 18
  • pvdisplay and friends are LVM commands, and AIX is not Linux. I think this question should be migrated to serverfault. – haimg Dec 14 '11 at 15:55

3 Answers3

2

lsvg -p <volume group> will list the volumes in a volume group (and sizes)
lsvg -l <volume group> will list the logical volumes (and file systems)

To add up file sizes I think you need to look at the file system (du command)

leancz
  • 152
  • 1
  • 7
0

Use the 'lsvgfs' command against your volume group, and then sum the Used column from 'df' for those filesystems.

Demosthenex
  • 111
  • 2
0

You really ought to use a script to make it easier See this post about managing disk space in AIX

The following script will show the space available for each volume group in AIX

printf "Volume Group Name     Total(MB)  Free(MB)   Used(MB)\n"; for vg in `lsvg -o`; do printf "%-18s" $vg; lsvg $vg | perl -nle 'printf "%-11s", $2 if /.*(TOTAL|FREE|USED) PPs:\s+\d+\s+\((\d+) meg.*/'; echo; done | awk '{total+=$2; free+=$3; used+=$4} {print} END{printf "---------\nTotals:           %-10s %-10s %-10s\n", total, free, used}'

this will display

Volume Group Name     Total(MB)  Free(MB)   Used(MB)
appvg             736        132        604      
datavg            424        52         372      
testvg            368        4          364      
rootvg            20448      6784       13664    
---------
Totals:           21976      6972       15004
jc303
  • 126
  • 5