-   Linux - Networking (
-   -   Can't mount nfs share from fstab but can mount it manually - help (

Mountain 03-30-2008 07:38 PM

Can't mount nfs share from fstab but can mount it manually - help
Can anyone elablorate on the requirement for mounting NFS shares in fstab?

I edited /etc/hosts and added a line for the ip address and hostname of my server like this:
Code: MyServer
Then in /etc/fstab I used this:

//MyServer:/Documents /home/myuser/Documents nfs rw,hard,intr 0 0
The results is this error:

$ sudo mount -a -t nfs
mount.nfs: can't get address for //MyServer


$ ping MyServer
PING ( 56(84) bytes of data.
64 bytes from ( icmp_seq=1 ttl=128 time=0.081 ms
64 bytes from ( icmp_seq=2 ttl=128 time=0.080 ms
64 bytes from ( icmp_seq=3 ttl=128 time=0.079 ms
64 bytes from ( icmp_seq=4 ttl=128 time=0.114 ms

--- ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2997ms
rtt min/avg/max/mdev = 0.079/0.088/0.114/0.017 ms

What am I missing?

BTW, I forgot to mention, mounting manually works fine:


$ sudo mount -t nfs -vvv /home/myuser/Documents
mount: fstab path: "/etc/fstab"
mount: lock path:  "/etc/mtab~"
mount: temp path:  "/etc/mtab.tmp"
mount: spec:  ""
mount: node:  "/home/myuser/Documents"
mount: types: "nfs"
mount: opts:  "(null)"
mount: external mount: argv[0] = "/sbin/mount.nfs"
mount: external mount: argv[1] = ""
mount: external mount: argv[2] = "/home/myuser/Documents"
mount: external mount: argv[3] = "-v"
mount: external mount: argv[4] = "-o"
mount: external mount: argv[5] = "rw"
mount.nfs: trying prog 100003 vers 3 prot TCP port 2049
mount.nfs: trying prog 100005 vers 3 prot UDP port 1048 on /home/myuser/Documents type nfs (rw)


$ nslookup
** server can't find MyServer: NXDOMAIN

What does that last line mean?

Mountain 03-30-2008 09:34 PM

do not use leading "//" when mounting with NFS.

All times are GMT -5. The time now is 04:43 AM.