Skip to content

Instantly share code, notes, and snippets.

@debo
Last active March 1, 2017 02:19
Show Gist options
  • Save debo/cb501362dce437dcfd79a499d839cf0f to your computer and use it in GitHub Desktop.
Save debo/cb501362dce437dcfd79a499d839cf0f to your computer and use it in GitHub Desktop.
Commands to extend disk on an AWS EC2
# add a new volume to the instance, ssh into the machine and execute the following commands
lsblk
pvcreate /dev/xvdf
pvdisplay # for sanity check
vgextend vg0 /dev/xvdf
lvextend -l+100%FREE /dev/mapper/vg0-storage
xfs_growfs /storage
df -h # profit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment