From: Milan Broz <gmazyland@gmail.com>
To: Christoph Anton Mitterer <calestyo@scientia.net>
Cc: dm-crypt@saout.de
Subject: Re: [dm-crypt] cryptsetup alignment
Date: Sat, 29 Jun 2013 10:47:28 +0200 [thread overview]
Message-ID: <51CE9F20.1020802@gmail.com> (raw)
In-Reply-To: <1372476079.12711.8.camel@heisenberg.scientia.net>
On 29.6.2013 5:21, Christoph Anton Mitterer wrote:
> Hi Milan, et al.
>
> Can I find out why cryptsetup created my LUKS devices with a payload
> offset of 4096?
> I mean these are 512B sectors right?... I though all tools would
> nowadays align to 1 MiB but that would be 2048 S.
If there is enough space for keyslots then it is 1MiB.
If 1MiB is too small, it uses multiple of default alignment, here 2MiB
(See LUKS design document for exact info how keyslot is used.)
I am almost sure you used XTS with 512bit key, that's exactly this case
- 1MiB is not enough for it.
Try to use 256b key for XTS (e.g. default) and you will get 2048s.
(BTW this is one of the reason we stick with 256bit XTS -> AES128
to not increase LUKS keyslots size. For other reasond please seach
this list - this discussion was surely here.)
> Is it _really_ that smart that it auto detected this and also included
> the LVM's PE size into it's calculations?
No. Nothing is so smart as LVM :-]
It is just plain round up to multiple of requested (default) alignment.
Milan
next prev parent reply other threads:[~2013-06-29 8:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-29 3:21 [dm-crypt] cryptsetup alignment Christoph Anton Mitterer
2013-06-29 8:47 ` Milan Broz [this message]
2013-06-29 14:07 ` Christoph Anton Mitterer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51CE9F20.1020802@gmail.com \
--to=gmazyland@gmail.com \
--cc=calestyo@scientia.net \
--cc=dm-crypt@saout.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.