[CentOS] CentOS 5 32bit and 3Tbyte drives

Tue Jun 21 14:05:29 UTC 2011
Ross Walker <rswwalker at gmail.com>

On Jun 20, 2011, at 4:46 PM, Stephen Harris <lists at spuddy.org> wrote:

> On Mon, Jun 20, 2011 at 09:32:03PM +0200, Markus Falb wrote:
>> On 20.6.2011 21:19, Stephen Harris wrote:
> 
>>> LVM; pvcreate, vgcreate, lvcreate.  What's a partition? :-)
>> 
>> But your filesystem has still to be aligned correctly. Is lvm 4k
>> friendly ? Is md ?
> 
> That is a very good question, and one of the underlying aspects of
> my original question :-)

4K, yes, but you also need to make sure it is aligned with the RAID chunk size.

I typically use pvcreate --metadatasize option to make sure it is padded enough so LV 1 has the desired offset. A PV meta data size of 960K, which combined with the 64K VG meta data will make sure LV 1 starts at sector 2048 (1MB offset) which will align with RAID chunk sizes up to 1MB.

The default PV meta data size is 128K, plus the 64K VG meta data, puts LV 1 with a 192K offset, which works for 64K chunk sizes, but not 128K chunk sizes that I typically use.

That is for whole disks, if you are building PVs from partitions you should take the partition offset into account when choosing the PV meta data padding.

Always specify the partition offset, don't take the default which is sector 63, which is useless and hard to fix later. You can't go wrong with starting at sector 2048 and if that becomes the future default it leaves some nice room up front for a fancy boot loader.

-Ross