This patch addresses running `zpool scrub <pool>` with ZFS 2.4 userspace while the loaded kernel module is still 2.3, failing with: ``` cannot scrub <pool>: the loaded zfs module does not support an option for this operation. A reboot may be required to enable this option. ``` Checking for the source of the message via `strace` showed the scrub ioctl failing and setting errno to ZFS_ERR_IOC_ARG_UNAVAIL[0]. With that and the comments in `module/zfs/zfs_ioctl.c`[1] commit:894edd084seemed like a likely cause for the backward incompatibility. The corresponding kernelspace code in `module/zfs/zfs_ioctl.c` defaults to a setting of 0 if either parameter is not set, so not providing the nvpairs in case both are 0 should not make a semantic difference. Tested by: * loading zfs.ko in version 2.3.6 * running `zpool scrub testpool` with zpool from master (error occurs) * running `zpool scrub testpool` with this patch applied (scrub is started) This should help users who are still stuck on an older kernel module, while their distribution ships newer ZFS userspace. This was observed in the Proxmox community forum: https://forum.proxmox.com/threads/.180467/ [0] https://github.com/openzfs/zfs/blob/d35951b18d6e12afeb0d5b0539ff2467ab4bfbcf/include/sys/fs/zfs.h#L1762 [1] https://github.com/openzfs/zfs/blob/d35951b18d6e12afeb0d5b0539ff2467ab4bfbcf/module/zfs/zfs_ioctl.c#L7799 Fixes:894edd084("Add TXG timestamp database") Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com> Co-authored-by: Stoiko Ivanov <s.ivanov@proxmox.com> Closes #18314
OpenZFS is an advanced file system and volume manager which was originally developed for Solaris and is now maintained by the OpenZFS community. This repository contains the code for running OpenZFS on Linux and FreeBSD.
Official Resources
- Documentation - for using and developing this repo
- ZoL site - Linux release info & links
- Mailing lists
- OpenZFS site - for conference videos and info on other platforms (illumos, OSX, Windows, etc)
Installation
Full documentation for installing OpenZFS on your favorite operating system can be found at the Getting Started Page.
Contribute & Develop
We have a separate document with contribution guidelines.
We have a Code of Conduct.
Release
OpenZFS is released under a CDDL license.
For more details see the NOTICE, LICENSE and COPYRIGHT files; UCRL-CODE-235197
Supported Kernels and Distributions
Linux
Given the wide variety of Linux environments, we prioritize development and testing on stable, supported kernels and distributions.
Kernel (kernel.org)
All longterm kernels from kernel.org are supported. stable kernels are usually supported in the next OpenZFS release.
Supported longterm kernels: 6.18, 6.12, 6.6, 6.1, 5.15, 5.10.
Red Hat Enterprise Linux (RHEL)
All RHEL (and compatible systems: AlmaLinux OS, Rocky Linux, etc) on the full or maintenance support tracks are supported.
Supported RHEL releases: 8.10, 9.7, 10.1.
Ubuntu
All Ubuntu LTS releases are supported.
Supported Ubuntu releases: 24.04 “Noble”, 22.04 “Jammy”.
Debian
All Debian stable and LTS releases are supported.
Supported Debian releases: 13 “Trixie”, 12 “Bookworm”, 11 “Bullseye”.
Other Distributions
Generally, if a distribution is following an LTS kernel, it should work well with OpenZFS.
FreeBSD
All FreeBSD releases receiving security support are supported by OpenZFS.
Supported FreeBSD releases: 15.0, 14.3, 13.5.
