[SOLVED] Recent new node didn't seem to allocate any swap?

dtiKev

Member
Apr 7, 2018
63
2
13
I recently had to replace one of my nodes and the new server was setup from scratch. It's an 8 core/16 thread Intel with 64GB ram. I noticed today when trying to update it that it was very sluggish and the stats in the gui manager weren't keeping up.

After forcing the two very low resource linux guests to shutdown the updates at the cli were still crawling. I went and looked at the physical console and nothing jumped out but the hard drive lights were extremely active.

After a reboot and cleaning up the failed update and then finishing the update and rebooting again it seems ok. I'm running both tiny VMs again at the moment. I started poking around and noticed that this node for whatever reason has no swap. Is this expected? I would have assumed that the installer would have made one.

I tried using the normal tools [fallocate / mkswap, etc.] to make a file based 6GB swap file but learned a new lesson in religion... apparently my swap was full of holes (holy). So... this server has three 2TB drives setup as zfs raidz1 and apparently I can't make a swap file in the standard way.

Looking for clues as to why an actual swap partition didn't get created at install. Was I not supposed to install the entire system on a zfs raid?
 
Last edited:

Ramalama

Member
Dec 26, 2020
88
14
8
32
I seen in another thread, that the installer doesn't make a swap partition either.

However, you can make one yourself as a file like you mentioned, but not on a ZFS storage. I think that ZFS gets imported after fstab. So that swapfile istn't available at boot time.

But you could wrap that into a service file, to attach the swap file after ZFS was imported.

However, this is far away from professional and just somehow a dirty way. But if you search, there are threads with issue, and how to fix it the proper way.

Sorry that i can't help more.
 

dtiKev

Member
Apr 7, 2018
63
2
13
So then better bet would be throw in another spinner and put a swap partition on it I suppose?
 

avw

Active Member
May 31, 2020
265
40
28
the Netherlands
So then better bet would be throw in another spinner and put a swap partition on it I suppose?
Maybe, but you won't have checksums and redundancy if it (partially) fails while the system is running. I think it is difficult to choose between "sure to work but might fail or bits might flip undetected" and "might cause I/O stalls or freeze system, but guaranteed to be correct"...
 

dtiKev

Member
Apr 7, 2018
63
2
13
Do I even need swap with a system that's full ZFS for all volumes?

I mean there is NO WAY I should be running out of RAM so I don't know when swap would even get touched.
 

dtiKev

Member
Apr 7, 2018
63
2
13
Well that made the swap file... and it was very easy so thanks. Marking this solved although I guess we'll see if the problem really was swap. I'm stressing the node now with a 24GBram/6 core Win8 guest, and two four core/4GB RAM guest. With 64GB of ram the swap isn't being touched with updates running on all three.

Thanks all for the input!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE and Proxmox Mail Gateway. We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!