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.

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
3  
About raid5 You can read here zdnet.com/blog/storage/why-raid-5-stops-working-in-2009/162 . About resizing crypted partition, check this help.ubuntu.com/community/ResizeEncryptedPartitions 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
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.