Last active
October 31, 2020 04:11
-
-
Save Weilbyte/c264049ba5943d5b08ba9595a860af81 to your computer and use it in GitHub Desktop.
Extend LVM volume automatically
This file contains 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
#!/bin/bash | |
disk=/dev/sda | |
part=3 | |
volume=/dev/ubuntu-vg/ubuntu-lv | |
echo -e "Fix\n$part\n" | /usr/sbin/parted ---pretend-input-tty $disk resizepart $part 100% | |
/usr/sbin/pvresize $disk$part | |
/usr/sbin/lvextend -r $volume -l '+100%FREE' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment