NFS Troubleshoot: Fixing "Hanging on Mount" Issues

  • Thread starter dduardo
  • Start date
In summary, the conversation is having trouble communicating with the client. The exports file seems to be okay, but the other services might be interfering. The NFS server is able to mount the share locally, but the exports file might matter. The host deny and host accept entries might be causing problems. The nfs-utils might be buggy.
  • #1
dduardo
Staff Emeritus
1,906
3
I have an NFS server which seems to be talking to the client, but it just hangs during the mout process. I can see the two services exchanging data with ethereal. I'm pretty sure exports, hosts.deny, hosts.accept are all right. Anyone have a clue what might be going on?

Btw, I can mount the share locally on the server machine.
 
Computer science news on Phys.org
  • #2
Can you post your exports file?

hosts.deny and hosts.accept should have no effect unless you are using tcpwrappers. The exports file manages access to NFS, however, portmapper is sometimes wrapped in tcpwrappers.

Also, make sure you have portmapper running.

I could be wrong about hosts.* actually mattering, given I haven't touched a Linux system in quite awhile, let alone mess with it's ripped off NFS implementation.
 
Last edited:
  • #3
/etc/exports:
/home/share 192.168.1.192(rw,sync) 192.168.1.191(rw,sync)

/etc/hosts.deny:
portmap:ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL

/etc/hosts.allow
portmap:192.168.1.191, 192.168.1.192
lockd: 192.168.1.191, 192.168.1.192
rquotad: 192.168.1.191, 192.168.1.192
mountd: 192.168.1.191, 192.168.1.192
statd: 192.168.1.191, 192.168.1.192

/etc/fstab

192.168.1.191:/home/share /mnt/share nfs rw,hard,intr 0 0

This is what ethereal is capturing:

0.000000 192.168.1.191 -> 192.168.1.192 SSH Encrypted request packet len=64
0.038870 192.168.1.192 -> 192.168.1.191 TCP ssh > 32907 [ACK] Seq=0 Ack=64 Win=7904 Len=0 TSV=106662 TSER=7584188

bash-2.05b$ /usr/sbin/rpcinfo -p
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 32781 status
100024 1 tcp 32906 status
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100021 1 udp 32782 nlockmgr
100021 3 udp 32782 nlockmgr
100021 4 udp 32782 nlockmgr
100005 1 udp 626 mountd
100005 1 tcp 629 mountd
100005 2 udp 626 mountd
100005 2 tcp 629 mountd
100005 3 udp 626 mountd
100005 3 tcp 629 mountd
 
Last edited:
  • #4
Try mounting it without hard and initr.

As a precautinary, put ALL's in /etc/hosts.allow.

Also, NFS should be logging to a syslog facility. Watch dmesg and /var/log/syslog; they should give some insight into what's going wrong.
 
  • #5
I tried the first two things, but they didn't work

dmesg:

IN-interface1:IN=eth0 OUT= MAC=00:00:00:00:d7:98:00:06:25:04:62:9a:08:00 SRC=192.168.1.192 DST=192.168.1.191 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=3298 DF PROTO=TCP SPT=795 DPT=111 WINDOW=5840 RES=0x00 SYN URGP=0

Syslog:

Dec 20 19:44:01 gentoo1 rpc.mountd: authenticated mount request from 192.168.1.192:829 for /home/share (/home/share)

It looks like my machine is capturing the request, but not doing anything with it.
 
  • #6
dduardo said:
I tried the first two things, but they didn't work

dmesg:

IN-interface1:IN=eth0 OUT= MAC=00:00:00:00:d7:98:00:06:25:04:62:9a:08:00 SRC=192.168.1.192 DST=192.168.1.191 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=3298 DF PROTO=TCP SPT=795 DPT=111 WINDOW=5840 RES=0x00 SYN URGP=0

Syslog:

Dec 20 19:44:01 gentoo1 rpc.mountd: authenticated mount request from 192.168.1.192:829 for /home/share (/home/share)

It looks like my machine is capturing the request, but not doing anything with it.

This might be a long shot, but I don't see nfsd running. I just see nfs, and that's usually the client.

Typically, mountd just captures the RPC requests, and passes them onto nfsd. Because of my unfamiliarity with the Linux NFS implementation, I'm not sure what all mountd does, but search around for nfsd.
 
  • #7
I'm pretty sure I followed the documentation to the letter. My only guess now is that the nfs-utils I'm using is borked. I'm going to try an older version
 
  • #8
O great, the ssh daemon on the other computer died. I guess i'll have to try again tommorow.
 

1. What is NFS?

NFS stands for Network File System, which is a distributed file system protocol that allows users to access files over a network as if they were stored locally on their own computer.

2. What does it mean when NFS hangs on mount?

When NFS hangs on mount, it means that the remote file system is not responding or the connection between the client and the server is experiencing delays. This can prevent the client from accessing the files on the remote server.

3. How do I fix "hanging on mount" issues with NFS?

One way to fix "hanging on mount" issues with NFS is to check the network connections between the client and server. If there are any delays or connectivity issues, they should be resolved. It may also help to increase the timeout values for NFS mounts.

4. Can a firewall cause NFS to hang on mount?

Yes, a firewall can cause NFS to hang on mount if it is blocking the necessary ports for NFS communication. Make sure that the ports used by NFS (2049 by default) are open on both the client and server's firewalls.

5. How can I prevent NFS from hanging on mount in the future?

To prevent NFS from hanging on mount in the future, it is important to regularly monitor and maintain the network connections between the client and server. This includes addressing any network issues and setting appropriate timeout values for NFS mounts. It can also help to implement redundancy measures, such as using multiple NFS servers, to ensure a more stable connection.

Similar threads

  • Computing and Technology
Replies
4
Views
3K
  • STEM Career Guidance
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • Special and General Relativity
Replies
13
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
3K
Back
Top