...
So I created a 1 gigabyte /boot partition as /dev/sdb1, and
allocated the rest of the SSD for use by LVM as /dev/sdb2. And
that’s where I ran into my next problem. LVM likes to allocate 192k
for its header information, and 192k is not a multiple of 128k. So
if you are creating file systems as logical volumes, and you want
those volume to be properly aligned you have to tell LVM that it
should reserve slightly more space for its meta-data, so that the
physical extents that it allocates for its logical volumes are
properly aligned. Unfortunately, the way this is done is slightly
baroque:
# pvcreate –metadatasize 250k /dev/sdb2
Physical volume “/dev/sdb2″ successfully created
Why 250k and not 256k? I can’t tell you — sometimes the LVM tools
aren’t terribly intuitive. However, you can test to make sure that
physical extents start at the proper offset by using:
# pvs /dev/sdb2 -o+pe_start
PV VG Fmt Attr PSize PFree 1st PE
/dev/sdb2 lvm2 – 73.52G 73.52G 256.00K
If you use a metadata size of 256k, the first PE will be at 320k
instead of 256k. There really ought to be an –pe-align option to
pvcreate, which would be far more user-friendly, but, we have to
work with the tools that we have. Maybe in the next version of the
LVM support tools….
...