0

I swapped out a failing drive using the following tutorial

First I removed the drive with:

mdadm --manage /dev/md0 --fail /dev/sdc1
mdadm --manage /dev/md0 --remove /dev/sdc1

Added and formatted the new drive

sfdisk -d /dev/sda | sfdisk /dev/sdc
mdadm --manage /dev/md0 --add /dev/sdc1

The array started rebuilding with the new drive, but is now stuck as spare rebuilding /dev/sdc1

How can I make the device active again in the array?

root@openmediavault:~# mdadm --detail /dev/md0
/dev/md0:
        Version : 1.2
  Creation Time : Fri Nov 20 00:28:55 2015
     Raid Level : raid5
     Array Size : 3905767424 (3724.83 GiB 3999.51 GB)
  Used Dev Size : 1952883712 (1862.42 GiB 1999.75 GB)
   Raid Devices : 3
  Total Devices : 3
    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Tue Sep  6 19:54:58 2016
          State : active, degraded
 Active Devices : 2
Working Devices : 3
 Failed Devices : 0
  Spare Devices : 1

         Layout : left-symmetric
     Chunk Size : 512K

           Name : manfred:0
           UUID : 051c3493:cd0e06a3:6b8cbbcb:c89c797c
         Events : 16997044

    Number   Major   Minor   RaidDevice State
       4       8       33        0      spare rebuilding   /dev/sdc1
       1       8        1        1      active sync   /dev/sda1
       3       8       17        2      active sync   /dev/sdb1

root@openmediavault:~#  cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md0 : active raid5 sdc1[4] sdb1[3] sda1[1]
      3905767424 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/2] [_UU]
        resync=DELAYED
      bitmap: 0/15 pages [0KB], 65536KB chunk

unused devices: <none>
David
  • 107
  • 3
  • 1
    Are there any relevant error messages in dmesg? – Tim Fletcher Sep 21 '16 at 19:14
  • 1
    According to this rather long threat on superuser with a similar problem the answer was that the new device is reporting errors. http://superuser.com/questions/429776/simple-mdadm-raid-1-not-activating-spare – Tim Fletcher Sep 22 '16 at 08:53

0 Answers0