Saturday, October 19, 2019

LVM Resize – How to increase or expand the logical volume

1. Oooops, we don't have space anymore!
# df -h

2. Look the current layout of LV and VG
# vgdisplay -m
# lvdisplay

3. Umount the path from lv will be removed
# umount /dev/cl/home

4. Remove lv
# lvremove /dev/cl/home

5. Remove VG
# vgremove cl

6. Now it's time to extend the /dev/mapper/centos-root
# lvextend -r -l +100%FREE /dev/mapper/centos-root

7. Take the extra space to /dev/centos/root (XFS)
# xfs_growfs /dev/centos/root

* For ext3/ext4 use: resize2fs /dev/centos/root

8. See th result
# df -h

No comments:

Post a Comment