1 btrfs-inspect-internal(8)
2 =========================
6 btrfs-inspect-internal - query various internal information
10 *btrfs inspect-internal* <subcommand> <args>
15 This command group provides an interface to query internal information. The
16 functionality ranges from a simple UI to an ioctl or a more complex query that
17 assembles the result from several internal structures. The latter usually
18 requires calls to privileged ioctls.
22 *dump-super* [options] <device> [device...]::
23 (replaces the standalone tool *btrfs-show-super*)
25 Show btrfs superblock information stored on given devices in textual form.
26 By default the first superblock is printed, more details about all copies or
27 additional backup data can be printed.
29 Besides verifictaion of the filesystem signature, there are no other sanity
30 checks. The superblock checksum status is reported, the device item and
31 filesystem UUIDs are checked and reported.
36 print full superblock information, including the system chunk array and backup roots
38 print information about all present superblock copies (cannot be used together with '-i' option)
40 specify which mirror to print, valid values are 0, 1 and 2 and the superblock must be present on the device
42 If there are multiple options specified, only the last one is applies.
45 attempt to print the superblock even if thre's no valid BTRFS signature found
47 The result may be completely wrong if the data do not resemble a superblock.
50 specify offset to a superblock in a non-standard location at 'bytenr', useful
51 for debugging (disables the '-f' option)
53 *dump-tree* [options] <device>::
54 (replaces the standalone tool *btrfs-debug-tree*)
56 Dump tree structures from a given device in textual form, expand keys to human
57 readable equivalents where possible.
58 This is useful for analyzing filesystem state or inconsistencies and has
59 a positive educational effect on understanding the internal filesystem structure.
61 NOTE: contains file names, consider that if you're asked to send the dump for
62 analysis. Does not contain file data.
67 print only extent-related information: extent and device trees
69 print only device-related information: tree root, chunk and device trees
71 print only short root node information, ie. the root tree keys
73 same as --roots plus print backup root info, ie. the backup root keys and
74 the respective tree root block offset
76 print only the uuid tree information, empty output if the tree does not exist
78 print info of the specified block only
80 print only the tree with the specified ID, where the ID can be numerical or
81 common name in a flexible human readable form
83 The tree id name recognition rules:
85 * case does not matter
86 * the C source definition, eg. BTRFS_ROOT_TREE_OBJECTID
87 * short forms without BTRFS_ prefix, without _TREE and _OBJECTID suffix, eg. ROOT_TREE, ROOT
88 * convenience aliases, eg. DEVICE for the DEV tree, CHECKSUM for CSUM
89 * unrecognized ID is an error
91 *inode-resolve* [-v] <ino> <path>::
92 (needs root privileges)
94 resolve paths to all files with given inode number 'ino' in a given subvolume
95 at 'path', ie. all hardlinks
100 verbose mode, print count of returned paths and ioctl() return value
102 *logical-resolve* [-Pv] [-s <bufsize>] <logical> <path>::
103 (needs root privileges)
105 resolve paths to all files at given 'logical' address in the linear filesystem space
110 skip the path resolving and print the inodes instead
112 verbose mode, print count of returned paths and all ioctl() return values
114 set internal buffer for storing the file names to 'bufsize', default is 4096, maximum 64k
116 *min-dev-size* [options] <path>::
117 (needs root privileges)
119 return the minimum size the device can be shrunk to, without performing any
120 resize operation, this may be useful before executing the actual resize operation
125 specify the device 'id' to query, default is 1 if this option is not used
128 for a given file or directory, return the containing tree root id, for a
129 subvolume itself return it's own tree id (ie. subvol id)
131 NOTE: The result is undefined for the so-called empty subvolumes (identified by
132 inode number 2), but such subvolume does not contain any files anyway
134 *subvolid-resolve* <subvolid> <path>::
135 (needs root privileges)
137 resolve the absolute path of a the subvolume id 'subvolid'
141 *btrfs inspect-internal* returns a zero exit status if it succeeds. Non zero is
142 returned in case of failure.
146 *btrfs* is part of btrfs-progs.
147 Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for