From: Milan Broz <gmazyland@gmail.com>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] cryptsetup-reencode: LUKS-${UUID}.new is too small
Date: Thu, 13 Mar 2014 07:34:30 +0100 [thread overview]
Message-ID: <53215176.7000103@gmail.com> (raw)
In-Reply-To: <20140313013154.GA5434@tansi.org>
On 03/13/2014 02:31 AM, Arno Wagner wrote:
>> If you imagine disc sectors/blocks as a stack, growing/shrinking
>> adds/removes(or frees) blocks at the top.
>
> That was my first take also, but the manpage for cryptsetup-
> reencrypt option --reduce-device-size says
>
> "This means that last sectors on the original device will be
> lost, ciphertext data will be effectively shifted by specified
> number of sectors."
Yes, with --reduce-device-size it reencrypts "backwards" with optional
data shift.
If your fs supports shrinking and you want to be safe, just shrink fs
of twice size of needed LUKS extension (e.g. 8MB and then use 4MB
in reduce size option) and after reencryption just resize to full device.
Or with LVM just enlarge LV by 4MB (but this can fragment LV and
you need free space).
I described some crazy reencrypt operations here
http://asalor.blogspot.cz/2012/08/re-encryption-of-luks-device-cryptsetup.html
but as was already said: it is dangerous, backups are mandatory.
Milan
next prev parent reply other threads:[~2014-03-13 6:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-11 23:16 [dm-crypt] cryptsetup-reencode: LUKS-${UUID}.new is too small PePa
2014-03-12 0:54 ` Arno Wagner
2014-03-12 21:29 ` PePa
2014-03-12 22:36 ` Arno Wagner
2014-03-13 0:29 ` Matthias Schniedermeyer
2014-03-13 1:31 ` Arno Wagner
2014-03-13 6:34 ` Milan Broz [this message]
2014-03-13 7:43 ` PePa
2014-03-18 22:43 ` [dm-crypt] cryptsetup-reencode:LUKS-${UUID}.new " PePa
2014-03-14 7:59 ` [dm-crypt] cryptsetup-reencode: LUKS-${UUID}.new " PePa
2014-03-14 13:22 ` Arno Wagner
2014-03-14 16:39 ` PePa
2014-03-14 16:46 ` PePa
2014-03-14 17:20 ` Milan Broz
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=53215176.7000103@gmail.com \
--to=gmazyland@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox