So I have a problem, I'm managing a server and the swap partition is way too small at the moment. The machine runs KVM with about 24 VM's on it. The problem is that some of them are rather inactive so they get swapped. However the guy managing it before me only used 4 GB for swap, which is constantly filled. It's not a problem, because my memory usage is only at about 64%, but it would be nice if I could extend the swap.I know I can make an extra swap volume with lvm. What I was wondering about is if it is possible to mount it to the host and use it without rebooting the server?
KVM and swap problem
linux;swap
You can dynamically add or remove swap spaces with swapon and swapoff. If you remove to much memory, running processes could be killed. You can also give priorities between the swap spaces using the -p option.To format a new partition/lvm volume as swap, use mkswap.