lv with btrfs corrupt - some tips please

i have a corrupt btrfs in which my / resides. I can’t mount it anymore. System does not boot, it resides in a very limited shell. This is my first corrupt linux filesystem, i was lucky all the years doing system administration :-)) So i’m a bit nervous and don’t know exactly what to do. Who has experience with corrupt btrfs ? Shall i try to repair with the SLES installation cd or prefer a knoppix ? Or from this limited shell ?

Thanks for any tip.


If you boot from the install medium in rescue mode and look at the following commands;

btrfs rescue --help

usage: btrfs rescue <command> [options] <path>

    btrfs rescue chunk-recover [options] <device>
        Recover the chunk tree by scanning the devices one by one.
    btrfs rescue super-recover [options] <device>
        Recover bad superblocks from good copies
    btrfs rescue zero-log <device>
        Clear the tree log. Usable if it's corrupted and prevents mount.

toolbox for specific rescue operations

btrfs check --help

usage: btrfs check [options] <device>

    Check structural inegrity of a filesystem (unmounted).

    Check structural inegrity of an unmounted filesystem. Verify internal
    trees' consistency and item connectivity. In the repair mode try to
    fix the problems found.
    WARNING: the repair mode is considered dangerous

    -s|--super <superblock>     use this superblock copy
    -b|--backup                 use the first valid backup root copy
    --repair                    try to repair the filesystem
    --readonly                  run in read-only mode (default)
    --init-csum-tree            create a new CRC tree
    --init-extent-tree          create a new extent tree
    --check-data-csum           verify checkums of data blocks
    -Q|--qgroup-report           print a report on qgroup consistency
    -E|--subvol-extents <subvolid>
                                print subvolume extents and sharing state
    -r|--tree-root <bytenr>     use the given bytenr for the tree root
    --chunk-root <bytenr>       use the given bytenr for the chunk tree root
    -p|--progress               indicate progress

I would guess it’s either supper-recover or zero-log (since you can’t mount) that may help.

So you can’t even boot from a previous snapshot?

Hi Malcom,

thanks for your help. But i asked now on the btrfs ML, which i think is a more appropriate place ( Discussing the same topic on two places is a waste of resources, so i propose not to continue here.
Nevertheless thanks for your help.