This is a two part question.

1) Can you reshape raid 5 to 6 with mdadm on linux (fairly sure you can, but cant get mdadm to accept it)

2) Can you do 1) while also growing the array in one go ?


Yes, you can reshape raid5 to raid6, provided you have a recent enough version of mdadm. In his blog, Neil Brown, the lead architect and developer of mdadm, discusses mdadm's current capabilities to reshape arrays and change raid levels.

The key points relevant here are as follows:

  • You need version 3.1 (or newer) of mdadm, as well as a fairly recent kernel (at least 2.6.31).

  • A 3-or-more drive raid5 can be converted in-place to a raid6. The following command should do it:

mdadm --grow /dev/md0 --level=6

  • Alternatively, a faster way to reshape a raid5 to raid6 is to increase the number of drives at the same time, as that removes the need for the reshape code to take additional backup steps internally. In his blog, Neil gives the example of converting a 4-drive raid5 to a 6-drive raid6, as follows:

mdadm --grow /dev/md0 --level=6 --raid-disk=6

  • Perfect, thanks :) Turns out our mdadm was too old. – Sirex May 13 '11 at 10:12

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.