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:
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 ofmdadm
, discussesmdadm
'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
mdadm --grow /dev/md0 --level=6 --raid-disk=6