otrd., 2021. g. 23. febr., plkst. 17:51 — lietotājs Sebastian Roller (<sebastian.rol...@gmail.com>) rakstīja: > [...] > > root@hikitty:~$ install/btrfs-progs-5.9/btrfs check --readonly /dev/sdi1 > Opening filesystem to check... > checksum verify failed on 99593231630336 found 000000B6 wanted 00000000 > checksum verify failed on 124762809384960 found 000000B6 wanted 00000000 > checksum verify failed on 124762809384960 found 000000B6 wanted 00000000 > checksum verify failed on 124762809384960 found 000000B6 wanted 00000000 > bad tree block 124762809384960, bytenr mismatch, want=124762809384960, have=0 > ERROR: failed to read block groups: Input/output error > ERROR: cannot open file system
One possible reason could be that extent tree is corrupted. Right now I'm dealing with such filesystem. I wrote a patch that allows to read-only mount such filesystem (assuming there's no other problems). Currently none of btrfs tools work when extent tree is corrupted, but for `btrfs check` this patch would allow it to go further. Only for data recovery this isn't really that useful. --- a/check/main.c +++ b/check/main.c @@ -10197,7 +10197,7 @@ static int cmd_check(const struct cmd_struct *cmd, int argc, char **argv) int qgroup_report = 0; int qgroups_repaired = 0; int qgroup_verify_ret; - unsigned ctree_flags = OPEN_CTREE_EXCLUSIVE; + unsigned ctree_flags = OPEN_CTREE_EXCLUSIVE | OPEN_CTREE_NO_BLOCK_GROUPS; int force = 0; while(1) {