ZFS bug causing kernel panic when accessing snapshots - fix in OpenZFS v2.4.0, is there a simple upgrade?

yourfate

New Member
Jan 2, 2026
2
0
1
Since proxmox upgraded to zfs 2.3.4 I'm having problems with accessing snapshots, it causes kernel panics, making the access hang indefinitely.

Part of my backup strategy is automated backups for container snapshots, but this is broken by this ZFS bug.

The fix: https://github.com/openzfs/zfs/pull/17943

The fix was merged into ZFS main in November, and is part of the OpenZFS v2.4.0 release.

Is there a simple way to upgrade to the newer ZFS (testing repo or something)?

Otherwise, I might have to build my own kernel for a while with newer ZFS. Is there already a good guide on this? I have run linux with custom kernels before, but now with root on ZFS, and not proxmox.

I have submitted a bug report at your bugzilla too: https://bugzilla.proxmox.com/show_bug.cgi?id=7199
 
Last edited:
Also, this fix has been merged into 2.4.0:

https://github.com/openzfs/zfs/issues/16101

This allows to move also ZVOL devices into special device, based on it's volblocksize and special_small_blocks variable. Now the code is not ignoring these blocks belonging to ZVOLs.

Can't wait for 2.4.0 to be available for Proxmox 9.1.4+
Can we have any release dates? :)
 
NOTE: This is for Testing proposes only. IT is not official Proxmox, but I try to do it as close to the official way as possible. In the zfsonlinux change log, I tried adding a jaminmc to the versioning, but the kernel would not compile, as the kernel compiling only works with official versioning.

I have made the update for OpenZFS to 2.4.0 as close as I could to the original implementation of 2.3.4 that is the current Proxmox. I mirrored https://git.proxmox.com/?p=zfsonlinux.git;a=summary on my GitHub, and made a branch for OpenZFS 2.4.0 https://github.com/jaminmc/zfsonlinux. There you can see exactly what was done :).

So to make the current proxmox kernel, which is proxmox-kernel-6.17.4-2-pve, you will need to disable secure boot in your bios, as the signing keys for the kernel are locked down.

Make a Debian 13 container with 50Gig of storage, at least 4 gigs of ram, and 2 gigs of swap, and give it as many cores as you can handle, as it will use all of them.

Then on Proxmox, I recommend that you make a shared folder, and then map it to your container. Change CONTAINERID to match your container number:
Bash:
mkdir -p /shared/deb
chmod 777 /shared/deb
CONTAINERID=121
pct set $CONTAINERID -mp0 /shared/deb,mp=/shared/deb

Then ssh into your Debian 13 container, or do a pct enter $CONTAINERID.

Setup the correct Repositories:
Bash:
cat > /etc/apt/sources.list.d/debian.sources << 'EOL'
Types: deb deb-src
URIs: http://deb.debian.org/debian
Suites: trixie trixie-updates
Components: contrib main
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

Types: deb
URIs: http://security.debian.org
Suites: trixie-security
Components: contrib main
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
EOL

cat > /etc/apt/sources.list.d/proxmox.sources << 'EOL'
Types: deb
URIs: http://download.proxmox.com/debian/pve
Suites: trixie
Components: pve-no-subscription
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg

Types: deb
URIs: http://download.proxmox.com/debian/pve
Suites: trixie
Components: pve-test
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
EOL

wget https://enterprise.proxmox.com/debian/proxmox-archive-keyring-trixie.gpg -O /usr/share/keyrings/proxmox-archive-keyring.gpg

Update and install needed tools:
Bash:
apt update && apt upgrade
apt install devscripts sudo

Clone the Proxmox Kernel (Latest):
Bash:
git clone --depth 10 git://git.proxmox.com/git/pve-kernel.git
cd pve-kernel

EDIT: Latest kernel has 2.4.0!!! Skip this step!! (Left here for posterity)

Remove old ZFS, and add new 2.4.0 Repo:
Bash:
git rm -f submodules/zfsonlinux
git submodule sync
git submodule add -b Openzfs2.4.0 https://github.com/jaminmc/zfsonlinux.git submodules/zfsonlinux
git submodule update --init --recursive

Now we install the Dependencies:
Bash:
mk-build-deps -ir submodules/zfsonlinux/debian/control
make build-dir-fresh
mk-build-deps -ir proxmox-kernel-6.17.4/debian/control

Now we build the Kernel and move the deb's to the shared folder after it finishes:
Code:
make deb && mv *.deb /shared/deb/

Now we need to compile the OpenZFS tools to update them, and move the debs.
Bash:
cd submodules/zfsonlinux/
make deb && mv *.deb /shared/deb/
rm /shared/deb/*dbgsym*

Now on Proxmox, run the following to update the Kernel and openzfs
Code:
dpkg --remove --force-depends libuutil3linux
apt install /shared/deb/{libnvpair3linux,libzfs6linux,libzpool6linux,zfs-initramfs,zfs-zed,zfsutils-linux}*.deb /shared/deb/proxmox-{headers,kernel}-6.17.*-pve_6.17.*_amd64.deb
apt-mark hold proxmox-(headers,kernel)-[Current Version here]

Then Reboot! You will have a working openzfs 2.4.0. You should see this when you run zfs --version, or zpool --version:
Bash:
root@proxmox:~# zfs --version
zfs-2.4.0-pve1
zfs-kmod-2.4.0-pve1
root@proxmox:~# zpool --version
zfs-2.4.0-pve1
zfs-kmod-2.4.0-pve1

You then may want to pin your kernel until there is one that has at least OpenZFS 2.4.0 in it if you use 2.4.0 features, or you may run into problems.
Bash:
proxmox-boot-tool kernel pin 6.17.4-2-pve
 
Last edited:
Well, My post has already been made obsolete in less than 24 hours!!!! The latest update for 6.17.9-1-pve on Proxmox GIT has OpenZFS 2.4.0 on it now! Just skip the step of replacing the OpenZFS part. It should be in the Testing repo soon! But for now, you can compile it yourself and have the official ZFS 2.4.0 support!
 
  • Like
Reactions: twinsen
Well, My post has already been made obsolete in less than 24 hours!!!! The latest update for 6.17.9-1-pve on Proxmox GIT has OpenZFS 2.4.0 on it now! Just skip the step of replacing the OpenZFS part. It should be in the Testing repo soon! But for now, you can compile it yourself and have the official ZFS 2.4.0 support!

Hmm, I don't really want to switch to testing on a production machine tho.

Is there a sane, clean, reversible way to install just that kernel + the userspace tools that come with 2.4.0?