[linux-lvm] LVM Alignement

Mike Snitzer snitzer at redhat.com
Sat Jul 23 00:25:02 UTC 2011


On Fri, Jul 22 2011 at  2:26pm -0400,
Alexander Dalloz <ad+lists at uni-x.org> wrote:

> > Hey all,
> >
> > i have a question about Lun / Partition alignment.
> > If I use LVM in a Linux guest OS on a VMFS Datastore i can align my
> > Partitions with mbralign.
> > But the tool failes if I will try to use it on a LVM only VDisk. For
> > example the second Disk of this guest OS.
> >
> > Did I need to align the second disk or did LVM take care of alignment ? I
> > just mean a single VDisk with a single LVM VG.

More recent versions of lvm will take care of alignment (e.g. that found
in fedora 14, 15 or RHEL6).

> By default LVM uses an offset of 192k, see:
> 
> # vgs -o +pe_start
>   VG         #PV #LV #SN Attr   VSize VFree 1st PE
>   VolGroup00   1   1   0 wz--n- 8,78G    0  192,00K

That was the old default.  That is not the case any more.

The default alignment (for storage that doesn't export topology
information) is now 1MB.  But that may be overriden with lvm.conf's
'default_data_alignment'.

Also see 'data_alignment_detection' in lvm.conf.

Mike




More information about the linux-lvm mailing list