LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-04-2019, 05:21 PM   #1
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,141

Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
Way to automount nfs share as needed?


I have been trying to get autofs to work for awhile now. My problem is that it works for the first day or so. After that I can't get it back. When trying to touch my autofs mount it just says permission denied. Trying to ls and it says no such file or directory. Debian stable. I've had the exact same problem on ubuntu.

Last edited by jmgibson1981; 04-04-2019 at 05:30 PM.
 
Old 04-04-2019, 07:55 PM   #2
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Quote:
Originally Posted by jmgibson1981 View Post
I have been trying to get autofs to work for awhile now. My problem is that it works for the first day or so. After that I can't get it back. When trying to touch my autofs mount it just says permission denied. Trying to ls and it says no such file or directory. Debian stable. I've had the exact same problem on ubuntu.
Hi jmgibson1981,

Could you post the entry from fstab file please ?

Thanks,
 
Old 04-04-2019, 08:41 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
There isn't an fstab entry associated with autofs unless the OP is using systemd automount but then it would not be autofs...

Post your auto.master file and if you are using the manual method the autofs configuration file associated with the nfs mount.

Also is this a virtual or real system and if you normally shutdown or does the system go to sleep?

Last edited by michaelk; 04-04-2019 at 08:44 PM.
 
1 members found this post helpful.
Old 04-05-2019, 07:04 AM   #4
sgrlscz
Member
 
Registered: Aug 2008
Posts: 123

Rep: Reputation: 84
You can also turn on autofs logging by changing the logging setting in /etc/autofs.conf to 'verbose' or 'debug'. The default is 'none', so when there is a problem, it just silently fails. I've found verbose usually provides enough information.

After changing the setting, you need to restart autofs.

Once logging is enabled, autofs will send messages to syslog about what it's doing and any errors encountered. I think on Debian, the messages are output to /var/log/syslog.
 
Old 04-05-2019, 10:23 AM   #5
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,141

Original Poster
Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
Code:
+dir:/etc/auto.master.d
+auto.master

/megalith /etc/auto.megalith --timeout=30
Stripped out the comments in the file.

Code:
pool -fstype=nfs,rw,soft,intr,rsize=8192,wsize=8192 megalith.mylan.home:/snapraid/pool
I just added the -fstype last night and things seem to working today as well, that may have been it. Didn't have that part before. But these are based on the Arch wiki.
 
Old 04-05-2019, 10:34 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Not having -fstype is most likely the reason autofs was not working.
 
Old 04-05-2019, 01:51 PM   #7
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,141

Original Poster
Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
In that case I will mark as solved and if it pops again I will post. Thank you for views + hopeful confirmation.
 
Old 04-06-2019, 10:12 AM   #8
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Quote:
Originally Posted by michaelk View Post
There isn't an fstab entry associated with autofs unless the OP is using systemd automount but then it would not be autofs...
Indeed ... read too quickly and also from my own context, where I use fstab for all mounting. Thanks, michaelk.

Cheers, all.
 
  


Reply



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
LXer: Automount NFS share in Linux using autofs LXer Syndicated Linux News 0 02-16-2016 02:21 PM
question about using systemd and automount for NFS share lleb Linux - Networking 1 08-16-2013 06:48 AM
NFS Share within an NFS Share tiberus Linux - Server 2 05-25-2010 10:28 AM
trying to automount an NFS share shahz Linux - Server 10 07-22-2009 05:30 AM
How to automount the nfs share in Mandriva 2007.1 deepugopi Linux - Server 4 10-12-2007 09:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:01 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