Reshape linux md raid5 that is already being reshaped?

Posted by smammy on Server Fault See other posts from Server Fault or by smammy
Published on 2012-11-18T04:19:48Z Indexed on 2012/11/18 5:01 UTC
Read the original article Hit count: 277

Filed under:
|
|

I just converted my RAID1 array to a RAID5 array and added a third disk to it. I'd like to add a fourth disk without waiting fourteen hours for the first reshape to complete.

I just did this:

mdadm /dev/md0 --add /dev/sdf1
mdadm --grow /dev/md0 --raid-devices=3 --backup-file=/root/md0_n3.bak

The entry in /proc/mdstat looks like this:

md0 : active raid5 sdf1[2] sda1[0] sdb1[1]
      976759936 blocks super 0.91 level 5, 64k chunk, algorithm 2 [3/3] [UUU]
      [>....................]  reshape =  1.8% (18162944/976759936) finish=834.3min speed=19132K/sec

Now I'd like to do this:

mdadm /dev/md0 --add /dev/sdd1
mdadm --grow /dev/md0 --raid-devices=4 --backup-file=/root/md8_n4.bak

Is this safe, or do I have to wait for the first reshape operation to complete?

P.S.: I know I should have added both disks first, and then reshaped from 2 to 4 devices, but it's a little late for that.

© Server Fault or respective owner

Related posts about raid

Related posts about raid5