Re: mdadm RAID1 with 3 disks active on 2 disks configuration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux