All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <gmazyland@gmail.com>
To: Felix Wagner <felix@wagner-felix.com>, dm-crypt@saout.de
Subject: Re: [dm-crypt] help
Date: Thu, 25 Feb 2016 17:37:22 +0100	[thread overview]
Message-ID: <56CF2DC2.6050008@gmail.com> (raw)
In-Reply-To: <20160225160849.21765320@othir.localdomain>

On 02/25/2016 04:08 PM, Felix Wagner wrote:
> Hello,
> 
> I tried to reencrypt my device today and was way too eager to do it
> without reading everything. Heres what I did:
> 
> 'cryptsetup-reencrypt -v -c aes-xts-plain64 -s
> 512 /dev/disk/by-uuid/2ea1bb9e-a4a0-48c8-bc67-a694fa6c8cf7
> Reencryption will change: volume key, set cipher to aes-xts-plain64.
> Enter passphrase for key slot 0:
> Key slot 0 unlocked.
> LUKS header backup of
> device /dev/disk/by-uuid/2ea1bb9e-a4a0-48c8-bc67-a694fa6c8cf7 created.
> Data offset for detached LUKS header must be either 0 or higher than
> header size (4036 sectors). Creation of LUKS backup headers failed.
> 
> So i thought well It didn't work so lets try again:
> 
> cryptsetup-reencrypt -v -c
> aes-xts-plain64 /dev/disk/by-uuid/2ea1bb9e-a4a0-48c8-bc67-a694fa6c8cf7
> Reencryption will change: volume key, set cipher to aes-xts-plain64.
> Enter passphrase for key slot 0:
> Key slot 0 unlocked.
> LUKS header
> backup of device /dev/disk/by-uuid/2ea1bb9e-a4a0-48c8-bc67-a694fa6c8cf7
> created.
> New LUKS header for
> device /dev/disk/by-uuid/2ea1bb9e-a4a0-48c8-bc67-a694fa6c8cf7 created.
> Activated keyslot 0. 
> Marking LUKS
> device /dev/disk/by-uuid/2ea1bb9e-a4a0-48c8-bc67-a694fa6c8cf7 unusable.
> Activating temporary device using old LUKS header.
> Key slot 0 unlocked.
> Cannot get info about
> device /dev/disk/by-uuid/2ea1bb9e-a4a0-48c8-bc67-a694fa6c8cf7.
> Activation of temporary devices failed.
> 
> Now it says that the device is not a luks device anymore. I do not have
> a header backup (I'm an idiot) what I do have is the luksDump
> information and I have not rebooted my system:

Do you have these files still in current directory?

LUKS-ea1bb9e-a4a0-48c8-bc67-a694fa6c8cf7.log
LUKS-ea1bb9e-a4a0-48c8-bc67-a694fa6c8cf7.new
LUKS-ea1bb9e-a4a0-48c8-bc67-a694fa6c8cf7.org

If so, save them. *.log is reencryption log. If you run reencrypt
in directory with these files, reencryption will resume.

If it did not started yet, *.org is header backup and you can
use it to restore old device state.

(If reencryption already started some part of device is already
reencrypted so you have to finish that operation.)

Please can you paste here content of the *.log file?
(It is text file containing reencryption context.)

(In theory, if reencryption did not really started yet the initial
header is still on-device, just with different magic string, so recovery
could be still possible just with simple on-disk edit.)

Milan

  parent reply	other threads:[~2016-02-25 16:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-25 15:08 [dm-crypt] help Felix Wagner
2016-02-25 16:18 ` Ondrej Kozina
2016-02-25 17:25   ` Ondrej Kozina
2016-02-25 16:37 ` Milan Broz [this message]
2016-02-25 17:05   ` Felix Wagner
2016-02-25 17:20     ` Milan Broz
2016-02-25 17:35       ` Felix Wagner
2016-02-25 17:49       ` Felix Wagner
2016-02-25 17:55         ` Milan Broz
2016-02-25 17:58           ` Felix Wagner
  -- strict thread matches above, loose matches on Subject: below --
2016-02-25 14:50 Felix Wagner
2016-01-10 17:07 Eugen Rogoza
2012-04-20 15:58 [dm-crypt] Help Simon Bing
2012-04-22  8:59 ` Arno Wagner

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=56CF2DC2.6050008@gmail.com \
    --to=gmazyland@gmail.com \
    --cc=dm-crypt@saout.de \
    --cc=felix@wagner-felix.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.