Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to resize Ubuntu 16.04LTS EBS backed LVM volume live, in two commands!
# Check the usually suspects before you resize
df -h # Show file systems and their current space
lsblk # show block devices and file systems (do this again after resizing the EBS volume)
sudo pvscan # show physical drives
sudo lvscan # show logical volumes
# Now after you have resized the EBS volumes (you can do this in the console or CLI), the two magic commands:
sudo pvresize </dev/DEVICE> # Resize physical volume(s)
sudo lvextend -r -l +100%FREE <LogicalVolume[Path]>
# df -h # Check your work, pat yourself on back, stop Googling 100 step answers to do this!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.