Skip to content

Instantly share code, notes, and snippets.

@sdevn
Created April 30, 2022 00:29
Show Gist options
  • Save sdevn/c7a0061d64f8f761e7f238f38a1115b2 to your computer and use it in GitHub Desktop.
Save sdevn/c7a0061d64f8f761e7f238f38a1115b2 to your computer and use it in GitHub Desktop.
Extend VirtualBox disk on Ubuntu 18.04 without LVM

After you increase drive's size through Virtual Media Manager, boot into Ubuntu (or connect via SSH) and run:

Verify that disk's size is not updated (also find your device path):

df -h

device path should be like /dev/sdaX, then run:

sudo growpart /dev/sda X
sudo resize2fs /dev/sdaX

after growpart it may ask you to fix disk's size entries, type "Fix".

You're ready! Verify that everything is now okay with df -h (reboot may needed)

Source: https://unix.stackexchange.com/questions/564980/ubuntu-18-04-extend-disk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment