Linux RAID subsystem development
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Alberto Morell <amp4tj@gmail.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: Unable to re-assemble a raid 10 after it has FAILED.
Date: Tue, 10 Jun 2014 21:30:44 +1000	[thread overview]
Message-ID: <20140610213044.4b6a7996@notabene.brown> (raw)
In-Reply-To: <CAEp9EKg462T+7E35RnarP6y41wGgNv3R_jAXEhxiLBg_vukW3g@mail.gmail.com>

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

On Tue, 10 Jun 2014 13:04:28 +0200 Alberto Morell <amp4tj@gmail.com> wrote:

> Hi!
> 
> I have a raid 10 devices with 4 components. I make the raid fails, by
> making two components fail (using "mdadm --set-faulty <device>"). When
> I add the two devices back, they are added as spare devices. Then, I
> can get the raid active again only creating the raid again using
> "mdadm --create --assume-clean...". Re-assembling the device does not
> work with error message:
> 
> mdadm: failed to RUN_ARRAY /dev/md/hdd: Input/output error
> mdadm: Not enough devices to start the array.
> 
> I am trying to automate the raid configuration and the "mdadm --create
> ..." option is not convenient as I would have to know all the creation
> parameters.
> 
> Below is the command sequence.
> 
> Thanks is advance,
> 
> Alberto Morell.
> 
> 
> [root@os2 raid_tools]# mdadm --version
> mdadm - v3.2.6 - 25th October 2012
> 
> [root@os2 ~]# mdadm --create /dev/md/hdd --metadata=1.0 --auto=md --name=hdd \
> --chunk=256 --bitmap=internal --bitmap-chunk=65536 --level=raid10 --run \
> --raid-devices=4 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1
> 
> [root@os2 ~]# mdadm --set-faulty /dev/md/hdd /dev/sde1
> mdadm: set /dev/sde1 faulty in /dev/md/hdd
> [root@os2 ~]# mdadm --set-faulty /dev/md/hdd /dev/sdf1
> mdadm: set /dev/sdf1 faulty in /dev/md/hdd

So now your array is dead.  I assume you expected this.

> 
> [root@os2 ~]# mdadm --remove /dev/md/hdd /dev/sde1
> mdadm: hot removed /dev/sde1 from /dev/md/hdd
> [root@os2 ~]# mdadm --remove /dev/md/hdd /dev/sdf1
> mdadm: hot removed /dev/sdf1 from /dev/md/hdd
> [root@os2 ~]# mdadm --add /dev/md/hdd /dev/sde1
> mdadm: re-added /dev/sde1
> [root@os2 ~]# mdadm --add /dev/md/hdd /dev/sdf1
> mdadm: re-added /dev/sdf1

Adding good things to dead things doesn't make the dead thing undead.
You don't want to do this.

If and array is dead, the best thing to do is to stop it, before trying to
re-add anything, and (after checking the all the devices are really working)
assemble with --force.
That is the best way to breath life into a dead array.

NeilBrown

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

  reply	other threads:[~2014-06-10 11:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAEp9EKjgt1RTkYzhSX-UQN2-WhV3iCKPr_DTnHN_KmorvFNsvg@mail.gmail.com>
2014-06-10 11:04 ` Fwd: Unable to re-assemble a raid 10 after it has FAILED Alberto Morell
2014-06-10 11:30   ` NeilBrown [this message]
2014-06-11  7:24     ` Alberto Morell
2014-06-10 20:28   ` Fwd: " John Stoffel

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=20140610213044.4b6a7996@notabene.brown \
    --to=neilb@suse.de \
    --cc=amp4tj@gmail.com \
    --cc=linux-raid@vger.kernel.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