Error Codes Wiki

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

  1. 1Check kernel messages: dmesg | tail -50 for I/O error details
  2. 2For HDD/SSD: run smartctl -a /dev/sdX to check SMART health data
  3. 3For bad sectors: sudo badblocks -sv /dev/sdX to scan (read-only test)
  4. 4For NFS: remount the share: sudo umount -f /mnt/nfs && sudo mount /mnt/nfs
  5. 5Check filesystem: sudo fsck -y /dev/sdXY (unmount first)

Tags

linuxeioerrno-5io-errordisk-failure

More in Errno

Frequently 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.