Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My RAID1 is degraded and I need to replace /dev/sdb. However, I could mark /dev/sdb5 (in /dev/md1) as failed and removed it, but I can't do the same with /dev/sdb1 (/dev/md0 which is mounted on /):

root@kes:~# mdadm /dev/md0 --fail /dev/sdb1
mdadm: set /dev/sdb1 faulty in /dev/md0

root@kes:~# mdadm --detail /dev/md0
        Version : 00.90
  Creation Time : Wed Apr  7 03:00:39 2010
     Raid Level : raid1
     Array Size : 975185536 (930.01 GiB 998.59 GB)
  Used Dev Size : 975185536 (930.01 GiB 998.59 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Mon Feb 13 12:27:41 2012
          State : active, degraded
 Active Devices : 1
Working Devices : 1
 Failed Devices : 1
  Spare Devices : 0

           UUID : cdc01e79:774eba08:ade2cb46:d0df0469 (local to host kes)
         Events : 0.67569047

    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       2       8       17        1      faulty spare rebuilding   /dev/sdb1

root@kes:~# mdadm /dev/md0 --remove /dev/sdb1
mdadm: hot remove failed for /dev/sdb1: Device or resource busy

So what am I doing wrong?

share|improve this question
I suspect it's because it still thinks it's rebuilding - is it really? (check /proc/mdstat) – Shane Madden Feb 13 '12 at 22:55
Probably, but how would I stop it? (I had to do a restart, after that the problem was solved) – tamasgal Feb 15 '12 at 7:20


echo "idle" > /sys/block/md0/md/sync_action
mdadm /dev/md0 --remove /dev/sdb1

worked for me.

share|improve this answer
@DragonLord your answer? – Braiam Jan 21 '15 at 4:45
Sorry, it was removed because it was found to be incorrect. – bwDraco Jan 21 '15 at 14:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.