0

I have read this question: Can I create a "soft" RAID1 array without nuking data? as well as many other tutorials that layout this general process:

  • Create degraded RAID1 array on new drive
  • Copy over data to new drive
  • Add the old drive to the array, and it gets written over by the data that it holds...

This seems quite inefficient and pointless. Is there a way to do it without copying the data twice?

4

Almost certainly not. Every RAID system I'm aware of takes some of the disk space to store its metadata and superblock, and that cuts into the space available to store files. If you had the disk partitioned in "just the right way", you could, theoretically, do it without an extra copy, but it would require an extensive amount of knowledge about how the specific RAID system you were using worked, and probably a few practice tries on a scratch system to make sure you weren't about to nuke all your data.

In short: just copy the data twice. It's no big deal.

2

You can't do it with mdadm, but if you're using LVM, you can use lvconvert to make an existing LV mirrored with no downtime and only copying the data once.

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.