From 7973b34f636c5162f712ecb2cf9eff364fb21211 Mon Sep 17 00:00:00 2001 From: Vengance Date: Sat, 25 Feb 2017 18:38:17 +0100 Subject: [PATCH 1/2] Fix quota Without this fix, the script tries to remount the filesystem read-only which (mostly) fails and returns an error. Also, running quotacheck two times is not needed. --- bin/v-add-sys-quota | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/v-add-sys-quota b/bin/v-add-sys-quota index 28d40c2e..d36aafc2 100755 --- a/bin/v-add-sys-quota +++ b/bin/v-add-sys-quota @@ -50,9 +50,7 @@ fi # Adding v2 group and user quota index if [ ! -e "$mnt/aquota.user" ] || [ ! -e "$mnt/aquota.group" ]; then - quotaoff $mnt - quotacheck -cug $mnt >/dev/null 2>&1 - quotacheck -aug >/dev/null 2>&1 + quotacheck -avcugm >/dev/null 2>&1 fi # Adding quotacheck on reboot From dc89a43c3af717e9e3ba560d744298dd1e2aaf3c Mon Sep 17 00:00:00 2001 From: Vengance Date: Sat, 25 Feb 2017 18:44:38 +0100 Subject: [PATCH 2/2] Update v-add-sys-quota --- bin/v-add-sys-quota | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/v-add-sys-quota b/bin/v-add-sys-quota index d36aafc2..35423a5d 100755 --- a/bin/v-add-sys-quota +++ b/bin/v-add-sys-quota @@ -63,7 +63,7 @@ chmod a+x /etc/cron.daily/quotacheck # Enabling group and user quota if [ ! -z "$(quotaon -pa | grep " $mnt " | grep 'user\|group' | grep 'is off')" ]; then - quotaon $mnt + quotaon -v $mnt check_result $? "quota can't be enabled in $mnt" $E_DISK fi