diff -Nru partman-auto-134ubuntu1.1/debian/changelog partman-auto-134ubuntu1.2/debian/changelog --- partman-auto-134ubuntu1.1/debian/changelog 2016-09-06 11:57:44.000000000 -0600 +++ partman-auto-134ubuntu1.2/debian/changelog 2018-02-16 12:19:09.000000000 -0700 @@ -1,3 +1,14 @@ +partman-auto (134ubuntu1.2) UNRELEASED; urgency=medium + + * lib/recipe.sh: For recipes that define the minimum swap partition + as a factor of memory size, cap the min at 2G. Modern servers often + have 10s of GB of memory, and it's unreasonable to steal that much + disk space by default on systems that are unlikely to hibernate. + It can even lead to install failures as memory sizes approach disk + size. (LP: #1351267) + + -- dann frazier Fri, 16 Feb 2018 12:19:09 -0700 + partman-auto (134ubuntu1.1) xenial; urgency=medium * lib/auto-shared.sh: list Software RAID devices on NVMe disks. Thanks to diff -Nru partman-auto-134ubuntu1.1/lib/recipes.sh partman-auto-134ubuntu1.2/lib/recipes.sh --- partman-auto-134ubuntu1.1/lib/recipes.sh 2016-09-06 11:56:23.000000000 -0600 +++ partman-auto-134ubuntu1.2/lib/recipes.sh 2018-02-16 12:14:55.000000000 -0700 @@ -86,6 +86,11 @@ ram_percent="${1#*+}" ram_percent="${ram_percent%?}" min=$((${1%%+*} + $ram * $ram_percent / 100)) + if [ "$4" = "linux-swap" ] && [ $min -gt 2000 ]; then + # Constrain min swap on large mem systems. + # See LP: #1351267. + min=2000 + fi elif expr "$1" : '[0-9][0-9]*%$' >/dev/null; then min=$(($ram * ${1%?} / 100)) else # error