You are not logged in.
Hi,
I can't seem to get systemd.automount to behave. I have an nfs share available on machine 'kombi' and am trying to access it from machine 'forrest':
[root@forrest ~]# showmount -e kombi
Export list for kombi:
/mnt/nfs4/georgia 192.168.1.202
/mnt/nfs4 192.168.1.202It is set up to automount in /etc/fstab:
kombi:/georgia /mnt/georgia nfs4 rw,suid,dev,exec,noauto,nouser,async,clientaddr=192.168.1.202,_netdev,x-systemd.automount,x-systemd.device-timeout=8 0 0Logging output from journalctl indicates it timed out but then mounted:
Dec 14 17:45:11 forrest systemd[1]: mnt-georgia.mount mounting timed out. Stopping.
Dec 14 17:45:11 forrest systemd[1]: Mounted /mnt/georgia.
Dec 14 17:45:11 forrest systemd[1]: Mounted /mnt/georgia.However it is not mounted. Any process trying to access /mnt/georgia hangs.
Any ideas where I have gone wrong? I don't care if it automounts at boot or at first access. What I'd like is for it to gracefully handle mounting when 'kombi' is up, and unmounting when 'kombi' is down.
Offline
What I'd like is for it to gracefully handle mounting when 'kombi' is up, and unmounting when 'kombi' is down.
systemd's automounting isn't suitable for your requirements then. It doesn't handle a timeout packet, and it certainly doesn't handle a host being down (i'm not even sure autofs does this). have you enabled/started rpcbind?
Offline
Thanks, I guess I have misread other advice on the forums. Even systemd.mount man page states:
If x-systemd.device-timeout= is specified it may be used to configure how long systemd should wait for a device to show up before giving up on an entry from /etc/fstab.From this statement I would expect the remote filesystem to not be mounted if the other machine is down, but not to cause a local process to hang trying to access the unmounted directory.
It looks like autofs may be the way to go - from the NFS wiki:
Using autofs is useful when multiple machines want to connect via NFS; they could both be clients as well as servers. The reason this method is preferable over the earlier one is that if the server is switched off, the client will not throw errors about being unable to find NFS shares.Offline