0

I added 1 disk to my raid array, started reshaping, and then remembered that I forgot to partition the drive.

So I partitioned and readded the disk. I'd like to get rid of that 'removed' and activate spare. How should I do this?

Devices in raid before adding new disk (/dev/sde)

/dev/sda1, /dev/sdb1, /dev/sdc1

Readding /dev/sde

mdadm --manage /dev/md0 -- add /dev/sde
mdadm --grow /dev/md0 --raid-devices=4

mdadm --fail /dev/md0 /dev/sde
mdadm -r /dev/md0 /dev/sde

gdisk /dev/sde

mdadm --add /dev/md0 /dev/sde1

# mdadm -D /dev/md0

/dev/md0:
        Version : 1.2
  Creation Time : Wed Aug 22 02:58:04 2012
     Raid Level : raid5
     Array Size : 5860267008 (5588.79 GiB 6000.91 GB)
  Used Dev Size : 2930133504 (2794.39 GiB 3000.46 GB)
   Raid Devices : 4
  Total Devices : 4
    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Tue Mar 24 23:56:21 2015
          State : clean, degraded, reshaping
 Active Devices : 3
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 1

         Layout : left-symmetric
     Chunk Size : 512K

 Reshape Status : 10% complete
  Delta Devices : 1, (3->4)

           Name : katiska:0  (local to host katiska)
           UUID : bdd04fa0:de9c5f7c:b8b4e71d:64eeee02
         Events : 80888

    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       1       8       17        1      active sync   /dev/sdb1
       3       8       33        2      active sync   /dev/sdc1
       6       0        0        6      removed

       4       8       65        -      spare   /dev/sde1

How could I speed up the process?

# cat /proc/mdstat

Personalities : [raid6] [raid5] [raid4]
md0 : active raid5 sde1[4](S) sda1[0] sdc1[3] sdb1[1]
      5860267008 blocks super 1.2 level 5, 512k chunk, algorithm 2 [4/4] [UUU_]
      [==>..................]  reshape = 11.2% (329849344/2930133504) finish=2088.2min speed=20752K/sec
      bitmap: 0/22 pages [0KB], 65536KB chunk

unused devices: <none>
  • Did you --fail --remove the "wrong" disk? What command did you use to add the new disk? – Andrew Mar 25 '15 at 5:24
  • @Andrew, I'm quite sure that I removed the correct disk (added commands used to question) – warbaque Mar 25 '15 at 7:54
  • Just wait until the reshape action is finished, which yu can check via /proc/mdstat – wurtel Mar 25 '15 at 9:50
  • @KlausHelenius badly worded on my part. – Andrew Mar 26 '15 at 1:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.