Linux RAID subsystem development
 help / color / mirror / Atom feed
From: antlists <antlists@youngman.org.uk>
To: Aymeric <mulx@aplu.fr>, linux-raid@vger.kernel.org
Subject: Re: mdadm RAID1 with 3 disks active on 2 disks configuration
Date: Sun, 23 Feb 2020 20:40:44 +0000	[thread overview]
Message-ID: <1f5e671c-8d41-695b-2bc4-74df85361e75@youngman.org.uk> (raw)
In-Reply-To: <4cf4cbe7-989e-d7ec-cad9-cfde022bd4bf@aplu.fr>

On 23/02/2020 17:38, Aymeric wrote:
> Hello,
>
> I've a system with a RAID1 using two disks (sda + sdb) + 1 spare (sdc).
>
> For some stupid reason (cable) the spare (sdc) became active and sda was
> out the array.
>
> I then added back sda to the RAID1 but now I've RAID1 with three active
> disks and zero spare.
> I don't understand why the spare device didn't switch back as spare
> after sda have been rebuild.
Because rebuilding sda is a lot of work. The sensible option would have 
been to leave sdb and sdc active, and left sda as spare.
> I used the following command to add sda to the RAID1:
> # mdadm  /dev/md0 --add /dev/sda3
>
>
> What did I do wrong here? And how to fix it? Do I have to set sdc to
> faulty and add it back?

I'd just leave it as a 3-disk raid. But no, if you do want to set it 
back to a 2-disk raid don't do a "faulty and re-add" - that'll just make 
re-sync it again. Somehow you've got active devices set to 3, so just 
set that back to two. If you look on the wiki it covers the scenario of 
converting a three-disk raid to two.

The only thing I will add about a 3-disk raid is that if you want to 
change it to anything else, you'll have to revert to 2 first, but do 
that when you want to change things, leave it at 3 for the moment.

> Thanks!

Cheers,

Wol

  reply	other threads:[~2020-02-23 20:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-23 17:38 mdadm RAID1 with 3 disks active on 2 disks configuration Aymeric
2020-02-23 20:40 ` antlists [this message]
2020-02-24  9:23   ` Aymeric P.
2020-02-24  9:25   ` Aymeric

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=1f5e671c-8d41-695b-2bc4-74df85361e75@youngman.org.uk \
    --to=antlists@youngman.org.uk \
    --cc=linux-raid@vger.kernel.org \
    --cc=mulx@aplu.fr \
    /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