LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 02-24-2017, 02:00 AM   #1
tvind
LQ Newbie
 
Registered: Dec 2016
Location: Tveit, Norway
Distribution: Debian, Fedora, OpenWRT, FreeBSD
Posts: 14

Rep: Reputation: Disabled
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

Help appreciated
Thanks!
 
Old 02-24-2017, 05:17 AM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,781

Rep: Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139
Just a guess from me.... could this be tracker at work attempting to index the NFS shares?

https://mail.gnome.org/archives/trac.../msg00013.html
https://ask.fedoraproject.org/en/que...cker-in-gnome/

Apologies if on the wrong track here
 
Old 02-24-2017, 08:00 AM   #3
tvind
LQ Newbie
 
Registered: Dec 2016
Location: Tveit, Norway
Distribution: Debian, Fedora, OpenWRT, FreeBSD
Posts: 14

Original Poster
Rep: Reputation: Disabled
Good idea, but sadly it's not that.

Any more suggestions?
 
Old 02-24-2017, 02:17 PM   #4
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,781

Rep: Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139
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...

dconf-editor > org > gnome > desktop > media-handling

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.
 
Old 02-24-2017, 02:50 PM   #5
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,781

Rep: Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139
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.
https://wiki.archlinux.org/index.php...nal_parameters

Restart it with
Code:
systemctl restart autofs
and check journal output for autofs.service logging...
Code:
journalctl -u autofs
or to watch the logging tail....
Code:
journalctl -fu autofs
 
Old 02-24-2017, 04:52 PM   #6
tvind
LQ Newbie
 
Registered: Dec 2016
Location: Tveit, Norway
Distribution: Debian, Fedora, OpenWRT, FreeBSD
Posts: 14

Original Poster
Rep: Reputation: Disabled
Hei ferrari,

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?

Last edited by tvind; 02-24-2017 at 05:12 PM.
 
Old 02-24-2017, 07:25 PM   #7
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,781

Rep: Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139
This may be relevant...

https://mail.gnome.org/archives/gvfs.../msg00001.html

It links to this Gnome bug report. In particular comment#5 nicely summarises
Quote:
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...
 
Old 02-25-2017, 08:18 AM   #8
tvind
LQ Newbie
 
Registered: Dec 2016
Location: Tveit, Norway
Distribution: Debian, Fedora, OpenWRT, FreeBSD
Posts: 14

Original Poster
Rep: Reputation: Disabled
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.


Cheers!
 
Old 02-25-2017, 02:27 PM   #9
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,781

Rep: Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139
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.
 
Old 02-26-2017, 02:04 AM   #10
tvind
LQ Newbie
 
Registered: Dec 2016
Location: Tveit, Norway
Distribution: Debian, Fedora, OpenWRT, FreeBSD
Posts: 14

Original Poster
Rep: Reputation: Disabled
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!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] nfs-krb mounted home folder - Client hangs at login unehed Linux - Server 4 10-07-2011 06:16 AM
NFS mounts extra home folders on login apotrebka Linux - Server 2 03-19-2009 11:10 AM
auto mount to nfs home dir when user login to nis client lijianatusa Linux - Newbie 4 02-25-2009 11:38 PM
problem logging in with automounted home directories al.lmco Linux - Networking 1 10-15-2008 09:16 PM
How would I mounting /home as an nfs share before gnome starts Nemus Linux - Networking 2 05-23-2007 11:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 01:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration