LINUX - How do I change swap partition

On the fly:

sudo swapoff /dev/hda3
sudo mkswap /dev/hda4
sudo swapon /dev/hda4


For bootime : 
after you have run the mkswap, edit the /etc/fstab file and the change the /dev/hda3 line accordingly.


SOURCE : https://serverfault.com/questions/17718/how-do-i-change-swap-partition-in-linux