I've been looking for resources to manage a migration of several md members from RAID 5 to RAID 6 using mdadm.

Using this handy guide, http://www.ewams.net/?date=2013/05/02&view=Converting_RAID5_to_RAID6_in_mdadm, I can trace through how to convert one member from RAID 5 to RAID 6. (Details from link added below in case website becomes unavailable)

Single Member migration from RAID 5 to RAID6:

  • Step 1: View mdadm status with cat /proc/mdstat and detailed information with mdadm --detail /dev/md0
  • Step 2: If healthy, add additional disk to cover RAID 6 double parity requirements with mdadm --grow /dev/md0 --level=6 --raid-devices=[number_of_drives] backup-file=/root/raid5backup
  • Step 3: View mdadm --detail /dev/md0 to verify RAID is rebuilding. Use same command again after rebuild to ensure all drives synced and healthy.

My question is this. If I've separated my swap from my root partition into md0 (swap) and md1 (/) as is shown in the Ubuntu Server Guide under Advanced Installation, how do I convert both md0 and md1 members to RAID 6? Is it possible?


Yes, this works.


You have disk sda, sdb and sdc equally partitioned into sda/b/c1 and sda/b/c2. Your raid md0 resides on the three partitions sda/b/c1, md1 on sda/b/c2.

Now you partition the new disk sdd with the same partition scheme. This gives you the partitions sdd1 and sdd2.

Then you add sdd1 to md0 and sdd2 to md1. They should apear as spare devices.

Finally you switch the raid level and grow the number of raid disks with mdadm --grow command shown in your question. You do it once for md0 and once form md1.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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