[SOLVED] Lately something triggers NFS to be automounted at gnome login. Can't use laptop when not at home.
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Lately something triggers NFS to be automounted at gnome login. Can't use laptop when not at home.
Hei.
I run fedora 25 on a laptop and have used autofs to access NFS for a long time without a hassle.
Lately something (within gnome) triggers autofs to mount NFS, which shouldn't be the case and never was before.
So when I boot the laptop without network connection to the NFS server I can't log into a gnome session. It just hangs with a grey screen for about 5 minutes then the screen turns white and a message appears: Ops, something went wrong, session can't be recoverd.
'gedit' does something similar, that's why I suspect something inside Gnome. I have of course edited files from the NFS share in 'gedit' but even when I start it empty with no file it triggers autofs to automount NFS.
So how can I trace down what application is triggering autofs when I login to Gnome?
I can't use my laptop anymore when I'm not at home
Hmmm...it has to be something relying on a cache rather than autofs. I'm not a Gnome user so can really only offer basic advice here), but you could check settings in dconf-editor perhaps...
I know this is where auto-mounting is configured, but not sure what else can be configured there, and it's not clear to me what else would try to use a stale mount unless it was cached by that system.
You could try increasing the logging verbosity of autofs in the hope that it might provide more clues about what is causing it to be triggered perhaps...
Quote:
To enable logging (default is no logging at all), uncomment and add --verbose to the OPTIONS line in /etc/default/autofs e.g.:
OPTIONS='--verbose --timeout=5'
After restarting the autofs daemon, verbose output is visible in systemctl status or in journalctl.
Good idea to increase logging, here is some output. I shut down, then removed the ethernet cable and Gnome session won't
start until I reconnected the cable.
It looks like autofs just attempts to mount NFS for whatever reason, nothing else involved.
As you suggestet I also disabled to automount all media in the dconf-editor.
I also waited until autofs unmounted by itself after 15 minutes just to make sure there isn't some mechanism that
tries to restore the old state on reboot.
Sadly, nothing changed, but now it's clear that it is autofs itself.
Code:
Feb 24 23:10:40 dell7240.home.no automount[1611]: 1 remaining in /nfs
Feb 24 23:14:25 dell7240.home.no automount[1611]: 1 remaining in /nfs
Feb 24 23:18:10 dell7240.home.no automount[1611]: 1 remaining in /nfs
Feb 24 23:21:55 dell7240.home.no automount[1611]: expiring path /nfs/zmicro
Feb 24 23:21:55 dell7240.home.no automount[1611]: expired /nfs/zmicro
Feb 24 23:23:18 dell7240.home.no systemd[1]: Stopping Automounts filesystems on demand...
Feb 24 23:23:18 dell7240.home.no automount[1611]: umounted indirect mount /nfs
Feb 24 23:23:18 dell7240.home.no systemd[1]: Stopped Automounts filesystems on demand.
I removed the ethernet cable here...
-- Reboot --
Feb 24 23:24:09 dell7240.home.no systemd[1]: Starting Automounts filesystems on demand...
Feb 24 23:24:09 dell7240.home.no automount[1614]: Starting automounter version 5.1.2-1.fc25, master map auto.master
Feb 24 23:24:09 dell7240.home.no automount[1614]: using kernel protocol version 5.02
Feb 24 23:24:09 dell7240.home.no automount[1614]: mounted indirect on /nfs with timeout 900, freq 225 seconds
Feb 24 23:24:09 dell7240.home.no automount[1614]: ghosting enabled
Feb 24 23:24:09 dell7240.home.no systemd[1]: Started Automounts filesystems on demand.
Feb 24 23:24:14 dell7240.home.no automount[1614]: attempting to mount entry /nfs/zmicro
Feb 24 23:27:14 dell7240.home.no automount[1614]: >> mount.nfs: Connection timed out
Feb 24 23:27:14 dell7240.home.no automount[1614]: mount(nfs): nfs: mount failure 192.168.1.3:/zmicro on /nfs/zmicro
Feb 24 23:27:14 dell7240.home.no automount[1614]: failed to mount /nfs/zmicro
Gnome session won't start until I connected ethernet cable here.
Feb 24 23:27:14 dell7240.home.no automount[1614]: re-reading map for /nfs
Feb 24 23:27:15 dell7240.home.no automount[1614]: attempting to mount entry /nfs/zmicro
Feb 24 23:28:38 dell7240.home.no automount[1614]: mounted /nfs/zmicro
Feb 24 23:28:38 dell7240.home.no automount[1614]: re-reading map for /nfs
I cant't think of any reason why autofs attempts to mount NFS when logging in to gnome.
Thanks for your help ferrari.
Do you see anything strange in the log?
I am finally able to reproduce it and see what is wrong with autofs. The difference with autofs in comparison with ordinary mounts is that the mount always exists (you can see it in "/etc/mtab"), but do not have to be really mounted. However, gvfs-udisks2-volume-monitor thinks that it is really mounted if the mount exists...
Consequently, the following code is called which looks for some files on that mounts (e.g. autorun.inf, .xdg-volume-info), which causes the unwanted automounts for autofs...
Hei ferrari, many thanks for all your suggestions.
So I really learned something new about udev, udisks and gvfs. Looked at many suggestet things from the threads and bug report and tried an entry of /etc/fstab containing x-gvfs-hide for my nfs path. Nothing worked.
In the end I returned to search for some sort of Nautilus cache as I had noticed that suddenly NFS got mounted when I just started Nautilus without actually accessing the NFS.
Just for fun I removed the bookmark to the NFS's root directory and made a new one then (that bookmark was there for month without problems).
...and now it works. That's one of those things that make no sense at all but now Nautilus behaves as before and as it should.
Thanks again for pushing me into searching for every possibility!
So, removing the bookmark and recreating it, did the trick.
I'm glad to have walked along with you on this issue. I knew it had to involve something that was cached, so not surprised by your findings with Nautilus here. Anyway, well done with tracking it down.
You were on the right track with some caching problem. Gnome doesn't really make it easy for people to figure out what is going on under the hood.
This morning I noticed that recreating the bookmark to the NFS in Nautilus also fixed the problem that I couldn't start Gedit when not on the network. Nice, I can work again
Thanks mate!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.