From dc88e6a6c6d1b58176e64745bc41611ec08595ea Mon Sep 17 00:00:00 2001 From: Alexey Shabalin Date: Mon, 27 Dec 2021 20:37:28 +0300 Subject: [PATCH] 05-vm-profile: define minimal var part as 1GB --- installer-distro-alt-server-v/initinstall.d/05-vm-profile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/installer-distro-alt-server-v/initinstall.d/05-vm-profile b/installer-distro-alt-server-v/initinstall.d/05-vm-profile index 6ab0755..1cfd3d4 100755 --- a/installer-distro-alt-server-v/initinstall.d/05-vm-profile +++ b/installer-distro-alt-server-v/initinstall.d/05-vm-profile @@ -4,6 +4,7 @@ message() { echo "vm-profile: $*" >>/tmp/vm-profile.log; } ROOT_MIN=15 # In Gb +VAR_MIN=1 # In Gb mem="$(sed -n '/^MemTotal/s/[^0-9]//gp' /proc/meminfo)" # in kB @@ -23,14 +24,17 @@ else fi root_min="$[ $ROOT_MIN*1024*1024 ]" +var_min="$[ $VAR_MIN*1024*1024 ]" message "mem=$mem k" message "swap=$swap k" message "root_min=$root_min k" +message "var_min=$var_min k" # EVMS deals with sectors swap="$[ 2*$swap ]" root_min="$[ 2*$root_min ]" +var_min="$[ 2*$var_min ]" cat > /var/cache/alterator/vm-profile.scm << _EOF_ ((rootonly @@ -45,5 +49,5 @@ cat > /var/cache/alterator/vm-profile.scm << _EOF_ (actiondata ("swap" (size . $swap) (fsim . "SWAPFS") (methods $methods)) ("/" (size $root_min . $[2*$root_min]) (fsim . "Ext2/3") (methods $methods)) - ("/var" (size $root_min . #t) (fsim . "Ext2/3") (methods $methods))))) + ("/var" (size $var_min . #t) (fsim . "Ext2/3") (methods $methods))))) _EOF_