Return-Path: <"sven@whgl.uni-frankfurt.de"@whgl.uni-frankfurt.de> Received: from mps1.wohnheimg.uni-frankfurt.de (mps1.wohnheimg.uni-frankfurt.de [141.2.118.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Wed, 25 Nov 2015 12:49:23 +0100 (CET) Received: from p4fcef029.dip0.t-ipconnect.de ([79.206.240.41] helo=[192.168.0.11]) (Authed sender Sven 'DarKRaveR' Eschenberg) by mps1.wohnheimg.uni-frankfurt.de via ESMTPSA (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim) (envelope-from <"sven@whgl.uni-frankfurt.de"@whgl.uni-frankfurt.de>) id 1a1YZk-0000Pj-3F for dm-crypt@saout.de; Wed, 25 Nov 2015 12:49:28 +0100 References: <20151121184914.GA28647@tansi.org> <5651B1CF.7090306@sapo.pt> <20151122125233.GA4802@tansi.org> <5651D9B3.6000500@sapo.pt> <565241FF.90005@whgl.uni-frankfurt.de> <20151123033504.GA12468@tansi.org> <56528E72.8090604@whgl.uni-frankfurt.de> <20151123062627.GA14309@tansi.org> From: Sven Eschenberg Message-ID: <5655A03B.703@whgl.uni-frankfurt.de> Date: Wed, 25 Nov 2015 12:49:15 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: "sven@whgl.uni-frankfurt.de"@whgl.uni-frankfurt.de Subject: Re: [dm-crypt] Open raid1 with luks encryption after a raid re-create List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de Seems the mail got a little delayed on my side... You are welcome Luis, good it worked out. Regards -Sven Am 24.11.2015 um 12:15 schrieb Luis Alexandre: > > 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 >> > > > _______________________________________________ > dm-crypt mailing list > dm-crypt@saout.de > http://www.saout.de/mailman/listinfo/dm-crypt