On 2017年12月11日 05:16, Benjamin Beichler wrote: > The patch let the chunk-recover be successful. But I'm no lucky man, > the recovered chunk tree does not work or other metadata is also > broken. > > Mounting the system is not successful (dmesg): > BTRFS critical (device dm-0): corrupt node, invalid item slot: > block=16384, root=1, slot=0 > BTRFS error (device dm-0): failed to read chunk root > BTRFS error (device dm-0): open_ctree failed
For this error, you could apply this diff to by-pass it: ------ diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c index ce4ed6ec8f39..355220e21c2e 100644 --- a/fs/btrfs/tree-checker.c +++ b/fs/btrfs/tree-checker.c @@ -413,12 +413,6 @@ int btrfs_check_node(struct btrfs_root *root, struct extent_buffer *node) btrfs_node_key_to_cpu(node, &key, slot); btrfs_node_key_to_cpu(node, &next_key, slot + 1); - if (!bytenr) { - generic_err(root, node, slot, - "invalid NULL node pointer"); - ret = -EUCLEAN; - goto out; - } if (!IS_ALIGNED(bytenr, root->fs_info->sectorsize)) { generic_err(root, node, slot, "unaligned pointer, have %llu should be aligned to %u", ------ Thanks, Qu > > Therefore I tried a btrfs check --repair, this time without error: > https://gist.github.com/anonymous/5cf7ad9e187032d2c94db4f91bb62c24 > > Then I tried btrfs check --init-extent-tree and this produces much > output. I put the beginning into here: > https://gist.github.com/anonymous/70e2482646a8235ee2327105d920dadd > From a fast view, the messages keep to be similar to the last of the > gist, but the messages in the beginning are not repeating. If it helps > I have complete compressed log. > > Then I tried a btrfs recover to get files, but for many files (also > improtant data, but I filtered the output) I get outputs like in: > https://gist.github.com/anonymous/1cc7f7ab5af33e76d0bf80960bb300eb > > Any new suggestions? >
signature.asc
Description: OpenPGP digital signature