All of lore.kernel.org
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: "Patrik Horník" <patrik@dsl.sk>
Cc: linux-raid@vger.kernel.org
Subject: Re: Making spare device into active
Date: Sat, 9 Aug 2014 10:31:59 +1000	[thread overview]
Message-ID: <20140809103159.338bef61@notabene.brown> (raw)
In-Reply-To: <CAAOsTSmkyCqLxrG-q2PQxnbXiAC1zz=qw6+ekMUmY=N+ZoHZ-w@mail.gmail.com>

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

On Fri, 8 Aug 2014 19:25:24 +0200 Patrik Horník <patrik@dsl.sk> wrote:

> Hello Neil,
> 
> I am experiencing the problem with one RAID6 array.
> 
> - I was running degraded array with 3 of 5 drives. When adding fourth
> HDD one of the drives reported read errors, later disconnected and
> then it was kicked out from array. (It was maybe doing of controller
> and not drive, not important.)
> 
> - The array has internal intent bitmap. After the drive reconnected
> I've tried it to --re-add to array with 2 of 5 drives. I am not sure
> if that should work? But it did not, recovery got interrupted just
> after start and drive was marked as spare.

No, that is not expected to work.  RAID6 survives 2 device failures, not 3.
Once three have failed, the array has failed.  You have to stop it, and maybe
put it back together.

> 
> - Right now I want to assemble array to get data out of it. Is it
> possible to change "device role" field in device's superblock so it
> can be assembled? I I have --examine and --detail output from before
> the problem and so I know at which position the kicked drive belongs.

Best option is to assemble with --force.
If that works then you might have a bit of data corruption, but most of the
array should be fine.

If it fails, you probably need to carefully re-create the array with all the
right bits in the right places.  Maybe sure to create it degraded so that it
doesn't automatically resync, otherwise if you did something wrong you could
suddenly lose all hope.

But before you do any of that, you should make sure your drives and
controller are actually working.  Completely.
If any drive has any bad blocks, then get a replacement drive and copy
everything (maybe using ddrescue) from the failing drive to a good drive.

There is no way to just change arbitrary fields in the superblock, so you
cannot simply "set the device role".

Good luck.

NeilBrown


> 
> - Changing device role field seems much safer way than recreating
> array with --assume-clean, because with recreating too much things can
> go wrong...
> 
> Thanks.
> 
> Patrik


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

  parent reply	other threads:[~2014-08-09  0:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08 17:25 Making spare device into active Patrik Horník
2014-08-08 17:45 ` Fwd: " Patrik Horník
2014-08-09  0:31 ` NeilBrown [this message]
2014-08-09  8:33   ` Patrik Horník
2014-08-12  7:13     ` NeilBrown

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=20140809103159.338bef61@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=patrik@dsl.sk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.