Skip to content

Instantly share code, notes, and snippets.

@yeisoncruz16
Last active March 3, 2021 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yeisoncruz16/e46c3d16e871aab33ca0570c21da3527 to your computer and use it in GitHub Desktop.
Save yeisoncruz16/e46c3d16e871aab33ca0570c21da3527 to your computer and use it in GitHub Desktop.
Increase EC2 Volume Size
  • Log into your AWS account and navigate to EC2

  • View Instance Details looking for the Root Device and Block Devices to identify the volume you want to resize

  • Click the storage Device and select the EBS ID

  • While in the Volumes panel click Actions at the top of the page

  • Select Modify Volume to modify that particular volume

  • Enter the desired volume size in GBs and click modify, yes to confirm

  • SSH into your Instance

  • Run lsblk to list available blocks (volumes) and note the volume size / names

  • Run sudo growpart /dev/volumename 1 on the volume you want to resize, in our case it was sudo growpart /dev/xvda 1

  • Run sudo resize2fs /dev/xvda1 to expand file system

  • Check new size with df -h command

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