LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-08-2016, 06:16 AM   #1
tvind
LQ Newbie
 
Registered: Dec 2016
Location: Tveit, Norway
Distribution: Debian, Fedora, OpenWRT, FreeBSD
Posts: 14

Rep: Reputation: Disabled
NFS folder mounted via autofs, doesn't get unmounted when inactive


Hei.

I'm new to Fedora and have installed Fedora 25 on my laptop.
I'd like to use autofs to automount/autounmount a NFS export from my server running FreeBSD 11.

I can mount and unmount it manually without a problem with:
# mount -t nfs nissen:/nfsshare /mnt/

But when the autofs service is enabled and running, autofs mounts my /nfsshare when I boot and never gets unmounted, even if I don't access it at all.
Timout is default 600s and I tried to set shorter timeout of 180s without affect.

The Archwiki recommended to run 'automount -f -v' in foreground for debugging problems. Even then it's get mounted right away and never beeing unmounted, no error messages.

I guess I read all related threads, manpages and documentation at fedoraproject.org.

What i have done so far...
- used NFSv3 and NFSv4, made no difference
- tried with and without my desired mount options, made no difference
- tried uncountable combinations of configurations from the manpages, forum and documentation
- tried the special map /etc/auto.net which I like best. Unable to mount /nfsshare. No errors

The configuration I have ended up with now:
Code:
[/etc/auto.master]
/-  /etc/auto.direct

[/etc/auto.direct]
/net/nissen/nfsshare/ -fstype=nfs,tcp,hard,intr,nolock 192.168.1.2:/nfsshare
What am I doing wrong, how do I have to configure it to automount and unmount?

Help appreciated!

Matthias

Last edited by tvind; 12-08-2016 at 09:21 AM. Reason: shortend it, was to much text
 
Old 12-09-2016, 12:13 PM   #2
tvind
LQ Newbie
 
Registered: Dec 2016
Location: Tveit, Norway
Distribution: Debian, Fedora, OpenWRT, FreeBSD
Posts: 14

Original Poster
Rep: Reputation: Disabled
Solved

I've found out what was wrong.

I had a comment at the end of a line in my /etc/auto.master.

Today I ran
Code:
automount -f --debug
for the first time, instead of
Code:
automount -f -v
like I did the last days.
while still trying to find why autofs didn't unmount the NFS export...

With the --debug option my map showed up like this:

Code:
...... -fstype=nfs,tcp,hard,intr,nolock,#,And,here,is,what,I,wrote,as,a,comment,at,the,end,of,the,line
Removed the comment and it worked right away.
 
Old 12-09-2016, 12:19 PM   #3
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
That is why it is important to share your entire configuration file with the forum. Common problem. Glad you were able to fix it.
 
1 members found this post helpful.
  


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
Can NFS clients see mounted network files/folders in exported folder??? khaos83 Linux - General 4 12-18-2008 08:02 PM
NIS, NFS, autofs and /home folder question ramram29 Linux - Networking 2 08-25-2006 08:26 PM
(re)sharing an nfs-mounted folder with samba rtspitz Linux - Networking 1 02-13-2005 01:36 PM
inactive mount point can't be unmounted fractal_chaos Linux - General 4 07-01-2004 12:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:56 PM.

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