From: Milan Broz <mbroz@redhat.com>
To: Peter Smith <peter.smith3882100@gmail.com>
Cc: dm-crypt@saout.de
Subject: Re: [dm-crypt] cryptsetup align problem
Date: Thu, 26 Aug 2010 00:58:00 +0200 [thread overview]
Message-ID: <4C759FF8.5060100@redhat.com> (raw)
In-Reply-To: <AANLkTing13-W-R0rKXQrEZ4a5cKrbjx=HtzFfGpNtsmu@mail.gmail.com>
On 08/25/2010 11:50 PM, Peter Smith wrote:
> I am trying to align a LUKS volume to 512K boundary. I calculate the
> --align-payload value like this:
>
> (512*1024) / 512 = 1024
>
> cryptsetup luksFormat --align-payload=1024 /dev/sda1
>
> When i confirm the task with cryptsetup luksDump /dev/sda2 the Payload
> offset is set to 2048 which is 1024K?
>
> What am i doing wrong?
Nothing, it works as expected. It is not fixed offset but req. alignment.
Using --align-payload=1024 means alignment to the nearest 512KiB boundary,
because the keyslots space requires more than 512KiB it aligns to next multiple
of it - i.e. 2048 sectors.
If you increase key size (thus keyslots size), it will probably switch to to 3072 etc.
Milan
next prev parent reply other threads:[~2010-08-25 22:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-25 21:50 [dm-crypt] cryptsetup align problem Peter Smith
2010-08-25 22:58 ` Milan Broz [this message]
2010-08-26 12:43 ` Peter Smith
2010-09-03 17:58 ` Christoph Anton Mitterer
2010-09-04 9:31 ` Peter Smith
2010-09-05 10:07 ` Milan Broz
2010-09-05 15:07 ` Peter Smith
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=4C759FF8.5060100@redhat.com \
--to=mbroz@redhat.com \
--cc=dm-crypt@saout.de \
--cc=peter.smith3882100@gmail.com \
/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.