UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
In order to get another machine to respond to your NFS mount request, that machine must be running a daemon named nfsd. On many systems, this is not started by default, so unless you have made a change to the default configuration for this daemon, it is probably not running.
To find out, on the target machine, do this:
Code:
#netstat -atnp
Check that the daemon rpcbind is listening on TCP port 111. Then check that nfs daemon threads are running:
Code:
#ps aux|grep nfsd
There should be several lines indicating that nfs daemon threads are running (in the kernel).
If these are not running, you have found your problem. Start them up:
Code:
#/etc/init.d/nfs start
and then do whatever configuration your machine supports to make nfs start up on boot. This might be a graphical UI to configure services, or it might be a command-line sequence. My preference is to use the command-line chkconfig style of daemon control, but then I am an unreconstructed old codger.
If these services are already running, you should check the file /etc/exports on the target machine to make sure that it is willing to offer the part of the file system you are looking for as an NFS export. If you change the contents of this file, remember to let the system know about it:
In order to get another machine to respond to your NFS mount request, that machine must be running a daemon named nfsd. On many systems, this is not started by default, so unless you have made a change to the default configuration for this daemon, it is probably not running.
To find out, on the target machine, do this:
Code:
#netstat -atnp
Check that the daemon rpcbind is listening on TCP port 111. Then check that nfs daemon threads are running:
Code:
#ps aux|grep nfsd
There should be several lines indicating that nfs daemon threads are running (in the kernel).
If these are not running, you have found your problem. Start them up:
Code:
#/etc/init.d/nfs start
and then do whatever configuration your machine supports to make nfs start up on boot. This might be a graphical UI to configure services, or it might be a command-line sequence. My preference is to use the command-line chkconfig style of daemon control, but then I am an unreconstructed old codger.
If these services are already running, you should check the file /etc/exports on the target machine to make sure that it is willing to offer the part of the file system you are looking for as an NFS export. If you change the contents of this file, remember to let the system know about it:
Code:
#exportfs -a
Thanks you so much for taking the time to reply with such detail!
I guess the next things I would look at are these:
1. Is mountd running on your client machine? (It may be called rpc.mountd).
2. Are there any complaints in the syslog (probably /var/log/messages)?
If mountd is running, and there are no relevant complaints, I guess that the next step might be to try to trace the interaction using tcpdump, so that we can see where the transaction breaks down. In case you are not familiar with this program, it will trap selected IP packets and report them for you. In this case, I would first set it up on the client machine
Code:
# tcpdump -nn -xX -s 256 host 10.252.99.223
When you attempt the mount, the result should be a sequence of packet exchanges between your client and the server. If, as I guess, there is only one packet trapped, then go to the server, and repeat the experiment there, to see what the server is actually seeing (of course, you will have to change the address in the tcpdump command to trap interactions with the client). It is possible that the packets are not actually going where you expect them to go, and that the server is not seeing them. This would cause the timeout for certain.
I use NFS between my Desktop and Laptop as my server. Both being on the same LAN. On the server there must be an /etc/exports with the following. Replace the fields in {} with your information. In my example I'm giving access to the entire home folder tree. This scheme works with any mix of 8.04 and 8.10. There can be multiple entries giving more clients permission.
/home/{Laptop user} {Desktop hostname}.local(rw)
This allows the Desktop to access the home folder of the laptop. Prior to Ubuntu 8.04 you need to run "sudo exportfs -rv" for the system to read /etc/exports. New versions do this for you at boot.
On the Desktop create a folder to mount to. In my case I placed that folder in my home folder.
On the Desktop side I run
sudo mount {Laptop hostname}.local:/home/{Laptop user} /home/{Desktop user}/{folder to mount to}
To un-mount I run
sudo umount {Laptop hostname}.local:/home/{Laptop user} /home/{Desktop user}/{folder to mount to}
You can extrapolate what to do from this working example. I chose not to use fstab to mount and wrote a couple of bash scripts that supply the parameters to the mount and umount commands.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.