Added swap size limit of 32 GiB
This commit is contained in:
@@ -44,6 +44,10 @@ sgdisk \
|
||||
if [[ "${ENABLE_SWAP}" == "yes" ]]; then
|
||||
SWAP_SIZE="$(((($(vmstat -sS M | grep 'total memory' | sed 's/ M total memory//') / 1024) + 1) * 2))"
|
||||
|
||||
if [[ "${SWAP_SIZE#}" -gt '32' ]]; then
|
||||
SWAP_SIZE='32'
|
||||
fi
|
||||
|
||||
sgdisk \
|
||||
-n2:0:+${SWAP_SIZE}G \
|
||||
-t2:BF02 \
|
||||
|
||||
Reference in New Issue
Block a user