[linux-lvm] starting LVs on RAID stripe boundaries

Francois Cami fcami at winsoft.fr
Mon Jan 26 22:15:04 UTC 2009


Keeping stuff aligned on partitions requires playing with fdisk or parted but
I had already figured that out. In some cases it's better to do so than to use
the block device directly as PV.

Is there any way to see the current LVM metadata's size ?

Thanks for the feedback !

F


2009/1/26 unlisted <unlisted at gmail.com>:
> that sounds right... as long as your lvm PVs are entire disks and not inside
> of another partition.  I spend months trying to understand all this.
>
> Also, isn't your LVM metadata 192k ?
>
> Sam
>
> On Tue, Jan 20, 2009 at 9:11 AM, F-D. Cami <fcami at winsoft.fr> wrote:
>>
>> Hi Linux-LVM,
>>
>> I'm searching for some definitive information about how to make sure that
>> logical
>> volumes start exactly at the beginning of a RAID stripe.
>>
>> My hardware is an EMC Clariion CX3-40F array with a RHEL5 host.
>> The default stripe element size is 64 KB (128 blocks) on the CX3.
>>
>> Both EMC and Red Hat recommend using fdisk or parted  to align the first
>> partition
>> to the start of a stripe boundary (128th block, 128x512=64KB) :
>> Red Hat : http://kbase.redhat.com/faq/docs/DOC-2893
>> EMC : "EMC CLARiiON Best Practices", PDF available on emc.com
>>
>> After doing that. the first partition is now aligned, next I need to make
>> sure my logical
>> volumes are similarly aligned. However, after reading the LVM Howto on
>> tldp.org,
>> the LVM wiki at redhat.com, and Alasdair Kergon's LinuxTag presentation at
>> :
>> http://people.redhat.com/agk/talks/LVM2-LinuxTag2006/
>> I found no information on how to do that.
>>
>> I'll now use some reasonable (?) assumptions :
>> * the physical extent size is a multiple of 64K (vgcreate's default is
>> 4MB) ;
>> * if physical extents are aligned, logical volumes are themselves aligned
>>  (lvcreate -l, --extents LogicalExtentsNumber) ;
>> * since PV, VG and LV infos are stored in PV metadata, the only possible
>> PE
>>   misalignment culprit is PV metadata ;
>> * PV metadata size is a multiple of 64KB
>>  (
>> http://orezpraw.com/orezpraw.php/blogosphere/your-filesystem-starts-where )
>>
>> Since 64KB is my stripe size, and metadata size is a multiple of 64KB,
>> pvcreate should do the RightThing(tm) with default options, i.e. start the
>> first PE at a multiple of the stripe size.
>>
>> In other words, aligning the partition the PV uses to the stripe boundary
>> and
>> using a PE size multiple of the stripe size insure that LVs get themselves
>> created
>> on stripe boundaries.
>>
>> Comments, please ?
>>
>> Thanks,
>>
>> François Cami
>>
>> _______________________________________________
>> linux-lvm mailing list
>> linux-lvm at redhat.com
>> https://www.redhat.com/mailman/listinfo/linux-lvm
>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>




More information about the linux-lvm mailing list