Problem scenario
You mounted 2 GB of swap space (virtual memory) called 2GB.swap. (You followed these directions. Later you added RAM to the server.) This 2 GB swap space is still mounted. How do you clear it and repurpose it on your hard drive?
Solution
1. Run this command: sudo swapoff -a
2. Modify the /etc/sysctl.conf file. (You may want to back it up before you make a change.) Here is what you need to do to change it:
Run this command: sudo vi /etc/sysctl.conf
# eliminate the "vm.swappiness=10" stanza
3. Modify the /etc/fstab file. (You may want to back it up before you make a change.) Here is what you need to do to change it:
Run this command: sudo vi /etc/fstab
#eliminate the "/mnt/2GB.swap none swap sw 0 0"
4. Run these commands:cd /mnt
sudo rm -rf 2GB.swap