July 2016
M T W T F S S
 123
45678910
11121314151617
18192021222324
25262728293031

Categories

July 2016
M T W T F S S
 123
45678910
11121314151617
18192021222324
25262728293031

swapon: swapfile: swapon failed: Invalid argument

fallocate -l 4G /swapfile chmod 600 /swapfile mkswap /swapfile

swapon /swapfile swapon: /swapfile: swapon failed: Invalid argument

echo “/swapfile swap swap sw 0 0” >> /etc/fstab echo “vm.swappiness = 10” >>/etc/sysctl.conf echo “vm.vfs_cache_pressure = 50” >> /etc/sysctl.conf

The problem with fallocate(1) is that it uses filesystem ioctls to make the allocation fast and effective, […]