Skip to content
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

zfs-mount-generator nofail option does not work #17148

Open
iyzana opened this issue Mar 14, 2025 · 0 comments
Open

zfs-mount-generator nofail option does not work #17148

iyzana opened this issue Mar 14, 2025 · 0 comments
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@iyzana
Copy link

iyzana commented Mar 14, 2025

System information

Type Version/Name
Distribution Name Arch Linux
Distribution Version rolling
Kernel Version 6.12.18-1-lts
Architecture x86_64
OpenZFS Version 2.3.1-1

Describe the problem you're observing

Mount units generated by zfs-mount-generator with org.openzfs.systemd:nofail=on set on the dataset still have Before=local-fs.target set in the running system.

That is because according to man 5 systemd.mount: "Mount units referring to local file systems automatically gain an After= dependency on local-fs-pre.target, and a Before= dependency on local-fs.target unless one or more mount options among nofail, x-systemd.wanted-by=, and x-systemd.required-by= is set."

The zfs-mount-generator does not itself set the Before=local-fs.target ordering when org.openzfs.systemd:nofail=on is set, but that does not keep systemd from then still adding it as a default dependency.

I believe zfs-mount-generator should also include nofail in the mount Options= in this case.

Describe how to reproduce the problem

  1. Set canmount=on and org.openzfs.systemd:nofail=on on a dataset.
  2. systemctl soft-reboot
  3. systemctl show mnt-<dataset>.mount | grep Before=
  4. Observe that local-fs.target is still included

Include any warning/errors/backtraces from the system logs

@iyzana iyzana added the Type: Defect Incorrect behavior (e.g. crash, hang) label Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

No branches or pull requests

1 participant