A Weird Imagination

Troubleshooting ZFS upgrade

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

The details#

Read more…

Man Humor

Posted in

man (and its lesser known cousin apropos) are invaluable resources for using the command-line on Linux. While the information is useful, sometimes they can also be entertaining, particularly in the BUGS sections. Some due to being overly honest like nethack's which merely states

Probably infinite.

or bash's which admits

It's too big and too slow.

My personal favorite is the passage in the BUGS section for xargs, which, after a two paragraph long discussion on the interaction between the -i, -I, and -s flags finally concludes

Instead, the -i option should not impose a line length limit, which is why this discussion appears in the BUGS section.

Some have comments that are merely strange, like the BUGS section for screen, which, among many other comments, includes the bug

A weird imagination is most useful to gain full advantage of all the features.

which is where this blog gets it name.