Last active
January 13, 2023 15:12
-
-
Save alirezazadeh77/92690fd1c1fdea748676acf7e2430e5a to your computer and use it in GitHub Desktop.
allocate free storage from lvm disks
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 | |
# example: | |
# ./resize_lvm_storage.sh ubuntu-vg ubuntu-lv 99 | |
SIZE=$3 | |
LG=$1 | |
LV=$2 | |
vgdisplay $LG | |
lvextend -L +"$SIZE"G /dev/"$LG"/"$LV" | |
resize2fs /dev/"$LG"/"$LV" | |
df -h |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment