{
    "content": [
        {
            "type": "text",
            "text": "# btrfs-inspect-internal (info)\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.\nThe functionality ranges from a simple UI to an ioctl or a more complex\nquery that assembles the result from several internal structures. The\nlatter usually requires calls to privileged ioctls.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **SUBCOMMAND**\n- **EXIT STATUS**\n- **AVAILABILITY**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "btrfs-inspect-internal",
        "section": "",
        "mode": "info",
        "summary": "btrfs-inspect-internal - query various internal information",
        "synopsis": "btrfs inspect-internal <subcommand> <args>",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "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": 5,
                "subsections": []
            },
            {
                "name": "SUBCOMMAND",
                "lines": 222,
                "subsections": []
            },
            {
                "name": "EXIT STATUS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AVAILABILITY",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "btrfs-inspect-internal - query various internal information\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "btrfs inspect-internal <subcommand> <args>\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This command group provides an interface to query internal information.\nThe functionality ranges from a simple UI to an ioctl or a more complex\nquery that assembles the result from several internal structures. The\nlatter usually requires calls to privileged ioctls.\n",
                "subsections": []
            },
            "SUBCOMMAND": {
                "content": "dump-super [options] <device> [device...]\n(replaces the standalone tool btrfs-show-super)\n\nShow btrfs superblock information stored on given devices in\ntextual form. By default the first superblock is printed, more\ndetails about all copies or additional backup data can be printed.\n\nBesides verification of the filesystem signature, there are no\nother sanity checks. The superblock checksum status is reported,\nthe device item and filesystem UUIDs are checked and reported.\n\nNote\nthe meaning of option -s has changed in version 4.8 to be\nconsistent with other tools to specify superblock copy rather\nthe offset. The old way still works, but prints a warning.\nPlease update your scripts to use --bytenr instead. The option\n-i has been deprecated.\nOptions\n\n-f|--full\nprint full superblock information, including the system chunk\narray and backup roots\n\n-a|--all\nprint information about all present superblock copies (cannot\nbe used together with -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\nbytenr, useful for debugging (disables the -f option)\n\nIf there are multiple options specified, only the last one\napplies.\n\n-F|--force\nattempt to print the superblock even if a valid BTRFS signature\nis not found; the result may be completely wrong if the data\ndoes 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\nthe superblock must be present on the device with a valid\nsignature, 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\nkeys to human readable equivalents where possible. This is useful\nfor analyzing filesystem state or inconsistencies and has a\npositive educational effect on understanding the internal\nfilesystem structure.\n\nNote\ncontains file names, consider that if you're asked to send the\ndump for analysis. Does 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\ndevice 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\nroot keys and the respective tree root block offset\n\n-u|--uuid\nprint only the uuid tree information, empty output if the tree\ndoes not exist\n\n-b <blocknum>\nprint info of the specified block only, can be specified\nmultiple 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\nintermixed in the output\n\n--bfs\n(default since 5.3)\n\nuse breadth-first search to print trees, the nodes are printed\nbefore all leaves\n\n--hide-names\nprint a placeholder HIDDEN instead of various names, useful for\ndevelopers to inspect the dump while keeping potentially\nsensitive information hidden\n\nThis is:\n\no   directory entries (files, directories, subvolumes)\n\no   default subvolume\n\no   extended attributes (name, value)\n\no   hardlink names (if stored inside another item or as\nextended references in standalone items)\n\nNote\nlengths are not hidden because they can be calculated\nfrom the item size anyway.\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\nsame filesystem, only use the devices provided as the arguments\n\n-t <treeid>\nprint only the tree with the specified ID, where the ID can be\nnumerical or common name in a flexible human readable form\n\nThe tree id name recognition rules:\n\no   case does not matter\n\no   the C source definition, eg. BTRFSROOTTREEOBJECTID\n\no   short forms without BTRFS prefix, without TREE and\nOBJECTID suffix, eg. ROOTTREE, ROOT\n\no   convenience aliases, eg. DEVICE for the DEV tree, CHECKSUM\nfor CSUM\n\no   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\nsubvolume at path, ie. all 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\nfilesystem 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\nsingle block. Requires kernel support for the V2 ioctl (added\nin 4.15). The results might need further processing to filter\nout 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,\ndefault is 64k, maximum 16m. Buffer sizes over 64K require\nkernel 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\nperforming any resize operation, this may be useful before\nexecuting the actual resize operation\n\nOptions\n\n--id <id>\nspecify the device id to query, default is 1 if this option is\nnot used\n\nrootid <path>\nfor a given file or directory, return the containing tree root id,\nbut for a subvolume itself return its own tree id (ie. subvol id)\n\nNote\nThe result is undefined for the so-called empty subvolumes\n(identified by inode number 2), but such a subvolume does not\ncontain 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",
                "subsections": []
            },
            "EXIT STATUS": {
                "content": "btrfs inspect-internal returns a zero exit status if it succeeds. Non\nzero is returned in case of failure.\n",
                "subsections": []
            },
            "AVAILABILITY": {
                "content": "btrfs is part of btrfs-progs. Please refer to the btrfs wiki\nhttp://btrfs.wiki.kernel.org for further details.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "mkfs.btrfs(8)\n\nBtrfs v5.16.2                     02/16/2022             BTRFS-INSPECT-INTE(8)",
                "subsections": []
            }
        }
    }
}