All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] starting LVs on RAID stripe boundaries
@ 2009-01-20 17:11 F-D. Cami
  2009-01-26 17:51 ` unlisted
  0 siblings, 1 reply; 3+ messages in thread
From: F-D. Cami @ 2009-01-20 17:11 UTC (permalink / raw)
  To: linux-lvm


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] starting LVs on RAID stripe boundaries
  2009-01-20 17:11 [linux-lvm] starting LVs on RAID stripe boundaries F-D. Cami
@ 2009-01-26 17:51 ` unlisted
  2009-01-26 22:15   ` Francois Cami
  0 siblings, 1 reply; 3+ messages in thread
From: unlisted @ 2009-01-26 17:51 UTC (permalink / raw)
  To: LVM general discussion and development

[-- Attachment #1: Type: text/plain, Size: 2427 bytes --]

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@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@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>

[-- Attachment #2: Type: text/html, Size: 3395 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] starting LVs on RAID stripe boundaries
  2009-01-26 17:51 ` unlisted
@ 2009-01-26 22:15   ` Francois Cami
  0 siblings, 0 replies; 3+ messages in thread
From: Francois Cami @ 2009-01-26 22:15 UTC (permalink / raw)
  To: LVM general discussion and development

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@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@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@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@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-26 22:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-20 17:11 [linux-lvm] starting LVs on RAID stripe boundaries F-D. Cami
2009-01-26 17:51 ` unlisted
2009-01-26 22:15   ` Francois Cami

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.