Expanding an Rocky 8 VMware Virtual Disk
This is always something I forget. How do you expand the filesystem after you expand an existing virtual disk on Rocky Linux 8?
- Install growpart using
dnf install -y cloud-utils-growpart - Find the partition you need to expand using
fdisk -l. In my example, it was/dev/sda3 - Grow the partition using
growpart /dev/sda 3Here you specify the partition number of the device, so the space is required. - Find the path of the lvm logical volume using
lvdisplay - Extend the logical volume using
lvextend -l +100%FREE <LGPATH> - Extend the filesystem using
xfs_growfs <LGPATH> - DONE!
Written on February 3, 2024