Resize LVM Volume after changing disk size of VM

Today I realized that the root partition of one of my server-VMs
was completely full which caused errors in various different services running on this VM.

My Goal was to resize the root partition without rebooting the VM (because it was running some production code).

The first step was to resize the virtual volume in my virtual machine managing environment.

Fdisk confirmed that the volume was resized

After that I used parted to resize /dev/sda2 (My LVM partition).

pvresize is used to resize the physical LVM volume:

I used lvresize to resize the logival volume (in my case cl-root) by 5GB

The last step was to resize the actual root fil-system (CentOS 8 uses XFS):

df was used to confirm that the root file-system was actually resized:

Show Comments