{
    "content": [
        {
            "type": "text",
            "text": "# btrfs-inspect-internal(8) (man)\n\n**Summary:** btrfs-inspect-internal - query various internal information\n\n**Synopsis:** btrfs inspect-internal <subcommand> <args>\n\n## See Also\n\n- mkfs.btrfs(8)\n- BTRFS-INSPECT-INTE(8)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (2 lines)\n- **DESCRIPTION** (4 lines)\n- **SUBCOMMAND** (204 lines)\n- **EXIT STATUS** (3 lines)\n- **AVAILABILITY** (3 lines)\n- **SEE ALSO** (5 lines)\n\n## Full Content\n\n### NAME\n\nbtrfs-inspect-internal - query various internal information\n\n### SYNOPSIS\n\nbtrfs inspect-internal <subcommand> <args>\n\n### DESCRIPTION\n\nThis command group provides an interface to query internal information. The functionality\nranges from a simple UI to an ioctl or a more complex query that assembles the result from\nseveral internal structures. The latter usually requires calls to privileged ioctls.\n\n### SUBCOMMAND\n\ndump-super [options] <device> [device...]\n(replaces the standalone tool btrfs-show-super)\n\nShow btrfs superblock information stored on given devices in textual form. By default the\nfirst superblock is printed, more details about all copies or additional backup data can\nbe printed.\n\nBesides verification of the filesystem signature, there are no other sanity checks. The\nsuperblock checksum status is reported, the device item and filesystem UUIDs are checked\nand reported.\n\nNote\nthe meaning of option -s has changed in version 4.8 to be consistent with other tools\nto specify superblock copy rather the offset. The old way still works, but prints a\nwarning. Please update your scripts to use --bytenr instead. The option -i has been\ndeprecated.\nOptions\n\n-f|--full\nprint full superblock information, including the system chunk array and backup roots\n\n-a|--all\nprint information about all present superblock copies (cannot be used together with\n-s option)\n\n-i <super>\n(deprecated since 4.8, same behaviour as --super)\n\n--bytenr <bytenr>\nspecify offset to a superblock in a non-standard location at bytenr, useful for\ndebugging (disables the -f option)\n\nIf there are multiple options specified, only the last one applies.\n\n-F|--force\nattempt to print the superblock even if a valid BTRFS signature is not found; the\nresult may be completely wrong if the data does not resemble a superblock\n\n-s|--super <bytenr>\n(see compatibility note above)\n\nspecify which mirror to print, valid values are 0, 1 and 2 and the superblock must be\npresent on the device with a valid signature, can be used together with --force\n\ndump-tree [options] <device> [device...]\n(replaces the standalone tool btrfs-debug-tree)\n\nDump tree structures from a given device in textual form, expand keys to human readable\nequivalents where possible. This is useful for analyzing filesystem state or\ninconsistencies and has a positive educational effect on understanding the internal\nfilesystem structure.\n\nNote\ncontains file names, consider that if you’re asked to send the dump for analysis.\nDoes not contain file data.\nOptions\n\n-e|--extents\nprint only extent-related information: extent and device trees\n\n-d|--device\nprint only device-related information: tree root, chunk and device trees\n\n-r|--roots\nprint only short root node information, ie. the root tree keys\n\n-R|--backups\nsame as --roots plus print backup root info, ie. the backup root keys and the\nrespective tree root block offset\n\n-u|--uuid\nprint only the uuid tree information, empty output if the tree does not exist\n\n-b <blocknum>\nprint info of the specified block only, can be specified multiple times\n\n--follow\nuse with -b, print all children tree blocks of <blocknum>\n\n--dfs\n(default up to 5.2)\n\nuse depth-first search to print trees, the nodes and leaves are intermixed in the\noutput\n\n--bfs\n(default since 5.3)\n\nuse breadth-first search to print trees, the nodes are printed before all leaves\n\n--hide-names\nprint a placeholder HIDDEN instead of various names, useful for developers to inspect\nthe dump while keeping potentially sensitive information hidden\n\nThis is:\n\n•   directory entries (files, directories, subvolumes)\n\n•   default subvolume\n\n•   extended attributes (name, value)\n\n•   hardlink names (if stored inside another item or as extended references in\nstandalone items)\n\nNote\nlengths are not hidden because they can be calculated from the item size\nanyway.\n\n--csum-headers\nprint b-tree node checksums stored in headers (metadata)\n\n--csum-items\nprint checksums stored in checksum items (data)\n\n--noscan\ndo not automatically scan the system for other devices from the same filesystem, only\nuse the devices provided as the arguments\n\n-t <treeid>\nprint only the tree with the specified ID, where the ID can be numerical or common\nname in a flexible human readable form\n\nThe tree id name recognition rules:\n\n•   case does not matter\n\n•   the C source definition, eg. BTRFSROOTTREEOBJECTID\n\n•   short forms without BTRFS prefix, without TREE and OBJECTID suffix, eg.\nROOTTREE, ROOT\n\n•   convenience aliases, eg. DEVICE for the DEV tree, CHECKSUM for CSUM\n\n•   unrecognized ID is an error\n\ninode-resolve [-v] <ino> <path>\n(needs root privileges)\n\nresolve paths to all files with given inode number ino in a given subvolume at path, ie.\nall hardlinks\n\nOptions\n\n-v\n(deprecated) alias for global -v option\n\nlogical-resolve [-Pvo] [-s <bufsize>] <logical> <path>\n(needs root privileges)\n\nresolve paths to all files at given logical address in the linear filesystem space\n\nOptions\n\n-P\nskip the path resolving and print the inodes instead\n\n-o\nignore offsets, find all references to an extent instead of a single block. Requires\nkernel support for the V2 ioctl (added in 4.15). The results might need further\nprocessing to filter out unwanted extents by the offset that is supposed to be\nobtained by other means.\n\n-s <bufsize>\nset internal buffer for storing the file names to bufsize, default is 64k, maximum\n16m. Buffer sizes over 64K require kernel support for the V2 ioctl (added in 4.15).\n\n-v\n(deprecated) alias for global -v option\n\nmin-dev-size [options] <path>\n(needs root privileges)\n\nreturn the minimum size the device can be shrunk to, without performing any resize\noperation, this may be useful before executing the actual resize operation\n\nOptions\n\n--id <id>\nspecify the device id to query, default is 1 if this option is not used\n\nrootid <path>\nfor a given file or directory, return the containing tree root id, but for a subvolume\nitself return its own tree id (ie. subvol id)\n\nNote\nThe result is undefined for the so-called empty subvolumes (identified by inode\nnumber 2), but such a subvolume does not contain any files anyway\n\nsubvolid-resolve <subvolid> <path>\n(needs root privileges)\n\nresolve the absolute path of the subvolume id subvolid\n\ntree-stats [options] <device>\n(needs root privileges)\n\nPrint sizes and statistics of trees.\n\nOptions\n\n-b\nPrint raw numbers in bytes.\n\n### EXIT STATUS\n\nbtrfs inspect-internal returns a zero exit status if it succeeds. Non zero is returned in\ncase of failure.\n\n### AVAILABILITY\n\nbtrfs is part of btrfs-progs. Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for\nfurther details.\n\n### SEE ALSO\n\nmkfs.btrfs(8)\n\n\n\nBtrfs v5.16.2                                02/16/2022                        BTRFS-INSPECT-INTE(8)\n\n"
        }
    ],
    "structuredContent": {
        "command": "btrfs-inspect-internal",
        "section": "8",
        "mode": "man",
        "summary": "btrfs-inspect-internal - query various internal information",
        "synopsis": "btrfs inspect-internal <subcommand> <args>",
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "mkfs.btrfs",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/mkfs.btrfs/8/json"
            },
            {
                "name": "BTRFS-INSPECT-INTE",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/BTRFS-INSPECT-INTE/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SUBCOMMAND",
                "lines": 204,
                "subsections": []
            },
            {
                "name": "EXIT STATUS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AVAILABILITY",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ]
    }
}