EIO
Linux / POSIXERRORCriticalHardwareHIGH confidence

Input/Output Error

Production Risk

EIO on a production disk requires immediate attention. Activate failover, back up data, and replace the drive.

What this means

A hardware-level I/O error occurred during a read or write operation. This typically indicates physical disk failure, bad sectors, or a failing storage device. Data integrity cannot be guaranteed after this error.

Why it happens
  1. 1The storage device has bad sectors that cannot be read or written.
  2. 2The disk is physically failing or the SATA/NVMe cable is loose.
  3. 3A USB drive was unplugged while a write was in progress.
  4. 4Filesystem corruption caused the kernel to reject an I/O operation.
How to reproduce

Reading from a disk with failing sectors.

trigger — this will error
trigger — this will error
$ dd if=/dev/sda of=/dev/null bs=512
dd: error reading '/dev/sda': Input/output error

expected output

dd: error reading '/dev/sda': Input/output error
$ dmesg | tail
[ 1234.567] Buffer I/O error on dev sda, logical block 0

Fix

Check disk health and run filesystem repair

WHEN When EIO appears on a mounted filesystem

Check disk health and run filesystem repair
# Check SMART status
sudo smartctl -a /dev/sda

# After unmounting, run filesystem check
sudo umount /dev/sda1
sudo fsck -f /dev/sda1

Why this works

smartctl reports disk health metrics that indicate whether the drive is failing. fsck repairs filesystem inconsistencies caused by I/O errors.

What not to do

Continue writing to a disk reporting EIO errors

I/O errors indicate physical media problems. Continued writes may accelerate data loss. Back up immediately.

Sources
Official documentation ↗

Linux Programmer Manual errno(3)

smartmontools

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All Linux / POSIX errors