Saturday, February 21, 2015

linux - File system keeps becoming read-only

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.

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...