I took ddrescue image of my failed SSD, and put it on the replacement drive. After that I have also resized single btrfs partition, which is topic of this thread. to fill new bigger SSD. This probably wasn't the best idea to do with filesystem that has errors, but that is what I have done. Once system was booting I have used cp /dev/null to hunt down corrupted files, created ddrescue backups of those files and removed originals. I was left with one directory that is impossible to delete, because it forces partition to remount ro, and still lot of checksum erros in btrfs scrub and check utils. btrfs scrubs also aborts prematurely. Finally I have used btrfs check --repair in attempt to repair those errors, but that doesn't seem to make situation any better. It still reports errors, in fact it now reports capital ERRORs and also errror in dmesg right after boot.
Code: Select all
[ 51.908206] BTRFS critical (device dm-0): corrupt leaf: block=385507557376 slot=18 extent bytenr=1234911232 len=16384 invalid tree block info level, have 98 expect [0, 7]
[ 51.908216] BTRFS error (device dm-0): read time tree block corruption detected on logical 385507557376 mirror 1
[ 51.908676] BTRFS critical (device dm-0): corrupt leaf: block=385507557376 slot=18 extent bytenr=1234911232 len=16384 invalid tree block info level, have 98 expect [0, 7]
[ 51.908683] BTRFS error (device dm-0): read time tree block corruption detected on logical 385507557376 mirror 1
What course of action do you recommend? Should I try to fix filesystem or recreate it from scratch and transfer files from backup image (cp, rsync, btrfs send/receive?)?



