[ 404.944029] kernel: BTRFS info (device sdb4): bdev /dev/sdb4 errs: wr 0, rd 0, flush 0, corrupt 2, gen 0
So at some point the file system encountered a checksum mismatch twice, hence the corrupt 2. These statistics are counters. We donāt know if itās the same corruption encountered twice, or different mismatches each encountered twice. Itās not a lot to go on but it does suggest an earlier problem of some kind, and it might have been logged.
Itās probably safe to run the file system read-write, if it encounters the block with the bad (corrupt) extent item, the file system is going to bail out and go read-only again to avoid any more confusion getting onto the drive. I would take the opportunity to freshen backups of anything important, just in case things get worse. Itās probably bad RAM but this is so far unconfirmed, so better safe than sorry.
Test the RAM over the weekend, see if any errors are reported.
And at some point it might be interesting to see the result from the following command (mount sdb4 to /mnt first, either normally or with -o ro
option if you prefer to keep it mounted read-only for now):
journalctl -D /mnt/root/var/log/journal/$machineid --since=-10d -o short-monotonic --no-hostname |grep "Linux version\| ata\|Btrfs\|BTRFS\|] hd\| scsi\| sd\| sdhci\| mmc\| nvme\| usb\| vd> dmesg1.txt
$machineid = this is a directory thatās named with a UUID created during initial installation by systemd to uniquely identify this machine - itās just a random number and itās the only directory in journal/
directory. You can hit [TAB] key after journal/
and bash will autocomplete the name of the directory, i.e. you are not literally typing in $machineid
So this will look for very specific kernel error messages over the past 10 days. Maybe thereās some device error or other btrfs error that we can learn more about what happened. NOTE: If you have done a btrfs scrub
in the past 10 days, and if there were any corrupt files found, the entire path to that file will be included in the text file resulting from the command. Itās a potential privacy leak. If there is such a path to file - you can just delete the file name from the filel - keep the rest of that line intact though.