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

dtiKev

Well-Known Member
Apr 7, 2018
75
4
48
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:
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.
 
So then better bet would be throw in another spinner and put a swap partition on it I suppose?
 
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"...
 
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.
 
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, Proxmox Backup Server, 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 yours easily in our online shop.

Buy now!