Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 ?

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

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

share|improve this answer
    
Perfect, thanks :) Turns out our mdadm was too old. –  Sirex May 13 '11 at 10:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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