1

After working for a while, my filesystem (EXT4) becomes read-only. I then use my live USB to boot into live mode and I run fsck on the corrupted partition (and others too, to be safe). I run fsck -y and it does fix all errors on the problematic partition. When I run fsck, again, all partitions are reported as clean.

Then I reboot normally (not live USB) into my system; I run a few touch abc commands at different locations, to test and it is able to write to disk. After a while however, it again becomes read-only.

I've repeated this entire process 4-5 times (fsck-from-live-usb --> boot-normally --> becomes-read-only --> fsck-from-live-usb), and I don't know the cause of this problem.

dmesg shows the following kind of errors:

blk_update_request: I/O error, dev sdb, sector 2521582056

tag#28 FAILED Result: hostbyte=DID_SOFT_ERROR driverbyte=DRIVER_OK

Is there a way to fix this? I'm unable to work on my system. It doesn't look like a hardware problem, since fsck fixes everything and smartctl also reports the drive to be okay, no errors.

Thanks.

2 Answers2

3

While SMART reports all OK, the disk may be bad anyway, you should try to:

  • perform a SMART test with smartctl -t long /dev/sdb, see for example the Arch wiki
  • check the disk for badblocks with badblocks -s, for other ways to do it (some destructive) see (again) the Arch wiki

It may also be a problem with the SATA controller or with the bus, but first you should check the disk (maybe from another machine if you are not sure about the controller).

2

This is most likely a bad block. While my company has a rule that any such hard drive should be discarded immediately, we, home users, often try to salvage as much as we can. The tool of choice is HDD Regenerator (non-destructive), but it's paid software. If you want to do it for free, you can use HDD Low Level Format. Old versions are free. This will require a complete backup and restore. The programs I mentioned work independently of the filesystem. HDD LLF runs on WinXP or 2003 directly, whereas HDD Regenerator creates a bootable USB drive, but is also available online as a Linux initrd floppy image used with memdisk.

Zdenek
  • 275