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:
- stop the old raid5 (/dev/md3) using mdadm --stop /dev/md3
- unmount /dev/md3
- Add the drives of /dev/md3 to the new array (/dev/md4) using mdadm --manage /dev/md4 --add /dev/sdX
- 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.