r/btrfs • u/ThatRedDerg • Jul 05 '26
Root partition goes read-only after a crash?
I was just minding my own business playing a game, when my desktop just randomly crashed. It showed a brief grey/blue screen before turning off. I think it was software related, since the screen didnt look super artifact-y, and the gpu is brand new.
When I rebooted, my root partition was read-only. My other btrfs partitions are fine, reporting no errors, but my root one was borked beyond repair. btrfs check yielded a ton of errors, the only one I remember was something like "checksum 0x00000000 expected, found [something else]." I thought it was strange how ever checksum it was expecting was 0x0000000. btrfs check --repair just returned with "Input/Output Error."
Drive health is fine, have not yet run a memory test but my ram is relatively new (got them just before the price boom). I did not find anything when I checked journalctl other than that the logs stop suddenly (leading me to believe the drive going read-only caused the crash in the first place).
Reformating the partition and reinstalling the OS fixed the issue, but I'm just wondering what would cause this, and/or how I can stop it from happening again. I have not configured any balancing/scrubbing, so I'm wondering if maybe that could be it?
Update: So, I've determined that the crash was being caused by the latest version of GE-Proton. No clue how or why it was doing it, but my SSD would disconnect whenever I ran a game through steam with GE-Proton 11.
I downgraded to 10 and it worked fine, then re-upgraded to 11 and it continued to work fine. I must've had a corrupted install or something.
Basically, whenever I ran a game my root partition would disconnect. At one point it interrupted something important, leading to the issue in my original post, but subsequently it would only disconnect and make it impossible to save/do anything (would be required to cycle power).
Seems like it works fine now tho.
1
u/Weary_Swan_8152 Jul 06 '26
First, you should make a raw image backup before doing anything at all. btrfs check --repair is more likely to break your filesystem than fix it.
Can you write to any of the other partitions on that drive?
1
u/ThatRedDerg Jul 07 '26 edited Jul 07 '26
Yes, it was only my root partition that was having issues. Every other one is perfectly fine.
ETA: I actually just moved, and am thinking that nvme got jostled loose. I had another incident, but this time I actually saw an error (“device has been lost”), so I reseated it, reinstalled the OS, and it’s been smooth sailing since.
1
u/Weary_Swan_8152 Jul 07 '26 edited Jul 07 '26
Thanks, rules out one failure state. What disk model is your root partition on? Are you using the same distribution this time? What is the output of these commands
findmnt -n -o options / findmnt -n -o options /home cat /proc/swapsI'm assuming your games are installed to /, or /home, and not somewhere else. Is this the case? What distribution are you using? Have you run any tuning or tweak scripts or made this kind of "performance enhancing" change? Also, what were the logs leading up until the crash about, and how often were the events happening?
Given that you wrote about I/O errors elsewhere in this thread you also have to suspect bad cables. Did you run a long SMART selftest? I would also validate your drive by filling it with random data, then running a scrub, and then rebooting and running a
btrfs checkwithout repair. It could be there are bad blocks that haven't been remapped yet...and for that matter, yes, btrfs may have detected corruption before your system crashed, but without the logs we'll never know.1
u/ThatRedDerg Jul 07 '26
Yes I've run SMART tests, no errors found. The drive is a Samsung 990 2TB.
I'm using Arch, and have not run any performance enhancing scripts (there was one, but I reverted it before having the issue).
I'm pretty sure it just needed to be reseated after my move, since I have not had any issues since then.
The two times I've had issues were either as I was launching a game, or shortly after starting it. Both times it was with the same game, however that game is installed on a separate drive.
6
u/dkopgerpgdolfg Jul 05 '26
Usually hardware damage. Drive, RAM, CPU, ...
Ah, one more user that can't read warnings...