Recent thoughts on swap via ZVOL?

NSomers

New Member
Mar 30, 2017
4
1
3
Hey everyone,

I was wondering where things stand with using swap on ZFS? I can't seem to find a good consensus on whether it is advised or not.

I'm building a new system and couldn't for the life of me get the PVE installer to create a ZFS root and boot under UEFI. As a workaround, I used a Live CD to create a ZFS root and installed Jessie there, which I plan to install over with PVE 4.x (kind of a side note, but interested in any feedback on this). I noticed that I didn't have a swap partition after doing this (idiot) and was considering using a ZVOL for swap instead of having to re-partition the 8 disks in the pool - it was a challenge enough to get this far, ha.

Thanks a lot!
 
From my latest testing with Proxmox 4.4 swapping on a ZVOL will still cause crashing once memory pressure gets too high and you actually start to use the swap. My solution to this has been to install proxmox on a small mdadm fake raid and create the ZFS pools after the fact. Your solution does sound better though. I'd be interested in a brief write-up of your method if you get it to work.
 
Hi,

the Proxmox VE install in the current version of 5.4 doesn't create any swap partition anymore if ZFS is selected.
Generall we recommend all installation to remove the swap zvol.
If you like to have swap an extra swap disk is required.
 
Hi,

the Proxmox VE install in the current version of 5.4 doesn't create any swap partition anymore if ZFS is selected.
Generall we recommend all installation to remove the swap zvol.
If you like to have swap an extra swap disk is required.
Hi!
In case of upgrading a cluster from 5.2-10 to 5.4, do the upgrade disable in anyway the SWAP ? What would be the safest way to disable/remove the SWAP in an existing installation ?
Thanks.
 
In case of upgrading a cluster from 5.2-10 to 5.4, do the upgrade disable in anyway the SWAP ?
No upgrade will ever remove your swap partition.
As I wrote the installer will not create the swapp if zfs is selected.
What would be the safest way to disable/remove the SWAP in an existing installation ?
Get the swap partition
Code:
swapon

disable swap.
Code:
swapoff <path to swap>

remove swap entry from /etc/fstab
 

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!