[dm-crypt] Wrong behavior?
mbroz at redhat.com
Wed Jul 14 14:53:02 CEST 2010
On 07/14/2010 02:07 PM, Sven Eschenberg wrote:
> I don't see why cryptsetup does not end up with 1024 sectors (which is
> the optimal_io_size) - or is the luks header bigger than 512k? even
> bigger than 1 MB (2048 sectors) ?
yes. not header, but space for 8 keyslots.
Alignment is multiple of caclulated size - keyslot takes a lot of space.
Add --debug - you see required alignment there, then code must take
into account keyslots size.
So you have 2048s optimal IO size, I expect you are using 512bit key,
so alignment using default 4k is 4040 sectors (only space for keyslots).
So code must align to next multiple of 2048 - it is 4096.
More information about the dm-crypt