(original article)

Re: Converting RAID5 to RAID6 and other shape changing in md/raid

02 August 2010, 13:51 UTC

Hi Neil, thanks for this wonderful piece of software! Thanks to you I have survived many a hard drive death :)

I've searched https://raid.wiki.kernel.org/ but couldn't find an answer to this problem.

I have a question about converting RAID1 to RAID5. At the moment I have 2*500GB as RAID1 (so 500GB usable), and I want to change it to 3*500GB as RAID5 (so 1000GB usable). I see two ways of achieving this:

1. a- fail one of the RAID1 partitions

b- create a degraded 3 partition RAID5 (ie. 2 partitions present, and one missing) using the "failed" one and the new one

c- copy the data from the remaining RAID1 partition

d- delete the RAID1 array

e- add the remaining partition to the RAID5 and let it resync

2. a- convert the RAID1 to a 2 drive RAID5

b- grow the RAID5 by adding the new partition

Downtime is not a concern, and I'm not bothered about speed, but my concern is - what if a drive dies during the exhausting resync (with way 1) or the probably even more exhausting grow (with way 2)?

Way 1 would obviously lead to data loss if a drive dies. Does way 2 suffer the same problem? If not I'll obviously take that route. But if way2 also suffers the problem, which route would you recommend?

Thanks very much! Steffen