ZFS: Do you use ZFS mountpoint or legacy?

For my use case, I am not using ZFS for the root partition.

I am, however, planning to store state for services on ZFS. Currently ZFS mounts itself, I kind of am not a fan of this as the mountpoints then do not show up in my config. I am also wondering if there is a difference in when the dataset is mounted when using the ZFS mounting vs legacy mountpoints.

Do you have a preference? Why?

I use both ways. They both work fine. As for why: I can’t see that it matters except for personal preferences in how you write your configs, except that anything that needs to be started early in the boot process has to be mounted legacy (or at least that way is safer for such things, in case there are race conditions during boot).

I have rather a lot of datasets / mountpoints. Hundreds, on some hosts.

I use the nixos filesystems.* entries for just the very essential ones, and the zfs mechanisms for the rest. In part this is habit, coming from illumos, and in part this is to avoid duplication and config getting out of sync with on-disk state.

1 Like