Skip to content

Instantly share code, notes, and snippets.

@nntoan
Created February 8, 2021 04:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nntoan/ab308d30e40edcb2bf3fb825792f4b52 to your computer and use it in GitHub Desktop.
Save nntoan/ab308d30e40edcb2bf3fb825792f4b52 to your computer and use it in GitHub Desktop.
Vagrant resizedisk post

Updating existing vagrant box

  • Do all of the above
  • Run vagrant halt & vagrant up (You should see something like "Resized disk: old 32768 MB, req 51200 MB, new 51200 MB")
  • SSH to vagrant box
  • Run sudo cfdisk /dev/sda
  • Use arrows to select your disk probably sdaX. Mine was sda3.
  • Then select resize using arrow keys. Accept the suggested disk size.
  • Then select write. And answer yes.
  • You can select quit now.
  • Run sudo resize2fs -p -F /dev/sdaX You should see something like: "Filesystem at /dev/sda3 is mounted on /; on-line resizing required old_desc_blocks = 4, new_desc_blocks = 6 The filesystem on /dev/sda3 is now 11933952 (4k) blocks long. "
  • Run df and see that your disk size has increased.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment