One problem remains. When the network is down, the generated mount
unit (which systemd creates from parsing /etc/fstab) can easily enter
failed state after a few failed mounts. And due to automatic
dependencies, the automount unit becomes failed too. This is the
problem. Without the automount service, the sshfs mountpoint is left
all empty and a manual step is needed to fix the situation.
I think what's need is a Restart=always or something for one of those
units. The problem is that such options are not available in the
So I'm back to the issue from the first post: how to mount sshfs using
the systemd.mount interface (which has full access to Restart= etc.
In general: why is it so difficult to have a mountpoint that either
gives you access to the other filesystem OR returns an error? It seems
all too easy to end up in a situation where the filesystem becomes
"silently" unmounted and programs accessing the mountpoint will not
know about it (happily continuing using the now local filesystem).
Non-solutions: using mountpoint(1) or "test
 Systemd parses a few special options from /etc/fstab:
nix-dev mailing list