EDIT: turns out I needed to set mountpoint=legacy, (sudo zfs set mountpoint=legacy <filesystem>) which is the standard way to use ZFS on nixos. Legacy in this context means that the mountpoint is decided by the system rather than ZFS; I guess ZFS was previously refusing to receive the mountpoint because it already had one, but I didn’t notice because they happened to be the same.

I’m using ZFS on nixos, with an ext4 boot drive, and a ZFS pool whose key is loaded from the boot disk.

Despite mounting correctly, zfs also causes the system to fail and go into emergency mode. Even if zfs were to fail though, things like sshd and dbus shouldn’t depend on it.

In particular, the system waits for about half a second after

         Starting Mount ZFS filesystems...

and the next line is

[FAILED] Failed to mount /ZFSmountpoint.

and then

[DEPEND] Dependency failed for Local File Systems.

A few lines later I get

[  OK  ] Finished Mount ZFS filesystems.

The next line is about emergency mode.

How can ZFS both fail and finish? And why does this affect the remainder of startup?