Highest linux kernel version for PVE on ZFS

H25E

Member
Nov 5, 2020
68
4
13
32
I'm having some hardware support problems on PVE 7.3 and 7.4 and I was guessing if I could upgrade my kernel or not. Because, as we already know ZFS is not thightly integrated with linux kernel, so one has to be careful to no upgrade the kernel to an unsupported version for the current zfs version.

The problem it's that if I run zfs version I get two different versions, 2.1.9 and 2.1.6:
Code:
zfs-2.1.9-pve1
zfs-kmod-2.1.6-pve1

2.1.9 supports up to 6.1 kernel version but 2.1.6 only up to 5.19. As I'm already running kernel version 5.19, if the "important" version it's the kmod one, that would mean I can't update the kernel without updating zfs-kmod...

So...
  1. In that situation what's the higher linux kernel I can run, 5.19 or 6.1?
  2. If zfs-kmod version it's a bottleneck it's feasible to upgrade it without compromising reliability?

Thanks for your time
 
Last edited:
Aren't you afraid of data corruption or other issues? openZFS git says that the maximum kernel version its 5.19 for zfs 2.1.6 and 6.1 for zfs 2.1.9.

Proxmox team supports zfs within its kernel, but the default kernel version it's the 5.15 which it's well supported by zfs. Does the proxmox team also fixes the incompatibilities between zfs and newer kernel versions? It's completely safe to combine current zfs versions with 6.2 kernel?
 
According to @Stoiko Ivanov, it's rather rare that we pick patches for a newer kernel ourselves and if there's an incompatibility, users of rolling release distributions (like ArchLinux for example) are the first to find out; sometimes things also just work without changing anything.

The latest commit, as of the time of posting this reply, bumps the supported kernel version, so when ZFS 2.1.10 releases, you really can safely opt-in.

Side note: I suggest upgrading your installation using apt update && apt dist-upgrade, because ZFS and its kernel module should already be on 2.1.9. There shouldn't be any discrepancies between the versions AFAIK (correct me if I'm wrong, though).
 
  • Like
Reactions: Chris
I have run `apt update && apt dist-upgrade` and rebooted, but nothing really happened. My zfs kernel module it's still 2.1.6.

If they should be the same then I don't know why they aren't (and weren't) the same. It says everything it's updated.

If they should be different, then what I should take into account before updating the kernel. The plain zfs version or the zfs kmod version?
 
Just to make sure, do you have the no-subscription repository enabled (if you don't have a subscription)?
Also, are there any packages on hold? You can check using apt-mark showhold.
 
1. Yes I do, I'm not in a production environment yet.
2. `apt-mark showhold` returns nothing

Also:
Code:
root@pve:~# apt list --installed | grep zfs

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libzfs4linux/stable,now 2.1.9-pve1 amd64 [installed]
zfs-initramfs/stable,now 2.1.9-pve1 all [installed]
zfs-zed/stable,now 2.1.9-pve1 amd64 [installed]
zfsutils-linux/stable,now 2.1.9-pve1 amd64 [installed]

But:
Code:
root@pve:~# zfs version
zfs-2.1.9-pve1
zfs-kmod-2.1.6-pve1
 
Last edited:
Well, life it's learning. I couldn't find zfs-kmod as an independent package and I was going crazy trying to understand how to upgrade it.

Tinkering I found the /usr/lib/modules directory with the kernel modules of all the kernels that I have ever installed and then I understood that the zfs kmod would be integrated inside the pve-kernel-x.y.z packages.

So I installed kernel 6.1.15-1-pve to check if it has inside a newer zfs-kmod version and also the 6.2.2-1-pve out of curiosity since 6.2 kernels aren't supported yet by openZFS. Then I run strings /usr/lib/modules/*/zfs/zfs.ko | grep -e version= -e vermagic= | grep pve and voila:

Bash:
version=2.1.9-pve1
vermagic=5.15.102-1-pve SMP mod_unload modversions
version=2.1.6-pve1
vermagic=5.15.74-1-pve SMP mod_unload modversions
version=2.1.9-pve1
vermagic=5.15.85-1-pve SMP mod_unload modversions
version=2.1.6-pve1
vermagic=5.19.17-1-pve SMP preempt mod_unload modversions
version=2.1.9-pve1
vermagic=6.1.15-1-pve SMP preempt mod_unload modversions
version=2.1.9-pve1
vermagic=6.2.2-1-pve SMP preempt mod_unload modversions

So, for some reason, the 5.19.17 kernel was using the zfs kmod version 2.1.6, even if some of the previous 5.15 kernels were already using 2.1.9.

Also, the 6.2.2 kernel it's using zfs kmod 2.1.9 but is still unsupported by openZFS, and I don't know if that could be dangerous or not.
 
Last edited:
we ship the ZFS modules directly with the kernels, so you should always get the correct module(s) for your booted kernel. the reason your 5.19 kernel comes with an older version is that the 5.19 kernel series doesn't get any updates anymore.

zfs userspace (the zfs, zpool etc. CLI tools) and the kernel modules should be compatible within a release (2.x), so other than the usual "no updates => no bug or security fixes" problem you should be fine - obviously I'd still recommend switching to the current opt in kernel series instead of staying on the no longer supported 5.19.
 
  • Like
Reactions: H25E
Thanks about the zfs userspace - kernel module compatibility.

The problem it's that the current opt-in kernel version it's the 6.2, which it's still unsupported by latest openZFS version. Isn't that a problem? Can ZFS users upgrade all the way to kernel 6.2 or should they stay on 6.1 until ZFS 2.1.10 gets released?
 
ZFS compat is mainly about changed kernel interfaces - usually an incompatibility means it doesn't even build, and the version info in META is just to guide automatic builds like DKMS. in this case 6.2 works fine with 2.1.9 (at least as far as we and upstream know, there is of course always a chance of yet-to-be-discovered bugs ;)), so there is no need to wait.
 
  • Like
Reactions: H25E

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!