In the last month or so, one of my external hard drives has stopped working properly with my Raspberry Pi. It works for a while, then it stops working randomly.
lson the drive's folder and it gives me
ls: reading directory .: Input/output error.
So I tried
dmesg | tailand I got a series of
Buffer I/O error on dev sda1, logical block XXXXXX [this is different each time], async page read
The disk works again if I reboot the Pi (even without physically turning it off and on).
I assumed it was a drive failure, so I bought a new one and copied the data across from a backup I have. However, the new one also gives the same error. I then thought it might be the Pi itself (Pi 1 Model B), so I swapped it with another Raspberry Pi I have (swapped the memory cards around). But I still got the same error.
I then tried reinstalling Raspbian from scratch and reinstalling all my programs (Transmission, minidlna, Samba) but I still get the problem.
There is another drive connected (to which I run backups of my computer's HDD and the other disk on the RPi - or I used to until it started playing up) but I've had no problems with it at all.
Both drives are powered by their own external power supplies.
I really don't understand why this keeps happening. If it were a hardware problem, the old disk wouldn't work in Windows (which it does, and having checked it with
chkdsk it gives no errors) and the new disk should work on the RPi (which it doesn't properly).
Both drives are NTFS and run with