Your drive may be going bad. When errors are detected it will remount the drive as read only.
post
I had this happen with a few drives. The cause was bad cables to the HDDs causing random errors. Had to try a bunch of different cables until the errors stopped happening.
If the problem is showing up out of the blue with no HW changes or anything, definitely back up any data you want to protect from the computer before you get too far down the road, because the HDD might be legitimately failing.
Check dmesg logs and SMART check the drive.
I had two crucial drives that would go read only, some sort of firmware bug I guess.
Was there a fix?
I had the same happen on the root folder on a SATA SSD. The SSD was dying (don't remember if there was SMART errors, but the dmesg log showed write-errors. I cloned old SSD to a new SSD and haven't seen the problem since. That was years ago.
When there are multiple consecutive write errors, Linux will re-moumt the partition as read-only to protect the data.
(There usually a statement along the lines of "on-error:remount-ro" for the partition in the /etc/fstab file)
Check your drive: https://wiki.archlinux.org/title/S.M.A.R.T.
Yes, but just because SMART does not complain does not mean the drive has issues. If it does, it means there are issues. That should be kept in mind.
Literally explained in the link.
Unless there is an above average drive controller on board, it wouldn't be getting out into read-only and still accessible without triggering an error in online drive checks.
I'm not getting any SMART errors, the reports look good. I'll have to check dmesg if it happens again.
I ran into something similar recently on a Debian NAS. It was something to do with the power management settings on the drive. Tweaked a couple of settings and the problem so far hasn't arisen again 2+ months later.
It's a common occurence if the drive has NTFS filesystem. If that's the case: ntfsfix
all 19 comments