How to grow a mdadm RAID 5 array

How to grow a mdadm RAID 5 array

Category : How-to

Get Social!

image

mdadm is a software RAID technology for creating local volumes with RAID functionality such as RAID 5. RAID 5 is used to provide redundancy in the even of a disk failure by using the equivalent space of one disk in the volume for parity data.
One advantage of using mdadm is that you can create volumes of disks to a given size and then expand them at a later date. For example, if you have a RAID 5 array with 3 disks you can expand it to four disks.
Before following these steps you should un-mount the file system using umount.
This example assumes your array is called md1 and the new disk is sdf.

Now we can grow /dev/md1 as follows.

If this fails, you may need to remove the bitmap index before retrying the above command.

The process will now start which can take a while. An Example, 5 x 2TB WD green disks took 3 days to complete. You can view the progress with:

Once this completes, we run a file system check and resize the file system.
You can now re-mount your file system.


Related posts:


1 Comment

Jehu

8-Jan-2017 at 2:29 am

I have 6 3TB drive and using raid 6…I want to add another drive to increase drive space.
All the examples I see is for md0 but I have md0 and md1 raid devices…if I try to add md0 it works but when I try to add md1 to the new drive I get an error that the disk is busy.
Please help.
Thanks!

Leave a Reply

Visit our advertisers

Search

Quick Poll

Do you use GlusterFS in your workplace?

Visit our advertisers