mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: lsorense@csclub.uwaterloo.ca (Lennart Sorensen)
To: raid@mueller.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: RAID array is gone, please help
Date: Thu, 23 Mar 2017 15:27:26 -0400	[thread overview]
Message-ID: <20170323192726.GM14186@csclub.uwaterloo.ca> (raw)
In-Reply-To: <87d1da5c-a39b-fd41-62a7-640b0eea5501@mueller.org>

On Thu, Mar 23, 2017 at 07:09:41PM +0100, raid@mueller.org wrote:
> Thank you very much or your reply.
> 
> I naively thought that starting without partitions would be the best
> starting point, given 3 of the disks had been in a RAID5 array
> previously (possibly with partitions, not sure), but that looks like
> a bad choice, based on some other things I've googled. Lesson learned.
> 
> I have an mdadm.conf file, but it could be a remnant of my previous array.
> I've already edited it trying to get things to work, so I'm
> not sure if it was updated when I created the new array or not.
> 
> I see various people online have had success in my situation using
> madadm --create /dev/md0 --assume-clean --verbose --level=10 \
> --raid-devices=4 /dev/sdc /dev/sdd /dev/sde /dev/sdf
> 
> Some people used --assume-clean, and some didn't. Given my array wasn't done
> with its resync, maybe I should leave that out.
> 
> If that would work, I guess then I need to get the data off the array,
> delete it, and recreate it with disk partitions, or risk this happening
> again at the next reboot, for whatever reason.
> 
> Anyone think it's a bad idea to try mdadm --create at this point?
> 
> Sorry, I'm not sure how to write 0's to sector 0...

Well the other possibility is that by having a MBR saying this has GPT and
probably having mdadm corrupt the GPT by writing to 4k in, but nothing
overwriting the backup GPT at the end of the device, something may have
restored the GPT to the original location, even if it was an empty GPT,
in which case your superblock is likely overwritten.

Does 'gdisk -l /dev/sdc' claim that it is a valid GPT table or corrupt?

So if that is what happened (not sure what would have done it, although
it seems badly defined who is responsible for fixing the GPT if it is
detected that the backup is valid but the primary is corrupt), then you
will want to make sure the MBR and GPT tables are removed, before you
do anything else.  Likely the data is still there, since I think the
first data block is offset a bit into the device, and the GPT is only
the first 32KB or so of the device.  If that is the case, doing the
create would probably work.  Of course the safest thing to do would be
to clone your disks before trying to reassemble them (which means you
need another four 4TB drives, but if the data is important, that's
probably worth it).

Of course you would also have to be sure the mdadm command you use to
create it again is exactly the same as before, and that the device names
are exactly the same as before.

-- 
Len Sorensen

  reply	other threads:[~2017-03-23 19:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-23 16:49 raid
2017-03-23 17:37 ` Lennart Sorensen
2017-03-23 18:09   ` raid
2017-03-23 19:27     ` Lennart Sorensen [this message]
2017-03-23 19:38       ` Stephen Mueller
2017-03-23 19:59         ` Lennart Sorensen
2017-03-23 20:09           ` Stephen Mueller
2017-03-23 21:01             ` Lennart Sorensen
2017-03-23 21:02             ` Stephen Mueller
2017-03-23 21:09               ` Lennart Sorensen
2017-03-23 21:11                 ` Stephen Mueller

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=20170323192726.GM14186@csclub.uwaterloo.ca \
    --to=lsorense@csclub.uwaterloo.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=raid@mueller.org \
    /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

all inboxes | Powered by JetHome®