- Log in to the device console as root
- Check the devices of the virtual machine.
lsblk - Extend the partition
cfdisk
- Resize the Physical Volume
pvresize /dev/sda3
- Resize the Logical Volume
For Debian
For Almalinuxlvextend -l +100%FREE /dev/mapper/hostname--vg-root
For Ubuntulvextend -l +100%FREE /dev/mapper/almalinux-root
lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
- Verify the type of filesystem
df -T
- Resize the filesystem
For EXT4
For XFSresize2fs /dev/ubuntu-vg/ubuntu-lvxfs_growfs /dev/mapper/almalinux-rootxxxzx