from spinning_disk_engineer@lemmy.ca to selfhosted@lemmy.world on 27 Jun 17:55
https://lemmy.ca/post/67021570
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?
#selfhosted
threaded - newest
Guess it should wait just a little longer at this point.
That’s possible. Everything after it is much faster, so I’d assumed it was reacting to some kind of failure event, but I’m not that knowledgeable about this. Edited for clarity.
To be precise, I think that it does not “both fail and finish”.
You get the success message a little late, and some job control has decided earlier that it has failed, when in truth it just took longer than expected. The ‘fail’ message comes from this job control, while the ‘success’ message comes from ZFS itself.