I don't know, maybe. This is not a new file system, clearly, it has
half million+ generations.

backup_roots[4]:
    backup 0:
        backup_tree_root:    29360128    gen: 593817    level: 1
        backup_chunk_root:    20971520    gen: 591139    level: 1
        backup_extent_root:    29376512    gen: 593817    level: 1
        backup_fs_root:        132562944    gen: 593815    level: 0
        backup_dev_root:    29409280    gen: 593817    level: 0
        backup_csum_root:    29491200    gen: 593817    level: 0
        backup_total_bytes:    254007050240
        backup_bytes_used:    43532288
        backup_num_devices:    1


    backup 1:
        backup_tree_root:    138821632    gen: 593818    level: 0
        backup_chunk_root:    21020672    gen: 593818    level: 0
        backup_extent_root:    138805248    gen: 593818    level: 0
        backup_fs_root:        132562944    gen: 593815    level: 0
        backup_dev_root:    132841472    gen: 593818    level: 0
        backup_csum_root:    138870784    gen: 593818    level: 0
        backup_total_bytes:    254007050240
        backup_bytes_used:    655360
        backup_num_devices:    1


The old chunk root and tree root might come in handy, from backup0,
which is the generation prior to the one currently set in the super
blocks. The bytes_used vs dev_item.bytes_used is also interesting,
huge difference. So it looks like this was umounted very soon after
you realized what you did.

What do you get for

btrfs restore -l <dev>

Maybe just try this, which is the oldest generation we know about
right now, which is found in backup root 2.

sudo btrfs restore -D -v -t 138788864 /dev/mapper/brick1 .

That's a dry run so the path to save stuff to doesn't matter, so I'm
just using . for that. But what you'll get is a file listing. If
there's nothing listed, then it's a dead end. But if it's listing
everything you want, it's a win. Just point to a proper destination
and remove -D. However, another possibility is that it's a partial -
i.e. it might be a generation in between the cleaner running, so some
stuff is restored but not all of it.

Yeah, maybe there's a way to get an older generation and root with an
older copy of btrfs-progs. I think the current one isn't working very
well...on yet another file system I have that is very new (week) but
has hours of writes on it,

[chris@f25s ~]$ sudo btrfs-find-root /dev/mapper/brick1
Superblock thinks the generation is 5727
Superblock thinks the level is 1
Found tree root at 426847567872 gen 5727 level 1


That's it. So no hang, but only one tree root which is just bogus.
Even the superblock has more information than this. I'm used to seeing
dozens or more.


Chris Murphy
--
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