4

I am having trouble getting my nfs to mount on boot. I am running Lubuntu 12.04 and mounting from a NAS (Synology-if it matters). I should add that am very new to using Lubuntu or any Linux distribution.

To mount on boot I tried to add the following to /etc/fstab:

192.168.2.15:/volume1/Family /home/john/nfs-Family nfs rw,async,hard 0 0

No luck when the computer mounts, the nfs file doesn't mount.

I should add that when I use the mount command the nfs mounts just fine. This is the command I use:

sudo mount 192.168.2.150:/volume1/Family /home/john/nfs-Family

Any advice would be appreciated.

2
  • 1
    Add auto the list of options (rw,asy...), that should do it
    – Tom Regner
    Sep 19, 2012 at 6:22
  • have you tried checking to see if you client nfs daemon is running chkconfig netfs --list?
    – user530006
    Apr 13, 2016 at 16:02

4 Answers 4

6

This question is a bit old but I thought I might share what solved this problem for me. I had this same issue after following the 12.04 server guide.

Everything has worked well since I changed my /etc/fstab entry options to include nfsvers=3 per comment #6 in this bug report. My current fstab entry (working on three clients) is as below.

192.168.1.0:/backup /home nfs nfsvers=3,hard,intr,auto 0 0
1
  • I've tried so many combinations and nothing worked. I just tried what you suggested and it finally works. Thank you! Feb 22, 2016 at 15:42
3

It might be because the IP address of the NFS server in your fstab file is different from the one you use via CLI...

2

I had the same problem on a few servers since upgrading to Ubuntu 12.04. nfsvers=3 didn't resolve the issue for me. Adding

mount -a

to /etc/rc.local did though.

3
  • didn't help here neither.
    – nerdoc
    Oct 2, 2017 at 20:04
  • What helped, was using the IP address instead of the hostname in fstab. a cat /var/log/syslog|grep nfs told me: mount[868]: mount.nfs: Failed to resolve server kerberos: Temporary failure in name resolution.
    – nerdoc
    Oct 2, 2017 at 20:55
  • or, as alternative, put the hostname in the /etc/hosts file, so it is found easily before DNS resolution is set up.
    – nerdoc
    Oct 2, 2017 at 21:02
0

I solved same problem using x-systemd.automount. So my line in /etc/fstab looks like this:

10.4.111.123:/var/disk/auto_backup/backup /var/disk/auto_backup/backup nfs _netdev,noauto,x-systemd.automount,x-systemd.mount-timeout=600,timeo=14 0 0

(ofcourse there are some TABs instead of spaces in it in some places)

Note:

With this parameters nfs mount point will not appear in the response from mount automatically after OS starts. It will appear in the response from mount only after first access attempt (e.g. when some service/application will try to open that path or when user themself opened mounted folder in some file manager)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .