[Gllug] Mapping from disk block to LVM partitions

Kostas Georgiou k.georgiou at imperial.ac.uk
Mon Dec 7 13:16:52 UTC 2009


On Mon, Dec 07, 2009 at 12:05:29PM +0000, Richard Jones wrote:

> On Mon, Dec 07, 2009 at 11:33:09AM +0000, Rich Walker wrote:
> > Kostas Georgiou <k.georgiou at imperial.ac.uk> wrote:
> > 
> > > 
> > > What about lvs -o +seg_pe_ranges or something like
> > > pvs -o pv_name,lv_name,pvseg_start,pvseg_size
> > > 
> > 
> > The lvs option is good; still got to get from the PE ranges to the physical
> > blocks...
> 
> I'm a bit vague on this (it was well over a year ago that I looked at
> this), but aren't physical extents just 32 MB blocks of the physical
> disk, plus some small initial offset?

Each pv can have a different initial offset so pvs -o pv_name,pe_start
is your friend. The pe size is a power of two and it's always the same
in a vg so vgs -o vg_name,vg_extent_size 

It's not uncommon to play with both in order to get better alignment
of the logical volumes in a raid controller so don't trust the defaults.

Kostas
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list