Fixing slow or broken NFS mounting issues

First the easy stuff — Make sure a firewall rule isn’t blocking NFS. Things like this are easily hidden and overlooked!

# iptables -n -L
Chain INPUT (policy DROP)
target prot opt source destination
DROP all — 0.0.0.0/0 255.255.255.255
DROP all — 0.0.0.0/0 192.168.255.255
DROP all — 0.0.0.0/0 192.168.1.255
DROP all — 0.0.0.0/0 10.255.255.255
DROP all — 0.0.0.0/0 169.254.255.255
ACCEPT all — 0.0.0.0/0 0.0.0.0/0
ACCEPT icmp — 0.0.0.0/0 0.0.0.0/0 limit: avg 10/sec burst 5

Check NFS Services

Make sure nfslock and rpcbind are running. I’ve had an issue where a client won’t start nfslock on bootup, no matter what. I may just need to change the precedence of the startup scripts to fix that.

# /etc/init.d/nfslock restart
Stopping NFS locking: [FAILED]
Stopping NFS statd: [ OK ]
Starting NFS statd: [ OK ]

# /etc/init.d/rpcbind status
rpcbind (pid 15871) is running…

If NFS is running on the server and clients _can_ mount, but it’s just really slow, then things get a little hairly. You can’t just look for a problem on a client or a fix a misconfigured server. You’ll have to look at the whole ball of wax…

container

MTU size mismatch

Check the MTU size for the interface the nfs share uses with the “netstat -i” command on the client and server. If they are different, try setting the MTU size the same for both. MTU is typically 1500 (Between 1500-9000 are Jumbo Frames). Find out if there are any routers between the server and client that may be fragmenting the packets as they surf the network segments. If you have tracepath available, try “tracepath -n” between client and server to see intermediate MTU sizes. Try giving both ends a smaller MTU and rsize/wsize on the client. Use something that fits within the smallest overall MTU size.

# netstat -i
Kernel Interface table
Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR
eth0 1500 0 3195315 0 0 0 1329851 0
lo 16436 0 578 0 0 0 578 0
vboxnet0 1500 0 0 0 0 0 27834 0

Fragmentation Issue

If MTU mismatch doesn’t seem to be a problem, try going the other way and increasing the MTU size. Try changing from the 1500 byte default MTU to 9000 bytes in an attempt to avoid fragmentation.

Check for Trasmit/Receive Errors

Check for TX-ERR and RX-ERR with the “netstat -i” command. If you see don’t see zero for both, the transmit queue size may not be big enough for the interface on the other end.

Network Routing Issues

Use the traceroute command to look for unexpected routing hops or delays.

shipping container

Why NFSv4 is much better

Leased Locking

This allows local caching (similar to CIFS) where one client can modify a file locally and does not need to communicate changes to the server unless another client asks to access the same file.

Streamlining

A client can combine several NFS operations into a single RPC request. RPC over TCP stream transport for reliability in addition to supporting datagram transport.

Security

Kerberos 5, SPKM3, new API with room for future improvements.

Posted by admica   @   9 November 2009

Related Posts

0 Comments

No comments yet. Be the first to leave a comment !
Leave a Comment

Name

Email

Website

Previous Post
« Sharing an Internet Connection in Linux is easy
Next Post
Speed up your OLPC XO laptop significantly without tweaking »
Powered by Wordpress   |   Lunated designed by ZenVerse