-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for ZFS Systemd Mount generator #62644
Comments
We would need to make sure file systems mounted this way aren't present in |
Thank you for your contributions.
|
not stale |
I'm maintaining the Alpine, Fedora, RHEL (Alma), Arch Linux and NixOS Root on ZFS guides. The systemd mount point generator causes a lot of headaches. Use legacy mount point with
|
I've been using the mount generator for like a year and a half on one of my systems and have had no troubles.
I think this is not exactly accurate. For a stateless system, sure, I guess. But for many use cases, file systems are a part of the inherently stateful problems that they're trying to solve. And to that end, I think it's reasonable in many cases to want to keep stateful things out of the Nix config, particularly so that the system can be rolled back or rebuilt with minimal concern for the state of the disks. So wanting file systems to be defined with non-legacy mountpoints, and/or with gpt-auto-generator, or whatever else, outside of the Nix config, seems like a valid use case that it would be nice to support. TL;DR: I really don't think it's ok for us to just blanket tell people they should only use legacy mountpoints. There's plenty of reasons you might not want to. |
Are you using it on a NixOS system? |
@gkleen This is what I have.
It basically just enables the generator and disables I copied it from someone else, but unfortunately I can't remember who :P |
@ElvishJerricco thank you for sharing that; I was running into similar problems discussed in this thread but using that snippet fixed things for me. I no longer need to specify |
Recently, support for a systemd mount generator landed in ZFS stable, and support for it is present in both 0.7.13 and 0.8.0. It's fairly simple to use, and works successfully on Arch, though it doesn't (yet) support encrypted datasets, though it's fairly easy to write your own unit file.
The benefit of this is that it allows the use of native ZFS mountpoints, streamlining administration. Using it is fairly simple, with just a few lines of code: https://zfsonlinux.org/manpages/0.7.13/man8/zfs-mount-generator.8.html
Relevant issues and merge requests:
openzfs/zfs#7329
openzfs/zfs#8750
openzfs/zfs#8848
I've used this on Arch and it works wonderfully. I would try and do the integration myself, but my nix skills are not up to par yet.
The text was updated successfully, but these errors were encountered: