Sometimes it is necessary to resize partitions (e.g. updates to GitLab require additional space on /opt). Here's what we need to do. If you have an LVM parition, you're in luck! Things are pretty straightforward.
vgdisplay(Volume Group Display) to verify we have space to expand our partition.
- The line PE Free / Size should have space available.
- Next, add space to the parition with
lvresize(Logical Volume Resize):
sudo lvresize --size +100M /dev/mapper/opt
- Now that the volume has been expanded, let's commit those changes to the filesystem:
sudo xfs_growfs /dev/mapper/opt