Problem:Installed Archlinux on a USB pen-drive (ext4) about a month ago.
Everything was working fine up until recently. After a while I would not be able to execute commands (except bash built-ins).
$ ls -bash: /usr/bin/ls: Input/output error $ ls -bash: ls: command not found $ bash Bus error
When this happens a reboot usually "fixes" the problem temporarily. Everything would be working again but these errors would come up eventually again. When they do the system becomes unusable and I have to reboot again. This makes it difficult to troubleshoot the issue.
- First backing up all important data
- Booting into a "live usb" and doing
fsckon the partition in question
- Freeing up some disk space on the partition in question
- Plugging in the USB pen-drive to a different USB port and making sure it's plugged in correctly
- Staying logged in as root to try to peek
echo "$(</proc/kmsg)"- doesn't work
dmesg -n errdid produce errors in the VT console eventually but forgot to write them down. Will add them to this post if I see them again and if relevant. I remember it mentioning the journal.
Ideas:I remember having similar problems years back when installing Linux on a USB drive. I remember it having something to do with disk caching and the lifespan of the device. Of course this may be about something different.
I was considering doing `dd if=/dev/sdd of=/dev/null` to see if I get any errors. Haven't done that yet but will and will post results - if you think it's relevant.
What I'd like ideally is to:
- Find out what exactly the problem is
- See if I can still save this storage medium
- Prevent this from happening again in the future with another USB drive.
- Check if there's anything I could do to not have to reboot
Let me know if there's anything else I should try and what the most likely explanation could be for what is happening.
Don't know how relevant this is but I noticed with
iostat that something is constantly trying to write to the drive every few seconds. Looking into this currently. Apparently it's to do with
6114 be/4 root 0.00 B/s 0.00 B/s 0.00 % 69.00 % [kworker/u8:6+events_freezable_power_] 7945 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.11 % [kworker/u8:5-events_freezable_power_] 7207 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.01 % [kworker/u8:1-events_freezable_power_]