Recovering from BTRFS corruption

Hi guys BTRFS scrub is reporting just a couple file / disk corruptions.

This was due to faulty a faulty memory stick so i am now trying to piece things back together.

I am getting errors such as:

Nov 17 11:19:23 Endeavour kernel: BTRFS error (device nvme0n1p7): bdev /dev/nvme0n1p7 errs: wr 0, rd 0, flush 0, corrupt 2255, gen 0
Nov 17 11:19:23 Endeavour kernel: BTRFS error (device nvme0n1p7): unable to fixup (regular) error at logical 265919631360 on dev /dev/nvme0n1p7
Nov 17 11:19:24 Endeavour kernel: BTRFS warning (device nvme0n1p7): checksum error at logical 391730319360 on dev /dev/nvme0n1p7, physical 195067793408, root 256, inode 677652, offset 28672, length 4096, links 1 (path: usr/lib/libglapi.so.0.0.0)

The problem is even if i re-install the corresponding package, and therefore replace the file i still get the error.

Two other file errors detected also seem to be for files which are no longer on the system (core dumps & removed software).

What is the best way to clean this up? Its an otherwise healthy fresh install so i dont want to bork it :slight_smile:

Im guessing this is a metadata issue?

booting off liveCD and running

“btrfs check --repair” fixed some stuff but not these file links

“btrfs rescue chunk-recover” didnt fix it.

Givern that two of these files dont exist any more and one is replaceable via package rebuild (and already has been) ive made the assumption that this is a corrupt checksum tree.

i ran check with the DANGERIOUS option --init-csum-tree

That seem to have worked. No more errors and hopefully it didnt ranksack my otherwise good file-system.

I cba with the effort of the alternative of shrinking partition, adding, moving and then moving back the partitions and so rolled the dice.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.