Resize a non-root partition in Ubuntu Server

Resize the disk attached to the VM to whichever size you need then restart the VM with ‘reboot’

lsblk

You should see the device listed with the new size.

If the device is currently mounted, it need to be unmounted before continuing.

sudo umount /dev/sdb
sudo e2fsck -f /dev/sdb
sudo resize2fs /dev/sdb

Now the device needs to be remounted.

sudo mount -a