Linux RAID subsystem development
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: "ptschack ." <ptschack@googlemail.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: Help with corrupted MDADM Raid6
Date: Fri, 13 Jun 2014 20:25:41 +1000	[thread overview]
Message-ID: <20140613202541.584dc8f1@notabene.brown> (raw)
In-Reply-To: <CAH4F3SZ4Q8MO5Ci8ihSrLf1myo8pTfJ8SNC5EwJZQHf_H44GPA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2437 bytes --]

On Fri, 13 Jun 2014 10:34:55 +0200 "ptschack ." <ptschack@googlemail.com>
wrote:

> Hi,
> 
> I fear I may have messed up my MDADM RAID 6. Some info:
> 
> The RAID consists of 11 hard drives (3 TB each), 2 of which are
> spares. It used to be 6 drives, no spares.
> 
> This happened: one drive (/dev/sdg) kept giving me SMART warnings
> (failure imminent). As I was trying to do a fresh install at the time,
> i restored a backup of my system drive (an ssd which is is wholly
> independent of the RAID) and booted off of that.
> I hadn't realized that the backup was too old, from the time before i
> grew the raid... Apparently mdadm tried to mount the raid as it used
> to be (6 drives), and now it says the raid consists of 6 drives, all
> spares!

That doesn't make sense.  md store the important information about an array
on the drive of the array.  The information in /etc/mdadm.conf is largely
advisory.
The mdadm.conf that you attached looks perfectly OK and would work with
either the old 6-drive array or the new 9+2 drive array.

> Plus the drive /dev/sdg seems to have totally failed now :(
> 
> I guess I somehow need to re-assemble (or re-create) the raid6 in a
> degraded state, since one drive failed, but I'm not entirely clear on
> how to do that. One question is if I should include the spares in a
> reassembly or add them later.
> 
> Can anyone help?

Hopefully.

> 
> I have attached the outputs of dumpe2fs and mdadm --examine of the
> drives, plus my mdadm.conf.

sdk1 is the only device to show an md superblock, and it was last updated on
6th April, so it is rather old.  That is presumably before you made the array
larger.

sda1, sdb1 sdc1 sdd1 sde1 sdf1 sdh1 sdi1 sdj1 sdk1 all appear to contain
ext3fs or ext4fs superblocks.  I think some of those are from before the
devices were added into the array.  Quite possibly md doesn't over-write the
ext3 superblock.

I wonder if maybe the array is actually on the whole devices rather than on
the partitions.  What does

  mdadm --examine /dev/sd[abcdefghijk]

report?


Certainly *don't* try to create the array until you have tried all other
options.

If you do find mdadm superblocks on the whole devices, then you could try

 mdadm --assemble /dev/sd[a-k]

possibly remove devices from the list which don't work.  Possibly add
"--force" if not including "--force" doesn't work.

NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2014-06-13 10:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-13  8:34 Help with corrupted MDADM Raid6 ptschack .
2014-06-13 10:25 ` NeilBrown [this message]
2014-06-13 10:53   ` ptschack .
2014-06-14  9:54   ` ptschack .
2014-06-14 10:31     ` NeilBrown
2014-06-14 11:19       ` ptschack .
2014-06-14 12:06         ` NeilBrown
2014-06-14 17:14           ` ptschack .

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=20140613202541.584dc8f1@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=ptschack@googlemail.com \
    /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