From 156ee79572841fa41198a144d9a910fddb3ec577 Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Wed, 3 Jun 2020 22:37:53 +0200 Subject: [PATCH] use backup solution --- nextcloud_install_production.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nextcloud_install_production.sh b/nextcloud_install_production.sh index ca643ea3..8854e08a 100644 --- a/nextcloud_install_production.sh +++ b/nextcloud_install_production.sh @@ -99,7 +99,17 @@ fi if grep -q "LVM" /etc/fstab then # Resize LVM (live installer is &%ยค%/! + print_text_in_color "$ICyan" "Extending LVM..." lvextend -l 100%FREE --resizefs /dev/ubuntu-vg/ubuntu-lv + + # Backup solution + while lvextend -L +1M /dev/ubuntu-vg/ubuntu-lv >/dev/null 2>&1 + do + if lvextend -L +1M /dev/ubuntu-vg/ubuntu-lv | grep -q "Insufficient free space" + then + break + fi + done fi # Check if it's a clean server