BTRFS errors in dmesg

Hi, I recently made a fresh install of NixOS and have been using on my new computer. But recently, I started seeing these 2 messages in my dmesg

[   15.734778] BTRFS error (device dm-0): tree first key mismatch detected, bytenr=61067755520 parent_transid=138 key expected=(62951559168,168,4611686018427392000) has=(62951559168,168,4096)
[   15.736027] BTRFS error (device dm-0): tree first key mismatch detected, bytenr=61067755520 parent_transid=138 key expected=(62951559168,168,4611686018427392000) has=(62951559168,168,4096)

I have LUKS and tmp enabled with lanzeboote. I have no issues logging in and working with my system, but I am worried that this indicates BTRFS corruption. I am not sure when this message started popping up, but I tried using memory context restore on my B650 motherboard which might have been the issue. I found the system unstable, so I rebooted into bios and disabled it which made everything work fine. I also used Memtest86+ v7.00 for an hour and all the tests passed.

Can someone give me clue on what’s wrong? I tried btrfs check --repair from a boot drive, but that did not fix this message after I logged back in. These are the only messages in my dmesg, the filesystem mounts and works normally

You may have just irreversibly damaged your filesystem. btrfs check --repair can be destructive and should never be run unless instructed by someone who knows what they’re doing.

Anyhow, I’d recommend you to ask on the btrfs mailing list as this isn’t connected to Nix/NixOS in any way.

2 Likes

Thanks, tried that and came to the conclusion that I’d need to reinstall os. Just finished doing that :sweat_smile: