KB450006 – Extending mdadm Raid and growing LVM

Last modified: February 25, 2019
You are here:
Estimated reading time: 1 min

Setup  6 Drive, mdadm raid6, XFS à LVM (/dev/lvm/root (100G))

Step 1 Add 3 more drives to the Raid

‘mdadm –add /dev/md0 /dev/sd[ghi]’
‘mdadm –grow –raid-devices=9 /dev/md0’

* It was a slow process, changing maximum and minimum speed limits didn’t change re-sync time.

Step 2 Resize the Physical Volume
‘pvresize /dev/md0’

Step 3 Resize the Logical Volume
‘lvextend -L +X /dev/lvm/root’

* X is the amount of space you want to add to your Logical Volume, and /dev/lvm/root is the path of our Logical Volume. We chose to add 900G to reach a total available space of 1000G

Step 4 Mount the volume
‘mount –t xfs /dev/lvm/root /Volume’

*/Volume is the chosen mount point for our logical volume.

Step 5 Extend the file system to include the added space
            ‘xfs_growfs /Volume’

Step 6 Check to see that the mounted volume is now updated
            ‘df -h’

*This should result in showing your volume mounted at your chosen mount point with the additional space added.

Was this article helpful?
Dislike 0
Views: 52
Unboxing Racking Storage Drives Cable Setup Power UPS Sizing Remote Access