3

I removed a faulty disk from my RAID5 with mdadm --manage /dev/md0 -r /dev/sdd1 and replaced it with a new one. I tried to add it with mdadm --manage /dev/md0 -a /dev/sdd1 but it's only added as a spare disk.

mdadm --detail /dev/md0
/dev/md0:
        Version : 1.0
  Creation Time : Mon Jul 13 20:08:27 2015
     Raid Level : raid5
     Array Size : 14651324160 (13972.59 GiB 15002.96 GB)
  Used Dev Size : 2930264832 (2794.52 GiB 3000.59 GB)
   Raid Devices : 6
  Total Devices : 7
    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Tue Jul 14 09:11:21 2015
          State : active
 Active Devices : 6
Working Devices : 7
 Failed Devices : 0
  Spare Devices : 1

         Layout : left-symmetric
     Chunk Size : 128K

           Name : creadata:0  (local to host creadata)
           UUID : c41c15fd:6e7deae3:5cace8e0:4bf7e244
         Events : 7459

    Number   Major   Minor   RaidDevice State
       0       8       17        0      active sync   /dev/sdb1
       1       8       33        1      active sync   /dev/sdc1
       2       8       65        2      active sync   /dev/sde1
       3       8       81        3      active sync   /dev/sdf1
       4       8       97        4      active sync   /dev/sdg1
       6       8      113        5      active sync   /dev/sdh1

       7       8       49        -      spare   /dev/sdd1

How can I tell mdadm to resync the array with the new disk?

3 Answers 3

1

You should check if your raid is frozen:

cat /sys/block/md0/md/sync_action

and if it is use

echo repair > /sys/block/md0/md/sync_action

to get it started (check with cat /proc/mdstat)

0

Have you tried to run the following

mdadm --manage /dev/md0 -a /dev/sdd1

If yes please try :

mdadm --assemble --scan 

or

mdadm --assemble /dev/md0 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1 /dev/sdg1 /dev/sdh1
1
  • Yes. Still the new disk is listed as spare: mdadm --assemble --force /dev/md0 /dev/sd[bcdefgh]1 mdadm: /dev/md0 has been started with 6 drives and 1 spare. Commented Jul 14, 2015 at 8:38
0

According to the mdadm output, there's no need to resync.

You've got a RAID 5 array with 15TB of usable space, made out of 3TB drives. Such an array needs six drives for normal operation: 5 data drives and 1 parity drive. The mdadm output doesn't show any of the drives as failed, so when you add a seventh drive to the array, mdadm configures it as a hot spare.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .