It may aid discussion were you to tell us what type of hard drive and "connectivity" it has (from its age I'm guessing "spinning rust" and USB to SATA)Note: This thread is not about the often-quoted phenomenon of the SD card going read-only (when it is almost worn out and about to be discarded). This is about hard disks.
I have a rootfs on hard drive (Pi) system that has been running 24x7 for about 10 years. Sometime within the last year or two the hard drive started failing. I've been able to keep it running since then - it crashes every so often, I fsck it and get it working again. It has been a research project of mine to see how long I could keep it going. Note that I get lots of errors in "kern.log" - telling me that the (ext4 formatted, /dev/root) hard drive failed one way or another - but, like I said, it has kept going despite the errors.
Anyway, a day or so ago, after several weeks of uptime, the hard drive suddenly became read-only. The machine didn't crash; it was still running fine, except that any attempt to write to the rootfs fails with error msg "Read only file system". And, in fact, "grep /dev/root /proc/mounts" shows it as read-only ("ro," is in there).
At which point I decided my research project was over. The machine will be replaced. Yes, I have backups.
Note that you can't really have a system if /dev/root is read-only...
But my question is: How does this happen? Is it a function of the hard disk hardware? Or of "ext4" filesystems?
Or something else?
Again, note that I'm not asking for help with fixing things. It will be replaced. But I'm curious about the underlying causes... I'd like a discussion of that.
Trev.
Statistics: Posted by FTrevorGowen — Tue Jul 23, 2024 4:50 pm