[dm-crypt] (More) Questions about LUKS / LVM

Dragan Milivojevic d.milivojevic at gmail.com
Wed Sep 21 18:14:50 CEST 2011

fdisk -u=cylinders -c=dos -H 256 -S 32 /dev/sda

Start the partition at any cylinder (it will always be a multiply of 4MB)
-c=dos (dos compatibility) will make sure that other partitions start at
offset that is a multiply of 4MB.

I didn't test the creation of logical partition.
These days I only use md + lvm.

This methodology also ensures proper partition alignment for hardware raid.

For lvm I use --metadatasize 16320K in case I do a reshape of the underlying
md device.
It's suitable for raid 5 or 6 with 2,4 or 8 data drives and chunk sizes from
64kb to 2048kb.

Careful with that. My fdisk (from util-linux-ng 2.17.2)
> does 1MB alignment for the first partition, but then it does
> no alignment at all for the 3 primary partitions and
> while it puts 1MB between the logical partitions, that
> also does not result in alignment to anything as far as
> I can tell.
> I suspect that you have to align yourself for the
> partitions. This was with a new, blank disk, but I
> gave sizes in kB, as the partitions go into RAID sets.
> Maybe it aligns if you give sizes in MB.
> Arno
> --
> Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email:
> arno at wagner.name
> GnuPG:  ID: 1E25338F  FP: 0C30 5782 9D93 F785 E79C  0296 797F 6B50 1E25
> 338F
> ----
> Cuddly UI's are the manifestation of wishful thinking. -- Dylan Evans
> If it's in the news, don't worry about it.  The very definition of
> "news" is "something that hardly ever happens." -- Bruce Schneier
> _______________________________________________
> dm-crypt mailing list
> dm-crypt at saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.saout.de/pipermail/dm-crypt/attachments/20110921/85b03335/attachment.html>

More information about the dm-crypt mailing list