Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got an NFS server and several NFS clients, if I reboot the server, then when the client comes up (if the server is unavailable), I can get it to either skip the NFS mount or prompt me to ask how to continue.

However in man nfs it talks about a bg option, which should fork the mount to the background and retry the connection periodically (dmesg says every 90 seconds). When I try that, the client skips the non-existent server, but never seems to retry the connection when the server does come up.

How can I make it work? This is my fstab setting:

server:/var/www /var/www nfs rsize=8192,wsize=8192,timeo=14,intr,bg,retry=100,nobootwait 0 0

Any ideas?

share|improve this question
Probably mountall, the utility which takes care of mounting the partitions during boot, does not handle "bg" as it should. Better file a bug report for it. – João Pinto Feb 23 '11 at 17:06

I think what you really want to use is auto mounting. Auto mounts only mount when they are needed and dismount when inactive. They also "solve" the problem you are seeing as long as you don't try to access the remote mount until the server is up.

See the Ubuntu Community Docs on Autofs for more information on setting it up.

share|improve this answer
Unfortunately I looked at that, but it won't fit our needs. The Client in question is an apache server, which will be under considerable load. The mount concerned is /var/www which has several websites and their compatriot data directories and a number of the sites have Scripts which run periodically. What I don't want is another sleeping process using up valuable resources, when all I need is a single folder mounting, I also don't want to have to create symlinks to /net on multiple machines, so that I can 'see' otherwise unmounted folders. – user11350 Feb 25 '11 at 9:05
I'm not sure why you would need symlinks to /net. Autofs can be setup for auto-mounting anywhere. For example, I auto-mount several shared drives to common points on the Linux boxes on my network: one goes to /mnt/public, another to /var/lib/mythtv/recordings, another to /var/lib/mythtv/videos, etc... These are all defined in I never use /net unless I am doing a temporary or one-time mount. As for load, I am not convinced that this will cause that much of an increase, but YMMV. It's old tech from the days when 256Meg was a lot of RAM. – jwernerny Feb 25 '11 at 15:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.