From: Aymeric <mulx@aplu.fr>
To: antlists <antlists@youngman.org.uk>, linux-raid@vger.kernel.org
Subject: Re: mdadm RAID1 with 3 disks active on 2 disks configuration
Date: Mon, 24 Feb 2020 10:25:49 +0100 [thread overview]
Message-ID: <DDF3C0A3-0963-4C33-95EC-96D594AA74D7@aplu.fr> (raw)
In-Reply-To: <1f5e671c-8d41-695b-2bc4-74df85361e75@youngman.org.uk>
Le 23 février 2020 21:40:44 GMT+01:00, antlists <antlists@youngman.org.uk> a écrit :
>On 23/02/2020 17:38, Aymeric wrote:
>
>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.
Well, for some reason that didn't happen that way..
>> 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.
I would prefer to revert to sdc as a spare, it's a really a slow disk (5400rpm with a sata1 while others are 7200 at sata3). For a spare disk it's good enough to give me time to get a new disk in case of failure but not for daily.
> 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.
>
So I tried with the --grow option to change the number disk in the array but it doesn't want to change...
# mdadm --grow /dev/md0 --raid-devices=2
mdadm: /dev/md0: no change requested
# mdadm --grow /dev/md0 --raid-devices=3
mdadm: Need 1 spare to avoid degraded array, and only have 0.
Use --force to over-ride this check.
When looking with --examine, sdc3 is marked a replacement device.
# mdadm --examine /dev/sda3 /dev/sdb3 /dev/sdc3|grep 'dev\|Role\|State'
/dev/sda3:
State : clean
Device Role : Active device 1
Array State : AR ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdb3:
State : clean
Device Role : Active device 0
Array State : AR ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdc3:
State : clean
Device Role : Replacement device 1
Array State : AR ('A' == active, '.' == missing, 'R' == replacing)
Thanks,
Aymeric
--
Aymeric P.
Phone: +33 685 674 843
Aymeric
prev parent reply other threads:[~2020-02-24 9:25 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
2020-02-24 9:23 ` Aymeric P.
2020-02-24 9:25 ` Aymeric [this message]
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=DDF3C0A3-0963-4C33-95EC-96D594AA74D7@aplu.fr \
--to=mulx@aplu.fr \
--cc=antlists@youngman.org.uk \
--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