05-vm-profile: define minimal var part as 1GB
This commit is contained in:
parent
c7832b062e
commit
dc88e6a6c6
@ -4,6 +4,7 @@
|
|||||||
message() { echo "vm-profile: $*" >>/tmp/vm-profile.log; }
|
message() { echo "vm-profile: $*" >>/tmp/vm-profile.log; }
|
||||||
|
|
||||||
ROOT_MIN=15 # In Gb
|
ROOT_MIN=15 # In Gb
|
||||||
|
VAR_MIN=1 # In Gb
|
||||||
|
|
||||||
mem="$(sed -n '/^MemTotal/s/[^0-9]//gp' /proc/meminfo)" # in kB
|
mem="$(sed -n '/^MemTotal/s/[^0-9]//gp' /proc/meminfo)" # in kB
|
||||||
|
|
||||||
@ -23,14 +24,17 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
root_min="$[ $ROOT_MIN*1024*1024 ]"
|
root_min="$[ $ROOT_MIN*1024*1024 ]"
|
||||||
|
var_min="$[ $VAR_MIN*1024*1024 ]"
|
||||||
|
|
||||||
message "mem=$mem k"
|
message "mem=$mem k"
|
||||||
message "swap=$swap k"
|
message "swap=$swap k"
|
||||||
message "root_min=$root_min k"
|
message "root_min=$root_min k"
|
||||||
|
message "var_min=$var_min k"
|
||||||
|
|
||||||
# EVMS deals with sectors
|
# EVMS deals with sectors
|
||||||
swap="$[ 2*$swap ]"
|
swap="$[ 2*$swap ]"
|
||||||
root_min="$[ 2*$root_min ]"
|
root_min="$[ 2*$root_min ]"
|
||||||
|
var_min="$[ 2*$var_min ]"
|
||||||
|
|
||||||
cat > /var/cache/alterator/vm-profile.scm << _EOF_
|
cat > /var/cache/alterator/vm-profile.scm << _EOF_
|
||||||
((rootonly
|
((rootonly
|
||||||
@ -45,5 +49,5 @@ cat > /var/cache/alterator/vm-profile.scm << _EOF_
|
|||||||
(actiondata
|
(actiondata
|
||||||
("swap" (size . $swap) (fsim . "SWAPFS") (methods $methods))
|
("swap" (size . $swap) (fsim . "SWAPFS") (methods $methods))
|
||||||
("/" (size $root_min . $[2*$root_min]) (fsim . "Ext2/3") (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_
|
_EOF_
|
||||||
|
Loading…
x
Reference in New Issue
Block a user