[dm-crypt] Wrong behavior?
mbroz at redhat.com
Wed Jul 14 09:58:05 CEST 2010
On 07/14/2010 12:17 AM, Sven Eschenberg wrote:
> Well, yet it gives me the chance to use the RNG of my choice, might it
> be a HW-RNG in a TPM or chipset, in software of my choice or
> whatsoever ;-). Well, maybe I would want to play with own RNGs and no, I
> am not gonna use any PRNG using linear congruences for that matter :-).
You can add second keyslot using keyfile and remove former afterwards as workaround.
But if you want to do such low level operations, maybe you want to use dm-crypt
directly, without luks...
> Humm, I was just thinking, obviously cryptsetup uses the readahead of
> the device as a measure for alignment.
No, readahead has nothing to do with device alignment. We are using device topology
as defined by stacking device, this approach is now supported by all
tools (fdisk & partitioning toos, lvm2, mdadm, cryptsetup).
If topology IOCTLs are not supported (kernels <2.6.32 iirc) it simply defaults
to alignment of 4k.
MD of course provides proper value according to configured mode (chunks etc).
Readahead is set the same as underlying device, readahead is dynamic property
of device (you can change it using blockdev --setra anytime) while alignment
is calculated during device format and cannot be changed later.)
More information about the dm-crypt