gvfs-udisks2-volume-monitor activates autofs mountpoints
@bjornfor
Submitted by Bjørn Forsman Assigned to gvf..@..e.bugs
Link to original bug (#771740)
Description
I have an autofs + sshfs mount set up in /etc/fstab (requires systemd):
/path/to/sshfs#user@host.local:/ /home/user/mnt/host.local fuse noauto,_netdev,allow_other,x-systemd.automount,ssh_command=/path/to/ssh_as_user 0 2
where "/path/to/ssh_as_user" is:
#!/bin/sh exec "/path/to/sudo" -i -u "user" "/path/to/ssh" "$@"
The problem is that gvfs-udisks2-volume-monitor continuously activates the autofs mountpoint:
systemd[1]: Set up automount home-bfo-mnt-ul30a.local.automount. systemd[1]: home-bfo-mnt-ul30a.local.automount: Got automount request for /home/bfo/mnt/ul30a.local, triggered by 2225 (gvfs-udisks2-vo) systemd[1]: home-bfo-mnt-ul30a.local.automount: Got automount request for /home/bfo/mnt/ul30a.local, triggered by 2225 (gvfs-udisks2-vo) systemd[1]: home-bfo-mnt-ul30a.local.automount: Got automount request for /home/bfo/mnt/ul30a.local, triggered by 2225 (gvfs-udisks2-vo) systemd[1]: home-bfo-mnt-ul30a.local.automount: Got automount request for /home/bfo/mnt/ul30a.local, triggered by 2225 (gvfs-udisks2-vo) systemd[1]: home-bfo-mnt-ul30a.local.automount: Got automount request for /home/bfo/mnt/ul30a.local, triggered by 2225 (gvfs-udisks2-vo) systemd[1]: home-bfo-mnt-ul30a.local.automount: Got automount request for /home/bfo/mnt/ul30a.local, triggered by 2225 (gvfs-udisks2-vo) systemd[1]: home-bfo-mnt-ul30a.local.automount: Unit entered failed state.
This is undesirable.
On the GVFS mailing list I was informed about the "x-gvfs-hide" mount option, or to put the autofs mountpoint somewhere else, where GVFS doesn't consider to auto-mount. But still it seems like a bad idea to have the current behaviour as default.
(Also, for native systemd .mount and .automount units, the "x-gvfs-hide" mount option doesn't work, presumably because GVFS only looks in /etc/fstab and not in the systemd units.)
Best regards, Bjørn Forsman
Version: 1.22.x