This is an old revision of the document!
Create a swapfile with blocksize 1024 and 2GB
dd if=/dev/zero of=/swap/swapfile bs=1024 count=2MFormat the file and set permissions
mkswap /swap/swapfile chown root:root /tmp/swapfile chmod 600 /swap/swapfileAdd the swapfile to swap
swapon /tmp/swapfile
Turn off the swapfile (used swap will be moved to other swap or memory, might take a while) swapoff /swap/swap
Discussion