Update ZFS

[EDIT]
I've reverted from this... it randomly fails to import the bpool, necessitating that I re-apply the steps below.
[/EDIT]

To update ZFS:
sudo add-apt-repository ppa:jonathonf/zfs
sudo apt update
sudo apt upgrade
sudo apt purge

Now, I'm running:
sudo zfs --version
zfs-2.1.6-0york1~20.04
zfs-kmod-2.1.4-0ubuntu0.1

The reboot failed to import the bpool... strangely, the system still booted. After booting, I had to issue:
sudo zpool import bpool

The update also somehow deleted the /boot/grub directory, so sudo update-grub wouldn't work (it threw an error that it couldn't create /boot/grub/grub.cfg, the directory didn't exist). So I issued:
sudo mkdir /boot/grub
sudo update-grub

Issuing the command:
sudo zpool upgrade rpool
This system supports ZFS pool feature flags.

Enabled the following features on 'rpool':

  • redaction_bookmarks
  • redacted_datasets
  • bookmark_written
  • log_spacemap
  • livelist
  • device_rebuild
  • zstd_compress
  • draid

Let's try this:
sudo zpool import bpool
sudo zpool set cachefile=none bpool
sudo zpool set cachefile=none rpool

sudo zpool get cachefile
NAME PROPERTY VALUE SOURCE
bpool cachefile none local
rpool cachefile none local

If you see:
rpool cachefile - local
... issue the command sudo zpool set cachefile=none rpool again.

sudo systemctl unmask systemd-udev-settle.service
sudo systemctl enable --now zfs-import-scan.service
sudo systemctl start zfs-import-scan
sudo grub-mkconfig
sudo update-grub

I'd had systemd-udev-settle.service masked, as it slowed down the boot process... it doesn't seem to do so now.

I disabled the cachefile setup for ZFS (where the machine reads from cachefile which pools to import... it's being considered for deprecation anyway, and causes problems), and set it up to scan for pools to import during boot. I'd done this before, the ZFS update must have reset things.

Then I did grub-mkconfig and update-grub to ensure the grub menu was up to date.

You do not want to upgrade your bpool... doing so makes it no longer work with grub. It generally will block you from doing so.

If you try, it'll give you:
'zpool upgrade' is disabled for 'bpool' to keep compatibility with GRUB.
Skipping upgrade.