From: Luis Alexandre <l-alexandre@sapo.pt>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] Open raid1 with luks encryption after a raid re-create
Date: Tue, 24 Nov 2015 11:15:18 +0000 [thread overview]
Message-ID: <n31gs5$h5e$1@ger.gmane.org> (raw)
In-Reply-To: <20151123062627.GA14309@tansi.org>
Dear Arno and Sven,
Thanks very much for your support.
I was able to open the copy I made with
tail -c +135266305 /dev/sdx > /dev/sdy
and
cryptsetup luksOpen /dev/sdy e1
and have all my data back.
Thanks again for your support.
Best regards,
Luis
On 23-11-2015 06:26, Arno Wagner wrote:
> On Mon, Nov 23, 2015 at 04:56:34 CET, Sven Eschenberg wrote:
>>
>>
>> Am 23.11.2015 um 04:35 schrieb Arno Wagner:
>>> On Sun, Nov 22, 2015 at 23:30:23 CET, Sven Eschenberg wrote:
>>> [...]
>>>> Now to your question, once you know the offset of the header:
>>>> 1.)Setup a loop device from your image (You can use an offset into
>>>> the image where your loop device starts with sector 0) see --offset
>>>> in losetup man page.
>>>
>>> Ah, yes. That would save copying it.
>>
>> That was the plan. In general using dmsetup to create a mapping
>> manually should work too, if loop device support is missing -
>> dmsetup is pretty cryptic to use though.
>
> "Cryptic" is not good here...
>
> I was not aware that losetup allows read-only mappings, or I
> would probably have looked at it too.
>
> Excellent! So I learned something too!
>
>>>> Inspect loopdevice if the LUKS Header now is on sector 0
>>>> 2.)Try a cryptsetup luksopen in readonly mode
>>>
>>> Good idea. With that it may be reasonaly safe to work
>>> with the original disk. I still would make a full
>>> backup before.
>>>
>>> Regards,
>>> Arno
>>>
>>
>> Well, I thought about using the loop on the file while the physical
>> disk stays unchanged. Otherwise it would be possible to work on the
>> physical disk, and keep a safety image. No matter which way one
>> chooses, always have a safety copy.
>>
>> If the disk is having mechanical problems or something similiar one
>> would of course use 2 images, one 'master binary backup' and the
>> replica to work on.
>>
>> Once mapping and opening works, one can choose to either copy out
>> the files and backup (usually a good idea) or to create a copy in
>> the manner you described. Possibly such an image could then be
>> remerged onto a new clean array, if it is otherwise intact. Not
>> without some remaining risks though.
>
> Indeed. And first things first, lets see whether that header is
> viable before goping any further.
>
> Regards,
> Arno
>
next prev parent reply other threads:[~2015-11-24 11:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-21 16:29 [dm-crypt] Open raid1 with luks encryption after a raid re-create Luis Alexandre
2015-11-21 18:49 ` Arno Wagner
[not found] ` <5651B1CF.7090306@sapo.pt>
2015-11-22 12:52 ` Arno Wagner
2015-11-22 15:05 ` Luís Alexandre
2015-11-22 18:15 ` Arno Wagner
2015-11-22 22:30 ` Sven Eschenberg
2015-11-23 3:35 ` Arno Wagner
2015-11-23 3:56 ` Sven Eschenberg
2015-11-23 6:26 ` Arno Wagner
2015-11-24 11:15 ` Luis Alexandre [this message]
2015-11-24 12:52 ` Arno Wagner
2015-11-25 11:49 ` Sven Eschenberg
2015-11-21 19:05 ` Sven Eschenberg
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='n31gs5$h5e$1@ger.gmane.org' \
--to=l-alexandre@sapo.pt \
--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