0

as far as I recall the system was doing sone heavy io on a btrfs partition, and I pulled the power. Next time the partition is unmountable at all, also in readonly mode.

I recovered important data by doing btrfs recover -isS /another/device/. Now I tried to recover it and make it mountable. So far I tried zero-log, clear v1, v2 cache, chunk-recover. I got operation not permitted error on btrfs check, then I did init-extent-tree. Also super recover says all supers are ok.

Currently btrfs repair output is:

$sudo btrfs check --repair /dev/nvme0n1p1

enabling repair mode
WARNING:

Do not use --repair unless you are advised to do so by a developer
or an experienced user, and then only after having accepted that no
fsck can successfully repair all types of filesystem corruption. Eg.
some software or hardware bugs can fatally damage a volume.
The operation will start in 10 seconds.
Use Ctrl-C to stop it.
10 9 8 7 6 5 4 3 2 1
Starting repair.
Opening filesystem to check...
parent transid verify failed on 1720303616 wanted 53800 found 53817
parent transid verify failed on 1720303616 wanted 53800 found 53817
Ignoring transid failure
Checking filesystem on /dev/nvme0n1p1
UUID: <UUID>
[1/7] checking root items
Error: could not find extent items for root 383
ERROR: failed to repair root items: No such file or directory 

And btrfs check:

$sudo btrfs check  /dev/nvme0n1p1

Opening filesystem to check...
parent transid verify failed on 1720303616 wanted 53800 found 53817
parent transid verify failed on 1720303616 wanted 53800 found 53817
Ignoring transid failure
Checking filesystem on /dev/nvme0n1p1
UUID: <UUID>
[1/7] checking root items
Error: could not find extent items for root 383
ERROR: failed to repair root items: No such file or directory
[2/7] checking extents
parent transid verify failed on 1095778304 wanted 18619 found 53819
parent transid verify failed on 1095778304 wanted 18619 found 53819
Ignoring transid failure
bad block 1095778304
ERROR: errors found in extent allocation tree or chunk allocation
[3/7] checking free space cache
cache and super generation don't match, space cache will be invalidated
[4/7] checking fs roots
root 5 root dir 256 not found
root 383 root dir 256 not found
root 384 root dir 256 not found
root 405 root dir 256 not found
root 406 root dir 256 not found
root 473 root dir 256 not found
root 474 root dir 256 not found
root 574 root dir 256 not found
root 575 root dir 256 not found
root 578 root dir 256 not found
root 579 root dir 256 not found
root 660 root dir 256 not found
root 661 root dir 256 not found
root 702 root dir 256 not found
root 703 root dir 256 not found
root 707 root dir 256 not found
root 708 root dir 256 not found
root 710 root dir 256 not found
root 711 root dir 256 not found
root 821 root dir 256 not found
root 822 root dir 256 not found
ERROR: errors found in fs roots
found 24297369600 bytes used, error(s) found
total csum bytes: 1865956
total tree bytes: 583106560
total fs tree bytes: 579813376
total extent tree bytes: 16384
btree space waste bytes: 135485855
file data blocks allocated: 42269179904
referenced 39581749248

Any kind of help/insight/comment is hugely appreciated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.