Grow 3TB RAID5 to 6TB with XFS in Linux

First you need to add to your RAID device /dev/md0 new hdd partition (/dev/sde1, /dev/sdf1/dev/sdg1) in this case /dev/sdg1:

mdadm --add /dev/md0 /dev/sdg1

Then you need to grow your RAID device to the new number of disks X(4,5,6):

mdadm --grow /dev/md0 --raid-devices=4

Since I am using LVM2 on RAID5 with XFS over it you need to do physical volume resize to the max with command:

pvresize /dev/md0

You need also to extend the logical volume to the size of the new HDD partition in this case this is done with command:

lvextend -L +931.50G /dev/storage_vg/storage_lv

Last but not least you need to grow your XFS partition with:

xfs_growfs /dev/storage_vg/storage_lv

Repeat steps when adding new disks.

Leave a Reply

Your email address will not be published. Required fields are marked *