LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-06-2011, 03:33 AM   #1
brickZA
LQ Newbie
 
Registered: Oct 2011
Posts: 3

Rep: Reputation: Disabled
NFS mount in fstab: howto retry if server is down


When cold starting an sever and its clients, it seems that the clients don't retry the mount if the server is still down (or the nfs server process has not started yet) when they boot. In the client fstab I have:

server:/var/kat/katstore /mnt/katstore nfs size=8192,wsize=8192,timeo=14,intr,bg

I added the 'bg' option in the hope that it would continue re-trying after the initial mount failed, but it never seems to get mounted.

If the server is ready before the client boots, the client does the mount with no problems.

Both the server and the client are running Ubuntu 10.04.2 LTS

How can I get the client to continue re-trying the mount until the server is ready?

Thanks
Neilen
 
Old 10-06-2011, 03:43 AM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Hello,

Read here - http://swoolley.org/man.cgi/5/nfs
Specifically:
Code:
retry=n        The number of minutes to retry an NFS mount operation in
               the foreground or  background  before  giving  up.   The
               default  value  is  10000  minutes, which is roughly one
               week.
Cheers,

Josh
 
Old 10-06-2011, 03:51 AM   #3
brickZA
LQ Newbie
 
Registered: Oct 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by corp769 View Post
Hello,

Read here - http://swoolley.org/man.cgi/5/nfs
Specifically:
Code:
retry=n        The number of minutes to retry an NFS mount operation in
               the foreground or  background  before  giving  up.   The
               default  value  is  10000  minutes, which is roughly one
               week.
Cheers,

Josh

Yeah, I saw that before, but the default of 10000 minutes seems super reasonable. We're talking a question of minutes here. Just to double-check that the ubuntu configuration did not use some other default I added retry=1000 to the options. It made no difference though.
 
Old 10-14-2011, 08:08 AM   #4
brickZA
LQ Newbie
 
Registered: Oct 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
Work around

Well, it seems, as far as I can tell, that just about every linux distribution out there is fundamentally broken w.r.t. handling boot time nfs mounts ;-)

In any case, a work around is presented in https://bugs.launchpad.net/ubuntu/+s...l/+bug/836533/ . I skipped the upstart bit, and just made my /etc/rc.local call the ensure-nfs-mounted script attached to that issue.
 
Old 10-14-2011, 08:18 AM   #5
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Oh ok, that works then. And sorry, I didn't see the notification for your thread. I am subscribed to a LOT of threads on these forums.... But anyways, glad to see you got it working. Mark your thread as solved if you can, thanks!

Cheers,

Josh
 
Old 10-14-2011, 12:08 PM   #6
grim76
Member
 
Registered: Jun 2007
Distribution: Debian, SLES, Ubuntu
Posts: 308

Rep: Reputation: 50
Look into the _netdev mount option if you are having problems with NFS mounts at boot time.
 
  


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
NFS mount in /etc/fstab ? cozye Linux - General 3 09-12-2014 03:48 PM
mount.nfs: mount to NFS server 'jesse' failed: timed out, retrying keupie Linux - Networking 3 06-05-2009 07:03 PM
Give more mount time in /etc/fstab for an nfs mount zambega Linux - Newbie 1 08-13-2008 02:28 PM
Can't mount nfs share from fstab but can mount it manually - help Mountain Linux - Networking 1 03-30-2008 08:34 PM
how do I mount with nfs in fstab? Falafel Linux - Networking 1 11-13-2003 12:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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