Hostxpeed
Login Get Started →
Troubleshooting

Fix "Input/Output Error"

4 min read
26 views
Jun 10, 2026

Understanding the Error

Input/output error
ls: cannot access file: Input/output error

This usually indicates a serious disk problem.

Check Disk Health Immediately

# Check disk errors in dmesg
sudo dmesg | tail -50 | grep -i "i/o|error|failed"

# SMART status
sudo smartctl -a /dev/sda

# Check for bad blocks
sudo badblocks -v /dev/sda

Backup Data Immediately

I/O errors often precede disk failure:

# Copy critical data
rsync -av /important/data /backup/location

# Or use dd with noerror option
sudo dd if=/dev/sda of=/backup/disk.img bs=4M conv=noerror,sync

Fix 1: Force Filesystem Check

# Unmount if possible
sudo umount /dev/sda1
sudo fsck -y /dev/sda1

# For root, schedule on reboot
sudo touch /forcefsck
sudo reboot

Fix 2: Remount as Read-Only

sudo mount -o remount,ro /mountpoint

This allows data copy while preventing further damage.

Fix 3: Recover Data from Bad Blocks

# Using ddrescue
sudo apt install gddrescue -y
sudo ddrescue -f /dev/sda /backup/disk.img /backup/mapfile

For VPS - Contact Hostxpeed

I/O errors on VPS usually mean underlying host disk issues:

  • Open support ticket immediately
  • Provide dmesg output
  • Request disk replacement or VPS migration

🔴 I/O errors = potential data loss. Backup NOW before doing anything else.

Was this article helpful?