[dm-crypt] cryptsetup align problem
mbroz at redhat.com
Sun Sep 5 12:07:38 CEST 2010
On 09/04/2010 11:31 AM, Peter Smith wrote:
> I do not understand LVM well enough to say if it is correct or not
> regarding to metadatasize, but the reason why i am configuring it this
> way is a statement from Theodore Ts'o:
Teo's post is completely obsolete regarding default kvm metadata sizes.
Align cryptsetup to multiple of 1MiB
(2048 sectors in the cryptsetup) and you will have safe configuration.
If you do not understand LVM, please use most recent version and everything
will be aligned automatically.
It can be fine-tuned, but in most cases default is ok now.
(See "man pvcreate" --dataalignment if you want to force overwrite it.)
In lvm you can check alignment of PV with "pvs -o +pe_start --units k"
(If you have extent multiple of 512KiB then LVs are aligned automatically
even if fragmented - this is almost always true, default PE is 4M).
> The disk i am using has a erase block size on 512K, therefore my
> values is different.
1MiB is multiple of 512KiB so you are ok with above.
You do not need to align "to 512" but to "multiple of 512". Important
is that data start offset will start on erase block boundary.
More information about the dm-crypt