mdadm replace smaller disks with larger ones5 min read

Here’s a quick example to show you. I made a (3) disk RAID5 in VBox with 1GB disks (/dev/sd[bcd]1). Then, I’ll replace each one with 2GB disks (/dev/sd[efg]1). As a sidenote, this is a risky process, and you should have a good, verified backup before you proceed.

Create the array

Add a filesystem

Mount it

Let’s make a testfile to ensure consistency.

Remove the first disk

Add the replacement disk

View the detail (notice the array size is the same).

Complete for the rest of the disks. Here’s with all the disks replaced (you’ll notice the size remains the same).

Now, set the size of the array to the max available space.

Unmount the array, and resize the filesystem.

And check that size now.

And, let’s check the consistency of our original file.

You’re now all set to start adding more files 🙂



I love learning new things and trying out the latest technology.

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.