zfs.latestCompatibleLinuxPackages is deprecated

Hi helpful folks,
Having just seen this message on a build I’m not totally sure what it means - and the result suggests I may have moved back from kernel 6.10 to 6.6.

Is there a deeper guide before I dive into a rabbit hole?

TIA

1 Like

So the said latestCompatibleLinuxPackages did store the newest version of Linux kernel that could be used.
ZFS generally lacks a bit behind the mainline kernel versions and due to the removal (or let’s say keeping rules) for kernels we don’t keep EOL kernels in the nixpkgs. That could lead to the situation in the past, that the current supported kernel on zfs side became EOL and was removed on nixpkgs.
No longer available on nixpkgs it means that the latestCompatibleLinuxPackages got downgraded to the latest LTS kernel (e.G 6.9->6.6).
That could render the user in a situation that results in an unbootable device (eG if the hardware is not supported by the LTS kernel), it would be better to not downgrade users unaware.

So what I suggest you to do?
Check which kernel version you are currently using (e.G. by using uname)
If your hardware is supported by the LTS kernel, I personally recommend to switch to that kernel version by explicitly naming it. Otherwise use the current used one and explicitly change once needed (eG if it gets EOL or you explicitly want to upgrade to a newer version)

Edit: the recommendation to use LTS is mainly to reduce headaches for future kernel releases, as ZFS will lack behind on the official supported versions.

7 Likes

Thanks for the clear explanation. It’s a shame we don’t have a quick way to set a more recent zfs-compatible kernel, but understand the reasons and agree that latestCompatibleLinuxPackages was not an ideal solution.

Just to be clear, the problem is not our side, ZFS is officially not supporting recent kernels once they are released, and they tend to lack between a few days and few month behind latest Linux kernels.
eG the latest zfs release still just supports up to 6.10, whilst we ship already 6.11 as latest since last week.

So using ZFS with 6.11 (if it would compile, idk if it does), is just using unsupported setups, which is just insane if you like your data.

Edit: for context, 6.10 will be EOL in 1 month and a bit, unless ZFS does a release that would support 6.11, one has to downgrade to 6.6 to have a non EOL and supported setup.

3 Likes

It would be nice to have an out-of-nixpkgs repo that just packages as many kernel versions as humanly possible, even if they’re not supported or cached.

A follow-up question: as the option is deprecated, what is the method to specify a zfs/kernel version pairing. I found a wiki entry, but it is old and I cannot get it to work.

I’d like to be able to fix the kernel version above that of LTS until EOL

Simply explicitly set boot.kernelPackages = linuxPackages_x_y;, i.e. linuxPackages_6_10.

2 Likes

How would you recommend that we track which kernel versions are supported by zfs?

1 Like

Read the release notes for the release that you’re using, e.g. 2.2.6 is compatible with up to linux 6.10

Supported Platforms

  • Linux: compatible with 4.18 - 6.10 kernels
1 Like

Ideally, you wouldn’t. You should use the latest LTS kernel which, incidentally, is the default kernel.

1 Like