Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 03-30-2008, 06:38 PM   #1
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Rep: Reputation: 41
Arrow 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?
Old 03-30-2008, 08:34 PM   #2
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Original Poster
Rep: Reputation: 41
do not use leading "//" when mounting with NFS.
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS mount in /etc/fstab ? cozye Linux - General 3 09-12-2014 03:48 PM
fstab entry does not mount nfs share nanbudh Linux - Networking 13 06-07-2012 02:05 PM
NFS mount of smb mount of windows share: permission denied problem :( Bagatur Linux - Networking 4 07-07-2009 11:34 AM
FSTAB: My Win Share Wont Mount @ Boot, but will when I sudo mount -a...please help! TruANTOlogy Ubuntu 8 06-20-2006 08:00 AM
how do I mount with nfs in fstab? Falafel Linux - Networking 1 11-13-2003 12:56 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:12 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration