1

I have some NFS4 shares mounted via autofs. E.g. /mnt/autofs/MyPictures When I navigate in this directory, e.g., going to /mnt/autofs/MyPictures/2017-01/partyWithHugh, after some time, Nautilus shows again the root folder (/mnt/autofs/MyPictures). Why is that and how can I prevent this?

$ nautilus --version
GNOME nautilus 3.26.0

$ less /etc/auto.master
+auto.master
/mnt/autofs     /etc/auto.nfs   --ghost

$ less /etc/auto.nfs
MyPictures   -fstype=nfs4,rw,soft,intr,async,noatime 192.168.0.107:/MyPictures
kerner1000
  • 4,570
  • 2
    Easiest way: In auto.master add the option -t 0 to the line /mnt/autofs; this will disable expiration of the mount. Or change to some othervalue (in seconds; see man auto.master. And you should move the line +auto.master to the end of the file (well, it really doesn't matter, as you won't use NIS, do you?). – ridgy Dec 31 '17 at 13:03
  • I dont use NIS. Would be nice, though. The 0-timeout will also affect mounts that are not available? I assume a mount that is not available anymore will still show up when there is no timeout? – kerner1000 Jan 03 '18 at 10:33
  • 1
    The timeout set with the auto.master entry is the expiration timeout, what means that after having being idle for that seconds (i.e., no access to the mounted share) there is an automatic unmount. This has nothing to do with the availability of the server; if the server dies before the expiration timeout, the attempt to access the share will as well hang the program. To avoid this (as far as possible), you might have to use appropriate NFS options in auto.nfs. The _ expiration timeout_ is just used to save ressources (network and server) if the mount is no longer used. – ridgy Jan 03 '18 at 11:51
  • 1
    If you want to avoid the behaviour of Nautilus (falling back to the root folder, i.e. the (unmounted) mountpoint, you may create some links somewhere (e.g. in your home folder: ln -s /mnt/autofs/MyPictures/ .. If you access that from Nautilus, the automount should take place and not fall back (well, this is just my experience). – ridgy Jan 03 '18 at 11:57
  • OK, guess its clear now. So setting the expiration timeout to 0 will do exactly what I want, and will not effect availability (which I am trying to address with soft,intr,async,noatime). – kerner1000 Jan 03 '18 at 13:08
  • I would accept your comments as an answer ;) thanks a lot! – kerner1000 Jan 03 '18 at 13:09

0 Answers0