Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have following situation:

=$ LC_ALL=C df -hP | column -t
Filesystem              Size  Used  Avail  Use%  Mounted  on
/dev/mapper/vg0-rootlv  19G   854M  17G    5%    /
/dev/mapper/vg0-homelv  19G   343M  18G    2%    /home
/dev/mapper/vg0-optlv   19G   192M  18G    2%    /opt
/dev/mapper/vg0-varlv   19G   357M  18G    2%    /var

I'd like to know what physical disks are used by these volumes, and how much free disk space (unallocated) I have, so that I will know how much I can grow these.

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

This is relatively easy. Use lvdisplay to show logical volumes, vgdisplay to show volume groups (including free space available) and pvdisplay to show physical volumes.

You should get all the data you need from those three commands, albeit with some work to figure out what all the various bits of data mean.

share|improve this answer
    
Thanks. I think I got all the info I wanted. It looks like VGs contain both LVs and PVs, which makes sense. –  user13185 Apr 22 '11 at 16:45
    
strictly, vg's contain pv's and lv's are constructed from vg's. Great to hear you got what you needed. –  malcolmpdx Apr 22 '11 at 21:47
add comment

The "maps" option is what you are after. This works at the lv level as well as pv.

So if you want to see what room an LV is taking up on a volume, do

lvdisplay -m <volumegroupname>

If you want to see the usage of PVs, do

pvdisplay -m
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.