btrfs-inspect-internal
Debug and inspect btrfs filesystem internals
TLDR
Print superblock information
$ sudo btrfs inspect-internal dump-super [path/to/partition]
Print all superblock copies$ sudo btrfs inspect-internal dump-super -a [path/to/partition]
Print filesystem metadata information$ sudo btrfs inspect-internal dump-tree [path/to/partition]
Print list of files in inode n$ sudo btrfs inspect-internal inode-resolve [n] [path/to/btrfs_mount]
Print list of files at a logical address$ sudo btrfs inspect-internal logical-resolve [logical_address] [path/to/btrfs_mount]
Print tree stats$ sudo btrfs inspect-internal tree-stats [path/to/partition]
SYNOPSIS
btrfs inspect-internal subcommand [options] device|path
DESCRIPTION
btrfs inspect-internal provides low-level access to btrfs filesystem internal structures. It is primarily used for debugging, forensics, and advanced troubleshooting.
The command can dump superblock data, metadata trees, and resolve inodes to file paths or logical addresses to physical locations.
PARAMETERS
-a, --all
Dump all superblock copies-f
Force output even with warnings
SUBCOMMANDS
dump-super
Print superblock informationdump-tree
Print metadata tree structureinode-resolve
Find file paths from inode numberlogical-resolve
Find files at logical addresstree-stats
Print tree statisticsmin-dev-size
Calculate minimum device size for shrinking
CAVEATS
Output is technical and intended for developers or advanced users. Some commands require unmounted filesystem while others need mounted. Incorrect use won't damage data but output interpretation requires btrfs internals knowledge.
SEE ALSO
btrfs(8), btrfs-check(8)
