add better comand for expanding LVM (#1190)

This commit is contained in:
Daniel Hansson 2020-04-24 04:57:41 +02:00 committed by GitHub
parent 8f5d65388f
commit 0bfec30ce6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 3 deletions

View File

@ -95,6 +95,13 @@ msg_box "Nextcloud repo is not available, exiting..."
exit 1
fi
# Fix LVM on BASE image
if grep -q "LVM" /etc/fstab
then
# Resize LVM (live installer is &%¤%/!
lvextend -l 100%FREE --resizefs /dev/ubuntu-vg/ubuntu-lv
fi
# Check if it's a clean server
stop_if_installed postgresql
stop_if_installed apache2

View File

@ -16,8 +16,11 @@ debug_mode
# Must be root
root_check
# Resize LVM (somthing happened during installation)
lvresize /dev/ubuntu-vg/ubuntu-lv /dev/sda3
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
# Fix LVM on BASE image
if grep -q "LVM" /etc/fstab
then
# Resize LVM (live installer is &%¤%/!
lvextend -l 100%FREE --resizefs /dev/ubuntu-vg/ubuntu-lv
fi
exit