DM-Crypt Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arno Wagner <arno@wagner.name>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] yet another header reconstruction question
Date: Tue, 16 Feb 2016 16:01:50 +0100	[thread overview]
Message-ID: <20160216150150.GA3667@tansi.org> (raw)
In-Reply-To: <trinity-8c0180d0-0403-4058-9657-4df37dda9504-1455622326424@3capp-webde-bs60>

On Tue, Feb 16, 2016 at 12:32:06 CET, Florian Dotzer wrote:
> sent again as text. sorry for HTML input. hopefully it is more readable now . 

fine now.
 
> Dear Readers of the List .
>  
> I had a encrypted RAID 5 on my QNAP Device  in /dev/md0.
>  
> It worked without any problems for about 6 years . 
> But space went low and desaster began.
> After adding a disk , mdadm had overwritten the 
> header (block device /dev/md0 ) like this :
>  
> 6d 64 61 64 6d 3a 20 61 64 64 65 64 20 2f 64 65  mdadm: added /de
> 76 2f 73 64 63 33 0a 00 00 00 00 00 00 00 00 00  v/sdc3..........
> 00 00 00 00 00 00 00 00 63 62 63 2d 70 6c 61 69  ........cbc-plai
> 6e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  n...............
> 00 00 00 00 00 00 00 00 73 68 61 31 00 00 00 00  ........sha1....
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> 00 00 00 00 00 00 00 00 00 00 08 08 00 00 00 20  ...............
> bc 31 80 6d da a4 f0 5c ed 9f 24 96 fc 1b 72 6a

What did you do? 
Did you pipe the output from mdadm into /dev/md0?
If so, there might be a chance to recover this.

> According to the documentation on-disk-format ,
> magic (LUKS 0xba 0xbe )  , version and cipher name 
> seem to be overwritten.
>  
> I'd like to know the possible versions ( 00 01 ? ) and cipher names 
> (aes ?) in order to be able to reconstruct the header (fingers crossed )

First, make that header backup now, if you have not already.

The data that is missing depends on the QNAP device. 
Defaults can be changed on compile. Easiest option is 
likely to make a new LUKS container on it and try what 
is in there. You should be able to use the loop-device
procedure from FAQ Item 2.6 from the commandline for 
that. If those values do not work, next option is to
have the QNAP create a LUKS container on a new disk
and see what it does.
  
Regards,
Arno

-- 
Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: arno@wagner.name
GnuPG: ID: CB5D9718  FP: 12D6 C03B 1B30 33BB 13CF  B774 E35C 5FA1 CB5D 9718
----
A good decision is based on knowledge and not on numbers. -- Plato

If it's in the news, don't worry about it.  The very definition of 
"news" is "something that hardly ever happens." -- Bruce Schneier

  parent reply	other threads:[~2016-02-16 15:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-16 11:32 [dm-crypt] yet another header reconstruction question Florian Dotzer
2016-02-16 12:01 ` Michael Kjörling
2016-02-16 15:01 ` Arno Wagner [this message]
2016-02-16 19:41   ` Sven Eschenberg
     [not found] <mailman.1.1455879602.30698.dm-crypt@saout.de>
2016-02-24  8:43 ` Florian Dotzer
2016-02-24 16:24   ` Arno Wagner
     [not found] <mailman.1.1455706801.5962.dm-crypt@saout.de>
2016-02-18  8:51 ` Florian Dotzer
2016-02-18  9:34   ` Michael Kjörling
2016-02-18 10:26     ` Sven Eschenberg
2016-02-18 12:53   ` Robert Nichols
  -- strict thread matches above, loose matches on Subject: below --
2016-02-15 16:07 [dm-crypt] Yet " Florian Dotzer
2016-02-15 17:04 ` 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=20160216150150.GA3667@tansi.org \
    --to=arno@wagner.name \
    --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