The problem#
I had recently done an apt upgrade
that included upgrading ZFS
and noticed zpool status
showed a weird "(non-allocating)
" message,
which seemed concerning:
$ zpool status
pool: tank
state: ONLINE
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ata-*** ONLINE 0 0 0 (non-allocating)
ata-*** ONLINE 0 0 0 (non-allocating)
errors: No known data errors
The solution#
This forum thread suggested the error may be due to a version mismatch between the ZFS tools and the kernel module. I confirmed there was a mismatch:
$ zpool --version
zfs-2.2.3-2
zfs-kmod-2.1.14-1
The easy way to load the new version of a kernel module after an update
is to reboot the computer. But if you don't want to do that, here's the
general outline of the commands I ran to unload and reload ZFS (run as
root
):
# Stop using ZFS
$ zfs umount -a
$ zpool export tank
$ service zfs-zed stop
# Remove modules
$ rmmod zfs
$ rmmod spl
# will show error: rmmod: ERROR: Module spl is in use by: ...
# repeatedly rmmod dependencies until spl is removed.
# Reload ZFS
$ modprobe zfs
$ service zfs-zed start
$ zpool import tank