Mdadm with overlaying lvm – remove a hard drive

lvmmdadmraid

This is a hypothetical question, I'm just evaluating in which way I should configure my hard drives for my home-server and for that I need to know this:

Let's say I have a Raid5 configured with mdadm and put the resulting devices md0 and md1 into LVM to get one big, failsafe drive:

enter image description here

Now the grey 1TB drive crashes and since it as been a few years when 1TB drive were the most recent technology, I want to buy a 2TB drive instead.

What would be the best way to bring this new 2TB drive into my Raid system? Of course I could replace the broken 1TB drive with a 2TB one, but then I would waste 1TB of this drive that can't be used. Would it be possible to shrink the md1-array and place the new drive into the md0-array instead?

Best Answer

With Software RAID, you don't have to use whole disks.

If you have 3x2TB and 3x1TB, and planning to replace the 1TB with 2TB in the future, you could use 1TB members. So that's RAID5 (or if you prefer RAID6) over 6x1TB, and RAID5 over 3x1TB. So the 2TB will be shared by both RAIDs.

When you kick out an 1TB and add a 2TB instead, then one RAID will see a replacement, and the other will have the remaining 1TB added as new member.

Related Question