SWAP Disappeared from nodes

Speedy059

Renowned Member
Jul 3, 2010
14
1
68
I'm just noticing this today after I logged into a couple of LXC's that their swap was missing. Then to my surprise, the nodes themselves have 0 swap. The swap must have disappeared after an update or something?

All the nodes are using ZFS for storage option. I could of sworn the nodes used to have swap, and so did the LXC's.

How do I go about enabling it again?
 
You should first check the output of swapon --show on the node, in case it is actually enabled and the problem is elsewhere.
If there is no output, check the output of lsblk to see if you can identify the partition that was being used for swap. If you see it there, you should be able to enable it with swapon /dev/sdX. Following this, make sure there is also an entry for it in /etc/fstab.
If there is no swap partition, you can follow the Debian docs to create one: https://wiki.debian.org/Swap
 
Looks like it never had swap. Since i'm using ZFS i'll create a partition on the rpool/ROOT/swap and then assign it.

Thanks