Mount NFS file system over a slow and busy network

by Vivek Gite [Last updated: May 21, 2007]

Q. Traffic between my home and office data center encrypted using VPN but sometime my ISP get little slow or network becomes busy. My computer freezouts for few minutes.

So my question is - what optimization options should be used when mounting an exported NFS share over a slow and busy network? I'm using Fedora Core Linux desktop system.

A. Generally you will see Server not responding message or computer just freezouts. You can pass following option while mounting remote shared/exported NFS server:

  1. soft: This option allows the kernel to time out if the nfs server is not responding for some time. The time can be specified with timeo=time. This option might be useful if your nfs server sometimes doesn’t respond or will be rebooted while some process tries to get a file from the server.
  2. timeo N: This timeout value is expressed in tenths of a second
  3. retrans : The number of timeouts allowed before the client gives up and displays the Server not responding message. The mount fails soon after.
  4. proto tcp/udp: The protocol (Either TCP or UDP) used when attempting to mount the server.

For example:
# mount -t nfs -o soft,timeo=900,retrans=3,vers=3, proto=tcp remotenfsserver:/home/data /mnt/nfs-mnt-point

Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our daily email newsletter to make sure you don't miss a single tip/tricks. Subscribe to our weekly newsletter here!

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post: Linux turn on kernel preemption

Next post: How can I play mpegs on Linux?