Linux EIO (errno 5) — Input/Output Error (Deep Dive)
Errorerrno
Overview
Deep dive into Linux EIO covering disk hardware failures, NFS stale handles, USB device disconnection, and kernel driver I/O failures.
Key Details
- EIO (errno 5) indicates a low-level I/O failure that could not be retried or recovered
- For block devices: often means physical media failure (bad sectors, drive dying)
- For NFS: can indicate a stale file handle or network interruption
- For USB: device was disconnected during I/O operation
- Check dmesg and /var/log/syslog for detailed hardware error messages
Common Causes
- Hard drive or SSD with bad sectors or failing controller
- NFS server disconnected or exported file system unmounted
- USB device physically disconnected during read/write
- RAID array with degraded disk returning errors
- Kernel driver bug causing I/O request to fail
Steps
- 1Check kernel messages: dmesg | tail -50 for I/O error details
- 2For HDD/SSD: run smartctl -a /dev/sdX to check SMART health data
- 3For bad sectors: sudo badblocks -sv /dev/sdX to scan (read-only test)
- 4For NFS: remount the share: sudo umount -f /mnt/nfs && sudo mount /mnt/nfs
- 5Check filesystem: sudo fsck -y /dev/sdXY (unmount first)
Tags
linuxeioerrno-5io-errordisk-failure
More in Errno
linux-errno-1-epermLinux errno 1 (EPERM) — Operation Not Permitted
Warninglinux-errno-2-enoentLinux errno 2 (ENOENT) — No Such File or Directory
Warninglinux-errno-5-eioLinux errno 5 (EIO) — Input/Output Error
Errorlinux-errno-11-eagainLinux errno 11 (EAGAIN) — Resource Temporarily Unavailable
Informationallinux-errno-12-enomemLinux errno 12 (ENOMEM) — Out of Memory
Criticallinux-errno-13-eaccesLinux errno 13 (EACCES) — Permission Denied
WarningFrequently Asked Questions
Often yes for local disks, but for NFS and USB it can be a connectivity issue. Check dmesg for the specific error source.