I/O error, dev sda, sector xxxxxxxxxx
Solution 1:
Download gsmartcontrol
by typing in sudo apt-get install gsmartcontrol
Using gsmartcontrol
:
- run a
short self-test
; - if it completes with no error, then run an
extended self-test
.
If this one is fine, too, then there is probably no reason to panic. If however the tests detect some bad blocks, then you'll possibly need to make a backup using ddrescue
ASAP, and then attempt to understand what is wrong with your hard-drive. It may be failing, or there may be just a handful of irrelevant bad sectors.
See also:
- How to repair a corrupted HFS+ partition from a damaged hard-disk?
- Does my hard-drive have bad sectors or not?
UPDATE:
Given that only a handful of bad sectors seem to be present, you could try to tell the FS which ones it should avoid using fsck.ext3 -c
. But do read man fsck.ext3
(assuming that this is your FS) before using it.
See:
- How to view bad blocks on mounted ext3 filesystem?
Solution 2:
Looks like you disk is failing bad, I would backup my data as soon as possible and replace the failing disk.
Solution 3:
I had a similar problem recently and smart reported 9 bad blocks. I booted from live media and then I repaired the ext4 filesystem with e2fsck -c /dev/SDx
where SDx was the drive in question (sda in my case). which resulted in several short reads which I ignored and forced rewrites on and found and repaired 5 inodes with multiply-claimed blocks.
If the drive contains critical data you should of course utilize the correct strategy to back up the data before doing anything else. If not as in my case, read on. dmesg
reported almost twice as many bad sectors as were found by SMART, so I then ran e2fsck -cc /dev/SDx
where SDx was the drive in question in order to perform a non-destructive read/write test. This was a clearly time consuming process, however as my goal was just to squeeze a few more hours out of what is for all intents and purposes a "scratch drive" used for experimentation with no critical data on it, while I waited for the replacement drive to be delivered, I felt it might be worth the time. An hour later at 15% complete on a terabyte drive I wasn't so certain but as the replacement was 3 days away, I persevered. In the end all the bad sectors were added to the bad block inode list which prevents them from being allocated to a file or directory.