Sometimes we need more space in our RAID than previously thought, or we just want to add a spare for a little added security.

If all you want to do is add a spare, this is the only command you need to run. Replace “sdb1” with your drive and make sure you’ve already set it up to be using in a RAID. See my previous post and follow the instructions for parted, then carry on here.

Again, if all you want to do is add a spare, you should be done. But if you want to grow the RAID to use the additional space, run the following.

The number of RAID devices here refers to active devices in the array. So take whatever number of active RAID devices you had before, and increase it by how many ever disks you just added.

Monitor mdadm’s progress and wait until it’s done. You should be able to use the RAID array while this is happening, but you may experience some performance issues.

Now resize the file system. This will also take a bit of time, but not nearly as much as reshaping the array.

Enjoy your bigger RAID!

Categories: Linux Tips