[linux-lvm] calculating free capacity from pvdisplay and lvdisplay

Malahal Naineni malahal at us.ibm.com
Wed Aug 11 23:56:56 UTC 2010


Rahul Nabar [rpnabar at gmail.com] wrote:
> On Wed, Aug 11, 2010 at 5:40 PM, Stuart D. Gathman <stuart at bmsi.com> wrote:
> > b) You are unclear on the concept.  Perhaps the explanation of how
> >   it *could* be accomplished will illuminate.  Note especially the point
> >   in step 1 - "the map is filesystem dependent".
> 
> What's still unclear to me is understanding why LVM decided to use
> fully the first three PV's and then after that only partially the last
> three PV's. Although it could have continued to use PV4 fully as well
> and then partially PV5 and keep PV6 totally empty. (My total LV size
> is a little greater than 4PVs but less than 5PVs)
> 
> I assume the answer to this mystery lies in the "Allocation Policy".
> [contiguous, cling, normal, anywhere or inherit ] Is there a way on a
> running LVM to query what its allocation policy is? Alternately if the
> person creating an LVM omits an explicit specification then what
> allocation policy does LVM use by default?

It is 'normal' for VG and 'inherit' for an LV. See 'man lvm' command for
details. See 'man vgs' on how to get it. Allocation policy is part of vg
'Attr' field. Look for Attr value when you run 'vgs -o+attr'

Thanks, Malahal.




More information about the linux-lvm mailing list