LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Can't mount nfs share from fstab but can mount it manually - help (http://www.linuxquestions.org/questions/linux-networking-3/cant-mount-nfs-share-from-fstab-but-can-mount-it-manually-help-631772/)

Mountain 03-30-2008 06: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:

192.168.100.100 MyServer
Then in /etc/fstab I used this:
Code:

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

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

Code:

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

--- MyServer.hsd1.my.isp.org. 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:

Code:

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

UPDATE:
Code:

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

What does that last line mean?

Mountain 03-30-2008 08:34 PM

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


All times are GMT -5. The time now is 02:29 AM.