http://tempatmencatat.blogspot.co.id/2015/12/how-to-add-swap-on-centos-6.html
http://unix.stackexchange.com/questions/144213/extending-swap-on-centos
1
1
|
I
I recently created a swap file on my centos 6 based VPS using this guide. Now I wanted to extend this swap and I was reading through this guide. However, I think I've created a swap file than a partition. How do I go about extending this swapfile? The current size is 512M and I need to extend it by another 1G. Any help would be appreciated since I'm a linux newbie.
| ||
add a comment
|
3
|
Can you show the results of
so we can be sure of your situation?
BTW - did you make sure the swap space (file or partition) is in your /etc/fstab?
UPDATE
3.1 Create new swapfile
3.2 Modify /etc/fstab to point to new swap file.3.3 swapoff <path/to/OLD/swapfile> 3.4 swapon -a 3.5 rm <path/to/OLD/swapfile>
Optionally combine 3.3 and 3.4 as:
swapoff /path/to/OLD/swapfile && swapon -a will ensure least amount of time without swap. | ||||||||
|