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] can't open luks device after raid 5 rebuild
Date: Sun, 8 Apr 2012 22:28:23 +0200	[thread overview]
Message-ID: <20120408202823.GA4029@tansi.org> (raw)
In-Reply-To: <CAGmni9qWOfm-s5ob8KNQQ0ocYF1NXTGNorm5JeWKjZoWv1bCDQ@mail.gmail.com>

On Sun, Apr 08, 2012 at 05:07:28PM -0300, Salatiel Filho wrote:
> On Sun, Apr 8, 2012 at 14:09, Heinz Diehl <htd@fancy-poultry.org> wrote:
> > On 08.04.2012, artificial11000 wrote:
> >
> >> ?mdadm --create --level=5 -n 3 /dev/md127 /dev/sdb /dev/sdc /dev/sdd
> > ? ? ? ? ---------
> >
> > Seems your data is gone, forever. You created a new raid manually,
> > which means that you deleted all your previous data.
> >
> > You have a backup, do you?
> >
> > _______________________________________________
> > dm-crypt mailing list
> > dm-crypt@saout.de
> > http://www.saout.de/mailman/listinfo/dm-crypt
> 
> I disagree. I got some missing superblock sometime in the past while
> assembling the array. Recreated it using mdadm -C with the same
> parameters for the raid-level and raid-devices and it did not touch my
> encrypted data. I was able to mount just fine after that. I always
> thought that mdadm would touch only their own superblock when
> creating. 

No, it recreates the parity stripes. It has to, otherwise RAID consistency
checks would fail. If, for any reason, drive/device 
order or stripe size is diferent, this will scramble your data. 
The data is still there unless you write to the array, see my other 
answer. It also overwrites the RAID superblocks.

If everything is the same, the original data will be there though,
because the new parity stripes are exactly at the same positions 
on the same disks as the old ones and created from the same 
non-parity stripes.

> Though at that time i had a degraded  array and my array is
> built on partitions , not the whole disk.

On a degraded array, you should always only (re-)add the missing 
device or a replacement.

Arno
-- 
Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: arno@wagner.name 
GnuPG:  ID: 1E25338F  FP: 0C30 5782 9D93 F785 E79C  0296 797F 6B50 1E25 338F
----
One of the painful things about our time is that those who feel certainty 
are stupid, and those with any imagination and understanding are filled 
with doubt and indecision. -- Bertrand Russell 

  reply	other threads:[~2012-04-08 20:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-08 13:04 [dm-crypt] can't open luks device after raid 5 rebuild artificial11000
2012-04-08 15:47 ` Arno Wagner
2012-04-08 16:23   ` artificial11000
2012-04-08 16:33     ` Ingo Schmitt
2012-04-08 17:09     ` Heinz Diehl
2012-04-08 20:07       ` Salatiel Filho
2012-04-08 20:28         ` Arno Wagner [this message]
2012-04-08 20:22       ` Arno Wagner
2012-04-08 20:35     ` Arno Wagner
2012-04-08 20:43       ` artificial11000
2012-04-08 23:22         ` Arno Wagner
  -- strict thread matches above, loose matches on Subject: below --
2012-04-07 15:54 artificial11000

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=20120408202823.GA4029@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