Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have recently bought 4 2TB drives to expand my existing 4*2TB raid5 setup, using mdadm software raid in debian. As a initial step, I have created a raid5 on the four new drives and created an encrypted partition using cryptsetup and luks (not using LVM), and copied the data to the new partition. My initial goal was to create a raid0 device with the two raid5 devices, but after some reading, a smarter option seems to be to convert my new raid5 to a raid6 and then add the old drives to this array.

I haven't been able to find a good example on how to do this, but I have gathered the following:

  1. stop the old raid5 (/dev/md3) using mdadm --stop /dev/md3
  2. unmount /dev/md3
  3. Add the drives of /dev/md3 to the new array (/dev/md4) using mdadm --manage /dev/md4 --add /dev/sdX
  4. Convert the array to raid6 using mdadm --grow /dev/md4 --level 6 --raid-devices 8

Question that remain is how to expand the dm-crypt partition to utilize the new space.

As I still have both arrays running, I have the possibility to redo the the new raid5 if necessary.

share|improve this question
About raid5 You can read here . About resizing crypted partition, check this LVM part you can ignore. – Guntis Mar 31 '13 at 13:01
Great articles! The rebuilding took about 2 days and succeeded without problems. – prinsen Apr 11 '13 at 10:09

Your Answer


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

Browse other questions tagged or ask your own question.