This is an old revision of the document!
Swap Files
Description: Swap can be increased by resizing partitions, adding new partitions formatted as swap, or by creating swap files. Swap files are useful if you need to utilize existing volumes and cannot resize the swap partition.
Create a Swap File with DD
Create a block file called “swapfile” in /home/ that is 1GB.
dd if=/dev/zero of=/home/swap bs=1024 count=1024k
Format the File
mkswap /home/swapfile
Enable the Swap
swapon /home/swapfile
Verify Swap is Used
swapon -s
Enable this Swap File After a Reboot
Edit /etc/fstab and add:
/home/swapfile none swap sw 0 0