Network File Services  «Prev  Next»

Lesson 9 Troubleshooting NFS problems
Objective List common NFS problems and resolutions.

Troubleshooting Red Hat NFS Problems

Tracking down NFS problems can be tricky. There are several failure points in the NFS system, ranging from server misconfiguration to network difficulties.
Common Network File System (NFS) problems encountered in Red Hat Linux environments typically revolve around issues such as connectivity, permissions, performance, and configuration. Resolving these issues requires a systematic approach to troubleshooting and a deep understanding of NFS and network fundamentals. Here is an overview of these common problems and their potential resolutions:
  1. Mounting Failures:
    • Cause: Incorrect server IP, wrong export name, network issues, or NFS service not running.
    • Resolution: Verify server IP, export configuration, and ensure NFS services are active. Check `/etc/exports` on the server and use `showmount -e server_ip` to validate.
  2. Permission Denied Errors:
    • Cause: Misconfigured file permissions or export options.
    • Resolution: Ensure correct file permissions on the NFS server. Modify `/etc/exports` to adjust export options like `rw`, `sync`, and root access permissions.
  3. Stale File Handles:
    • Cause: Files are removed on the server while being accessed by the client.
    • Resolution: Remount the NFS share. Ensure file operations are synchronized between client and server.
  4. Slow Performance:
    • Cause: Network congestion, high server load, or suboptimal NFS version.
    • Resolution: Optimize network bandwidth, upgrade to a higher NFS version if applicable, and consider using `async` export option for better performance.
  5. Locking Issues:
    • Cause: Problems with lock management, typically involving the lock daemon.
    • Resolution: Ensure that `rpc.statd` and `rpc.lockd` services are running on both client and server. Configure firewalls to allow necessary NFS and RPC ports.
  6. Unmounting Problems:
    • Cause: Files or directories on the NFS mount are being used.
    • Resolution: Identify and terminate processes using `fuser` or `lsof`, then safely unmount.
  7. Automount Issues:
    • Cause: Incorrect `auto.master` configuration or issues with the automount daemon.
    • Resolution: Review and correct `/etc/auto.master` entries. Restart the `autofs` service.
  8. Firewall Configuration:
    • Cause: Firewall blocking NFS traffic.
    • Resolution: Configure the firewall to allow traffic on NFS ports (2049 for NFS, 111 for portmapper).
  9. Network Instability:
    • Cause: Intermittent network issues affecting NFS communication.
    • Resolution: Diagnose network stability and latency issues. Consider implementing network redundancy.
  10. NFS Version Compatibility:
    • Cause: Mismatched NFS versions between client and server.
    • Resolution: Ensure both client and server support the same NFS version. Preferably, use NFSv4 for its enhanced features
  11. RPC Services Issues:
    • Cause: RPC services not running or misconfigured.
    • Resolution: Ensure services like `rpcbind` are running. Check `/etc/hosts.allow` and `/etc/hosts.deny` for any restrictions.

For effective resolution, it is crucial to have in-depth logs and monitoring tools in place. This enables quick identification of the root cause and implementation of the correct resolution strategy. Additionally, keeping both client and server systems updated and properly configured can prevent many of these issues.

Table listing symptoms, causes, and resolutions for NFS problems in Red Hat Linux

The table below lists symptoms, causes, and resolutions for the most frequent NFS problems.
Symptoms Likely cause Resolution
NFS clients cannot mount your NFS server's exported filesystems NFS isn't running or misconfiguration in /etc/exports Use /etc/rc.d/init.d/nfs status to check that NFS is running. If NFS is running, look through /etc/exports for problems.
Cannot modify a file on the NFS server Insufficient privileges, user or group mismatch, or stale lock file Make sure you have write access to the file and that user and group IDs on both the client and server match. If both of these are OK, you have a stale lock file created by a buggy NFS implementation. Obtain a patch from the vendor.
Slow performance or NFS clients hang indefinitely Network problems Check that the connection between the client and server is up with ping. If the connection is up, check latency with traceroute. It is possible that an intermediate gateway is dropping your NFS packets.
Random crashes of client or server Client and server incompatibilities Check the vendors' known incompatibility list for both the client and server. Upgrade as necessary.

Problem between the NFS Client and NFS Server

For example, overloaded, mis-configured, or malfunctioning switches, firewalls, or networks may cause NFS requests to get dropped or mangled between the NFS Client and NFS Server.
Some specific instances have been:
  1. A damaged security appliance mangling packets between the NFS Client and NFS Server:
  2. The port-channel aka EtherChannel aka bonding configuration on the switch was incorrect:
  3. A second system on the network had duplicated the IP address of the NFS Server
  4. The switch was dropping TCP SYN,ACK packets:
  5. Issue was with a Riverbed WAN optimizer device

SEMrush Software8