[systemd-devel] automount unit that never fails?

Bjørn Forsman bjorn.forsman at gmail.com
Fri Nov 4 08:38:27 UTC 2016


Hi Lennart,

On 3 November 2016 at 20:19, Lennart Poettering <lennart at poettering.net> wrote:
> Your mail does not say in any way what precisely your issue is?

Did you read the first post? I hope not, because I don't really know
how to describe it more precisely than that :-)

Below is a copy of the first post.

When a mount unit fails (repeatedly), it takes the corresponding
automount unit down with it. To me this breaks a very nice property
I'd like to have:

  A mountpoint should EITHER return the mounted filesystem OR return an error.

As it is now, when the automount unit has failed, programs accessing
the mountpoint will not receive any errors and instead silently access
the local filesystem. That's bad!

I don't consider using mountpoint(1) or "test
mountpoint/IF_YOU_SEE_THIS_ITS_NOT_MOUNTED" proper solutions, because
they are out-of-band.

I was thinking of adding Restart=always to the automount unit, but
that still leaves a small timeframe where autofs is not active. So
that's not ideal either. Also, using Restart= implies a proper .mount
unit instead of /etc/fstab, but GVFS continuously activates autofs
mounts unless the option "x-gvfs-hide" is in /etc/fstab. So I'm kind
of stuck with /etc/fstab until that GVFS issue is solved.

So the question is, what is the reason for the mount unit to take down
the automount? I figure the automount should simply never fail.

Thoughs?

(I'm running NixOS 16.09 with systemd 231, trying to setup robust,
lazy sshfs mount.)

Best regards,
Bjørn Forsman


More information about the systemd-devel mailing list