fallocate swapfile instead of dd

This commit is contained in:
Andrew Schleifer 2019-06-26 14:24:46 +08:00 committed by Rafael dos Santos Silva
parent e9db29df96
commit 72a7bdf04a
1 changed files with 1 additions and 1 deletions

View File

@ -139,7 +139,7 @@ check_disk_and_memory() {
## derived from https://meta.discourse.org/t/13880
##
install -o root -g root -m 0600 /dev/null /swapfile
dd if=/dev/zero of=/swapfile bs=1k count=2048k
fallocate -l 2G /swapfile
mkswap /swapfile
swapon /swapfile
echo "/swapfile swap swap auto 0 0" | tee -a /etc/fstab