mount.nfs: Input/output error When Mounting From CentOS 5.9 to 6.4

Was trying to mount a NFS shared folder on CentOS 6.4 from CentOS 5.9 and found a really tricky problem. I’ve added the /etc/fstab entry, but once I ran mount /my/folder it stuck for 2-3 minutes and came back saying

mount.nfs: Input/output error

Things I’ve Tried

This is all the things I’ve tried with no success:

  • Ensured network connection was ok. I checked the firewall / iptables and made sure the client machine can connect to NFS server
  • Checked my /etc/hosts file, ensured no dodgy entries
  • Double checked /etc/exports and ran exportfs -r on the NFS server
  • Ran showmount -e [host_ip] to check the NFS server really does advertise the shared folders
  • Ran rpcinfo -p [host_ip] to check the version and supporting services are available
  • Rebooting the server many times

Solution

Thanks to this post from linuxquestion.org forum, the solution was to add nolock option to the /etc/fstab file.

10.0.10.10:/my/folder /mnt/nfs/my/folder nfs nolock 0 0

CentOS manual is pretty vague as well on what this option really does, but oh well it seems to do the job for time being

nolock — Disables file locking. This setting is occasionally required when connecting to older NFS servers.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s