mdadm raid5 was added as a spare to itself

by qspitzer   Last Updated September 11, 2019 23:00 PM

I have a raid 5 device created with mdadm. I was working on it and long story short, I wanted to type mdadm --manage /dev/md127 -a /dev/sdd, but I accidentally typed mdadm --manage /dev/md127 -a /dev/md127 -a /dev/sdd which added the raid as a spare drive to itself.

    Number   Major   Minor   RaidDevice State
       4       8       32        0      active sync   /dev/sdc
       1       8       16        1      active sync   /dev/sdb
       -       0        0        2      removed

       3       9      127        -      spare   /dev/md127

Now the raid isn't working properly. I cannot seem to kill it, and my attempts to decrypt it have just ended with the computer hanging with ^C doing nothing.

So my question is this: Is there a way to fix this? I have tried moving the raid to another computer, and restarting the computer and building the raid with mdadm --assemble /dev/md0 /dev/sd[b-c]. Neither of these worked.



Related Questions


How do I move a Linux software RAID to a new machine?

Updated November 02, 2017 01:00 AM

Ubuntu RAID5 failure - unable to recover

Updated June 11, 2017 20:00 PM

Will my reshape result in an unrecoverable array?

Updated January 15, 2018 22:00 PM


mdadm: not large enough to join array

Updated December 06, 2017 17:00 PM