btrfs-inspect-internal
query various internal information
- Provided by: btrfs-progs (Version: 5.4.1-2)
- Report a bug
query various internal information
btrfs inspect-internal <subcommand> <args>
This command group provides an interface to query internal information. The functionality ranges from a simple UI to an ioctl or a more complex query that assembles the result from several internal structures. The latter usually requires calls to privileged ioctls.
dump-super [options] <device> [device...]
Show btrfs superblock information stored on given devices in textual form. By default the first superblock is printed, more details about all copies or additional backup data can be printed.
Besides verification of the filesystem signature, there are no other sanity checks. The superblock checksum status is reported, the device item and filesystem UUIDs are checked and reported.
-f|--full
-a|--all
-i <super>
--bytenr <bytenr>
If there are multiple options specified, only the last one applies.
-F|--force
-s|--super <bytenr>
specify which mirror to print, valid values are 0, 1 and 2 and the superblock must be present on the device with a valid signature, can be used together with --force
dump-tree [options] <device> [device...]
Dump tree structures from a given device in textual form, expand keys to human readable equivalents where possible. This is useful for analyzing filesystem state or inconsistencies and has a positive educational effect on understanding the internal filesystem structure.
-e|--extents
-d|--device
-r|--roots
-R|--backups
-u|--uuid
-b <block_num>
--follow
--dfs
use depth-first search to print trees, the nodes and leaves are intermixed in the output --bfs:::: (default since 5.3)
use breadth-first search to print trees, the nodes are printed before all leaves --noscan:::: do not automatically scan the system for other devices from the same filesystem, only use the devices provided as the arguments -t <tree_id>:::: print only the tree with the specified ID, where the ID can be numerical or common name in a flexible human readable form
The tree id name recognition rules:
inode-resolve [-v] <ino> <path>
resolve paths to all files with given inode number ino in a given subvolume at path, ie. all hardlinks
Options
-v
logical-resolve [-Pv] [-s <bufsize>] <logical> <path>
resolve paths to all files at given logical address in the linear filesystem space
Options
-P
-v
-s <bufsize>
min-dev-size [options] <path>
return the minimum size the device can be shrunk to, without performing any resize operation, this may be useful before executing the actual resize operation
Options
--id <id>
rootid <path>
subvolid-resolve <subvolid> <path>
resolve the absolute path of the subvolume id subvolid
tree-stats [options] <device>
Print sizes and statistics of trees.
Options
-b
btrfs inspect-internal returns a zero exit status if it succeeds. Non zero is returned in case of failure.
btrfs is part of btrfs-progs. Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for further details.