Linux errno 5 (EIO) — Input/Output Error
About Linux errno 5 (EIO)
Linux errno 5 (EIO) indicates a low-level input/output error, usually caused by hardware failure or driver issues. This guide covers everything you need to know about this topic, including common causes, step-by-step solutions, and answers to frequently asked questions.
Here are the key things to understand: EIO — generic I/O failure at the device level. Often indicates failing storage hardware. Check dmesg for detailed hardware error messages. Can also occur with NFS or network filesystem issues. Understanding these fundamentals will help you diagnose and resolve this issue more effectively.
The most common reasons this occurs include: Failing hard drive or SSD with bad sectors. SATA/NVMe cable or connector issues. Kernel driver bug for the storage device. NFS server disconnect or timeout. Identifying the root cause is the first step toward finding the right solution.
To resolve this, follow these recommended steps: Check dmesg output for disk error messages. Run SMART diagnostics: smartctl -a /dev/sdX. Run filesystem check: fsck /dev/sdX. Replace the storage device if SMART shows failures. If these steps do not resolve the issue, consider consulting additional resources or a qualified professional.
This article is part of our Linux Error Codes collection on Error Codes Wiki. We provide comprehensive, up-to-date information to help you find solutions quickly.
Quick Answer
Is my disk dying?
EIO often indicates hardware failure — check SMART status immediately and back up data.
Overview
Linux errno 5 (EIO) indicates a low-level input/output error, usually caused by hardware failure or driver issues.
Key Details
- EIO — generic I/O failure at the device level
- Often indicates failing storage hardware
- Check dmesg for detailed hardware error messages
- Can also occur with NFS or network filesystem issues
Common Causes
- Failing hard drive or SSD with bad sectors
- SATA/NVMe cable or connector issues
- Kernel driver bug for the storage device
- NFS server disconnect or timeout
Steps
- 1Check dmesg output for disk error messages
- 2Run SMART diagnostics: smartctl -a /dev/sdX
- 3Run filesystem check: fsck /dev/sdX
- 4Replace the storage device if SMART shows failures