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 ranexportfs -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 , 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.