{
    "mode": "man",
    "parameter": "btrfs-inspect-internal",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/btrfs-inspect-internal/8/json",
    "generated": "2026-10-09T03:22:57Z",
    "synopsis": "btrfs inspect-internal <subcommand> <args>",
    "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. 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",
            "subsections": []
        },
        "SUBCOMMAND": {
            "content": "",
            "subsections": [
                {
                    "name": "dump-super [options] <device> [device...]",
                    "content": "Show btrfs superblock information stored on given devices in textual form.  By default\nthe  first  superblock  is printed, more details about all copies or additional backup\ndata can be printed.\n\nBesides verification of the filesystem signature, there are no  other  sanity  checks.\nThe  superblock  checksum status is reported, the device item and filesystem UUIDs are\nchecked and reported.\n\nNOTE:\nThe meaning of option -s has changed in version 4.8 to  be  consistent  with  other\ntools  to  specify  superblock copy rather the offset. The old way still works, but\nprints a warning. Please update your scripts to use --bytenr instead. The option -i\nhas been deprecated.\n\nOptions\n\n-f|--full\nprint full superblock information, including the system chunk array and  backup\nroots\n\n-a|--all\nprint  information about all present superblock copies (cannot be used together\nwith -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;\nthe result 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\nmust be present on the device with a valid signature, can be used together with\n--force\n"
                },
                {
                    "name": "dump-tree [options] <device> [device...]",
                    "content": "Dump tree structures from a given device in textual form, expand keys to  human  read‐\nable equivalents where possible.  This is useful for analyzing filesystem state or in‐\nconsistencies  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.\n\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, i.e. the root tree keys\n\n-R|--backups\nsame  as --roots plus print backup root info, i.e. 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  (default up to 5.2)\n\nuse depth-first search to print trees, the nodes and leaves are  intermixed  in\nthe output\n\n--bfs  (default since 5.3)\n\nuse  breadth-first  search  to  print  trees,  the nodes are printed before all\nleaves\n\n--hide-names\nprint a placeholder HIDDEN instead of various names, useful for  developers  to\ninspect the 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 filesys‐\ntem, 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  numerical  or\ncommon name 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, e.g. BTRFSROOTTREEOBJECTID\n\n• short  forms  without BTRFS prefix, without TREE and OBJECTID suffix, e.g.\nROOTTREE, ROOT\n\n• convenience aliases, e.g. DEVICE for the DEV tree, CHECKSUM for CSUM\n\n• unrecognized ID is an error\n"
                },
                {
                    "name": "inode-resolve [-v] <ino> <path>",
                    "content": "(needs root privileges)\n\nresolve paths to all files with given inode number ino in a given subvolume  at  path,\ni.e. all hardlinks\n\nOptions\n"
                },
                {
                    "name": "-v     (deprecated)",
                    "content": "",
                    "flag": "-v"
                },
                {
                    "name": "logical-resolve [-Pvo] [-s <bufsize>] <logical> <path>",
                    "content": "(needs root privileges)\n\nresolve paths to all files at given logical address in the linear filesystem space\n\nOptions\n\n-P     skip the path resolving and print the inodes instead\n\n-o     ignore  offsets,  find  all  references to an extent instead of a single block.\nRequires kernel support for the V2 ioctl (added in  4.15).  The  results  might\nneed  further  processing  to filter out unwanted extents by the offset that is\nsupposed to be obtained by other means.\n\n-s <bufsize>\nset internal buffer for storing the file names to bufsize,  default  is  64KiB,\nmaximum 16MiB.  Buffer sizes over 64Kib require kernel support for the V2 ioctl\n(added in 4.15).\n"
                },
                {
                    "name": "-v     (deprecated)",
                    "content": "",
                    "flag": "-v"
                },
                {
                    "name": "map-swapfile [options] <file>",
                    "content": "(needs root privileges)\n\nFind  device-specific  physical  offset of file that can be used for hibernation. Also\nverify that the file is suitable as a swapfile.  See also command btrfs filesystem mk‐\nswapfile and the Swapfile feature description.\n\nNOTE:\nDo not use filefrag or FIEMAP ioctl values reported as physical, this is  different\ndue  to  internal  filesystem mappings.  The hibernation expects offset relative to\nthe physical block device.\n\nOptions\n\n-r|--resume-offset\nprint only the value suitable as resume offset for file  /sys/power/resumeoff‐\nset\n"
                },
                {
                    "name": "min-dev-size [options] <path>",
                    "content": "(needs root privileges)\n\nreturn the minimum size the device can be shrunk to, without performing any resize op‐\neration, 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"
                },
                {
                    "name": "rootid <path>",
                    "content": "for a given file or directory, return the containing tree root id, but for a subvolume\nitself return its own tree id (i.e. 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"
                },
                {
                    "name": "subvolid-resolve <subvolid> <path>",
                    "content": "(needs root privileges)\n\nresolve the absolute path of the subvolume id subvolid\n"
                },
                {
                    "name": "tree-stats [options] <device>",
                    "content": "(needs root privileges)\n\nPrint sizes and statistics of trees. This takes a device as  an  argument  and  not  a\nmount point unlike other commands.\n\nNOTE:\nIn  case  the  the filesystem is still mounted it's possible to run the command but\nthe results may be inaccurate or various errors may be printed in  case  there  are\nongoing writes to the filesystem. A warning is printed in such case.\n\nOptions\n\n-b     Print raw numbers in bytes.\n"
                }
            ]
        },
        "EXIT STATUS": {
            "content": "btrfs  inspect-internal  returns  a  zero exit status if it succeeds. Non zero is returned in\ncase of failure.\n",
            "subsections": []
        },
        "AVAILABILITY": {
            "content": "btrfs   is   part   of   btrfs-progs.     Please    refer    to    the    documentation    at\nhttps://btrfs.readthedocs.io.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "mkfs.btrfs(8)\n\n\n6.6.3                                       Mar 31, 2024                   BTRFS-INSPECT-INTERNAL(8)",
            "subsections": []
        }
    },
    "summary": "btrfs-inspect-internal - query various internal information",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "mkfs.btrfs",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/mkfs.btrfs/8/json"
        },
        {
            "name": "BTRFS-INSPECT-INTERNAL",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/BTRFS-INSPECT-INTERNAL/8/json"
        }
    ]
}