Skip to content

Instantly share code, notes, and snippets.

@blakethepatton
Last active November 26, 2020 18:14
Show Gist options
  • Save blakethepatton/6e84e12f52a028ee3b3f9795e00d9e4b to your computer and use it in GitHub Desktop.
Save blakethepatton/6e84e12f52a028ee3b3f9795e00d9e4b to your computer and use it in GitHub Desktop.
Live expand disk ubuntu and esx

Expand the disk in esx

Take a snapshot

Refresh disk size

echo 1>/sys/class/block/sda/device/rescan

if you fdisk /dev/sda you should get an error like GPT PMBR size mismatch (2147483647 != 4294967295) will be corrected by w(rite).

fixed with sudo parted -l

Then follow this:

https://askubuntu.com/questions/24027/how-can-i-resize-an-ext-root-partition-at-runtime

df -h to verify that you've got the more storage

Delete your snapshot

Crack on with your holiday (because systems always run out of space when you'd like to be away from your computer).

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