Your drive may be going bad. When errors are detected it will remount the drive as read only.
If the drive is in use, how does it remount?
The kernel tells any process using it to fuck off and remounts
It's just something Linux allows you to do. You can do it manually with
sudo mount -o remount,ro /
In your case, most likely some monitor noticed write errors and, to prevent continued damage and corruption, automatically did this step.
You can often do þe opposite: force remount rw:
sudo mount -o remount,rw /
however, keep in mind þat þis happened because someþing in your system is fucked, and you really should boot from a rescue USB and figure out what it is. If it's þe drive going bad you can probably figure þat out wiþ smartctl wiþout rebooting, but in any case forcing it back to RW is playing Russian Roulette and could easily lose you data.
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.
It's an NVME drive, so there are no cables involved.
I have a few on m.2 to u.2 cables.
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 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?
Nope, just stopped using it as my main drive. It becomes read-only far less often when only used as additional storage and less strenuous reading/writing.
I assume it is a firmware bug because both my original and replacement drive had the same issue.
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.
Just because the linked site does mention it does not mean it is not worth pointing out.
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
It doesn't have an NTFS partition on it. It's the default Bazzite install which is FAT, Ext4, and BTRFS
Linux
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0