I used btrfs on / and /var.
After first suspending on 2.6.38.1 yesterday (screen was black,
no disk activity, but it respond to Magic SysRq [sync,remount-ro,reboot])
system cannot boot.

A copied system from 3-month-old backup to new disk using ext4 only fs,
so I could have btrfs in a module and here are results of my investigations:

path->slots[0] is 0
and I observed, that normally it should be =1 for root

root-tree.c     line 97, btrfs_find_last_root()
        if (path->slots[0] == 0) {
                ret = 1;
                goto out;
        }

Then find_and_setup_root() returns error:

disk-io.c       line 1026, find_and_setup_root()
        ret = btrfs_find_last_root(tree_root, objectid,
                &root->root_item, &root->root_key);
        if (ret > 0)
                return -ENOENT;

...and so does open_ctree()

disk-io.c       line 1945, open_ctree()
        ret = find_and_setup_root(tree_root, fs_info,
                BTRFS_EXTENT_TREE_OBJECTID, extent_root);
        if (ret)
                goto fail_tree_root;

What can I do now to mount my btrfs?
Here is log after trying to mount:

kernel: device label jroot devid 1 transid 25083 /dev/sdb3
kernel: btrfs: allowing degraded mounts
kernel: parent transid verify failed on 3057614848 wanted 25083 found 25080 kernel: parent transid verify failed on 3057614848 wanted 25083 found 25080 kernel: parent transid verify failed on 3057614848 wanted 25083 found 25080
kernel: btrfs: open_ctree failed

btrfsck from "next" btrfs-progs-unstable:
# ./btrfsck /dev/sdb3
using SB copy 1, bytenr 67108864
parent transid verify failed on 3057614848 wanted 25083 found 25080
parent transid verify failed on 3057614848 wanted 25083 found 25080
parent transid verify failed on 3057614848 wanted 25083 found 25080
btrfsck: disk-io.c:739: open_ctree_fd: Assertion `!(!tree_root->node)' failed.
Aborted

Same with /var, and using -s 0 -s 1.

What can I do to restore my data?
(I only wanted /etc and /var/log...)

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to