This error even good Linux Admins make from time to time. An NFS client returns Input/output error (often as mount.nfs: Input/output error or I/O errors when reading an already mounted share) when the client cannot talk to the RPC/NFS stack it needs. Here’s the solution(s) that fixed it on CentOS, plus how to check the same pieces on modern RHEL-like systems.
What usually causes it
portmap(CentOS 5) orrpcbind(CentOS 6+) is stopped, so the client cannot resolve NFS-related RPC services.- The
nfs-utilsclient tools and helpers are missing, so mount.nfs or the nfs kernel module helpers are incomplete. - Less often: the server exported the path with options the client rejects, a stale mount after a server reboot, or a firewall dropping RPC traffic.
Prerequisites
- Root on the NFS client.
- The NFS server hostname/IP and export path you are mounting.
1. Check that portmap / rpcbind is running
1) check that portmap start is running:
service portmap start
chkconfig portmap on
Once started try the mount again.
On CentOS 6 and 7 the service is named rpcbind instead of portmap:
service rpcbind start
chkconfig rpcbind on
or on CentOS 7 with systemd:
systemctl enable --now rpcbind
2. Install nfs-utils
2) install nfs-utils:
yum install nfs-utils
That’s it, you should be set, if one of those two does not work, then un-install and re-install nfs-utils:
yum remove nfs-utils
yum install nfs-utils
Then retry the mount:
mount -t nfs server:/export /mnt
Verify
rpcinfo -p localhost
showmount -e server
mount | grep nfs
df -h /mnt
rpcinfo should list portmapper/rpcbind. showmount -e should list the server’s exports (NFSv3). The mount line and df confirm the share is mounted and readable.
Troubleshooting
- Still I/O errors on an existing mount: the server may have rebooted under a hard mount. Unmount with
umount -f /mnt(orumount -lif it is stuck), confirm rpcbind and nfs-utils on the client, then mount again. See Troubleshoot Stuck and Hung NFS Mounts on AlmaLinux 10. - requested NFS version or transport protocol is not supported: different failure — the server is not offering the version/transport you asked for. See requested NFS version or transport protocol is not supported CentOS.
- Firewall on the server: NFSv4 needs the
nfsservice (TCP 2049). NFSv3 also needsrpc-bindandmountd.
AlmaLinux, Rocky Linux and RHEL 8–10
Install the client package with dnf, enable rpcbind, and prefer an explicit NFS version:
dnf install nfs-utils
systemctl enable --now rpcbind
mount -t nfs -o vers=4.2 server:/export /mnt
portmap is gone on these releases; rpcbind replaces it. If you still use NFSv3, also enable rpc-statd and ensure the server’s mountd ports are reachable.
Related guides: Mount NFS Share on CentOS 6 | Setup NFS Server on CentOS 6
