2

After changing a BCache cache device, I was unable to mount my BTRFS filesystem without the "usebackuproot" option; I suspect that there is corruption without any disk failures. I've tried recreating the previous caching setup but it doesn't seem to help.

So the question is, what now? Both btrfs rescue chunk-recover and btrfs check failed, but with the "usebackuproot" option I can mount it r/w, the data seems fine, and btrfs rescue super-recover reports no issues. I'm currently performing a scrub operation but it will take several more hours.

Can I trust the data stored on that filesystem? I made a read-only snapshot shortly before the corruption occurred, but still within the same filesystem; can I trust that? Will btrfs scrub or any other operation truly check whether any of my files are damaged? Should I just add "usebackuproot" to my /etc/fstab (and update-initramfs) and call it a day?

ATLief
  • 428
  • 4
  • 15

1 Answers1

1

I don't know if this will work for everyone, but I saved my filesystem with the following steps*:

  1. Mount the filesystem with mount -o usebackuproot
  2. Scrub the mounted filesystem with btrfs scrub
  3. Unmount (or remount as ro) the filesystem and run btrfs check --mode=lowmem

*These steps assume that you're unable to mount the filesystem normally and that btrfs check has failed. Otherwise, try that first.

†If this step fails, try running btrfs rescue super-recover, and if that alone doesn't fix it, btrfs rescue chunk-recover.

‡This command will not fix your file systems if problems are found, but it's otherwise very memory intensive and will be killed by the kernel if run in a live image. If problems are found, make or use a separate installation to run btrfs check --repair.

ATLief
  • 428
  • 4
  • 15