1

I have a home server running ubuntu which exports a nfs volume which I'm mounting on my laptop like this

-> % cat /etc/fstab
...
media:/mnt/data /home/alf/media   nfs   _netdev     0 0

All is good.

..until I boot up my laptop at work (or any place except my house). Then booting hangs for a couple of minuttes trying to mount this volume which obviously isn't available. Very annoying.

I've (quick) read pretty much the whole nfs man page and searched high and low for a way to say to nfs: "look man, if you cannot reach my server, just skip it and move on, ok?", but I just can't find a way to do this.

Any suggestions? :)

1

You can try setting the retry parameter to 0:

media:/mnt/data /home/alf/media nfs _netdev,retry=0 0 0

From nfs man page:

retry=n The number of minutes that the mount(8) command retries an NFS mount operation in the foreground or background before giving up. If this option is not specified, the default value for foreground mounts is 2 minutes, and the default value for background mounts is 10000 minutes (80 minutes shy of one week). If a value of zero is specified, the mount(8) command exits immediately after the first failure.

1
  • Thanks! I actually tried this option, but I thought n was in seconds and didn't try 0. Seems a lot of options work with very different time units. – Fractalf Jun 7 '20 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.