Friday, 30 September 2011

Add extra SWAP file

First you need to create an empty swap file, the next command will create a 1Gb file:
dd if=/dev/zero of=/mnt/extra.swap count=1024 bs=1048576 #(where 1048576 bytes = 1Mb)
sudo chmod 600 /mnt/extra.swap
sudo mkswap /mnt/extra.swap
Now edit your /etc/fstab and add a the line:
/mnt/extra.swap none swap sw 0 0
finaly activate the new swap file with:
swapon -a

Possibly Related Posts

1 comment: