Last active
June 22, 2018 23:04
-
-
Save u2mejc/2983e7e0c60c7636120afbdfd69d6bb4 to your computer and use it in GitHub Desktop.
How to resize Ubuntu 16.04LTS EBS backed LVM volume live, in two commands!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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