ZFS How to upgrade to OpenZFS 2.2.2 (for FreeBSD 14)?

It is being reported that OpenZFS 2.2 has data corruption issues, and that it is unfortunate that FreeBSD 14 incorporates this version. So, how can we patch OpenZFS to version 2.2.2?

I saw this, but there are no instructions on how to do it correctly, given that this is a low-level patch/upgrade to the OS - like we need to rebuild it? Could someone please point me to some docs, or provide some helpful advise? Thanks!
 
SirDice The links you gave seems to be for "ZFS snapshot directories not accessible over NFS" problem, which is not the data corruption problem as described here. Could you please clarify if you're talking about the same thing?

SirDice you said we can't upgrade to 2.2.2. but charlie gave those packages and they are covered for OpenZFS 2.2.2. Could you please clarify why we can't upgrade to 2.2.2?

Sorry... I need more clarification as the information is confusing.
 
@SirDice you said we can't upgrade to 2.2.2. but @charlie gave those packages and they are covered for OpenZFS 2.2.2.
The version of OpenZFS in the base cannot be upgraded on existing releases. That's not allowed, 14.0 will be stuck with 2.2.0 for it's entire lifetime (lifetime of 14.0 that is, not the entire 14 branch). On stable/14 2.2.2 has been imported, so it will be included in the future 14.1 release.

The sysutils/openzfs port and module are a development snapshot version of OpenZFS. Intended for those that do actual development on OpenZFS.

Simply put, on 14.0-RELEASE just run freebsd-update(8) to get the fix. On stable/14 update your sources.
 
I am trying on an Amazon instance (FreeBSD 14):
(not yet on my machine)

freebsd-update fetch
... and it says "No updates needed to update system to 14.0-RELEASE-p4."
and I ran "freebsd-update install" and it says "No updates are available to install."
I then added "-s update1.freebsd.org" option to try it and the same result.

"uname -a" still shows:
FreeBSD freebsd 14.0-RELEASE-p3 FreeBSD 14.0-RELEASE-p3 #0: Mon Dec 11 04:56:01 UTC 2023 root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64

"zfs --version" is still showing:
zfs-2.2.0-FreeBSD_g95785196f
zfs-kmod-2.2.0-FreeBSD_g95785196f
 
P4 (the SSH issue) is userland only, no changes to the kernel.
 
The ZFS version number remains unchanged, as mentioned in the previous message.

According to the commit Add an UPDATING entry and bump the branch version. on 2023-12-19, you should be on 14.0-RELEASE-p4. The change (of the latest patch) is probably only in the userland; what's the output of freebsd-version -kru ?
Code:
root@freebsd:~ # uname -a
FreeBSD freebsd 14.0-RELEASE-p3 FreeBSD 14.0-RELEASE-p3 #0: Mon Dec 11 04:56:01 UTC 2023     [email]root@amd64-builder.daemonology.net[/email]:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
root@freebsd:~ # zfs --version
zfs-2.2.0-FreeBSD_g95785196f
zfs-kmod-2.2.0-FreeBSD_g95785196f
root@freebsd:~ # freebsd-version -kru
14.0-RELEASE-p3
14.0-RELEASE-p3
14.0-RELEASE-p4
root@freebsd:~ #
Note that the above is the Amazon EC2 instance which I started (before performing the steps). So, it Is already updated to "p4". The problem is I need to "try it" before doing the update on my actual machine.
 
Last edited by a moderator:
If I use the patch method (patch < /path/to/patch), and recompile and reinstall the kernel, how do I verify it is indeed patched BEFORE and AFTER?

The reason I’m asking this is the above messages seem to imply the OpenZFS version number won’t change to 2.2.2. How to be definitively sure it is indeed patched?
 
Back
Top