1BTRFS-INSPECT-INTE(8)            Btrfs Manual            BTRFS-INSPECT-INTE(8)
2
3
4

NAME

6       btrfs-inspect-internal - query various internal information
7

SYNOPSIS

9       btrfs inspect-internal <subcommand> <args>
10

DESCRIPTION

12       This command group provides an interface to query internal information.
13       The functionality ranges from a simple UI to an ioctl or a more complex
14       query that assembles the result from several internal structures. The
15       latter usually requires calls to privileged ioctls.
16

SUBCOMMAND

18       dump-super [options] <device> [device...]
19           (replaces the standalone tool btrfs-show-super)
20
21           Show btrfs superblock information stored on given devices in
22           textual form. By default the first superblock is printed, more
23           details about all copies or additional backup data can be printed.
24
25           Besides verification of the filesystem signature, there are no
26           other sanity checks. The superblock checksum status is reported,
27           the device item and filesystem UUIDs are checked and reported.
28
29               Note
30               the meaning of option -s has changed in version 4.8 to be
31               consistent with other tools to specify superblock copy rather
32               the offset. The old way still works, but prints a warning.
33               Please update your scripts to use --bytenr instead. The option
34               -i has been deprecated.
35           Options
36
37           -f|--full
38               print full superblock information, including the system chunk
39               array and backup roots
40
41           -a|--all
42               print information about all present superblock copies (cannot
43               be used together with -s option)
44
45           -i <super>
46               (deprecated since 4.8, same behaviour as --super)
47
48           --bytenr <bytenr>
49               specify offset to a superblock in a non-standard location at
50               bytenr, useful for debugging (disables the -f option)
51
52               If there are multiple options specified, only the last one
53               applies.
54
55           -F|--force
56               attempt to print the superblock even if a valid BTRFS signature
57               is not found; the result may be completely wrong if the data
58               does not resemble a superblock
59
60           -s|--super <bytenr>
61               (see compatibility note above)
62
63               specify which mirror to print, valid values are 0, 1 and 2 and
64               the superblock must be present on the device with a valid
65               signature, can be used together with --force
66
67       dump-tree [options] <device> [device...]
68           (replaces the standalone tool btrfs-debug-tree)
69
70           Dump tree structures from a given device in textual form, expand
71           keys to human readable equivalents where possible. This is useful
72           for analyzing filesystem state or inconsistencies and has a
73           positive educational effect on understanding the internal
74           filesystem structure.
75
76               Note
77               contains file names, consider that if you’re asked to send the
78               dump for analysis. Does not contain file data.
79           Options
80
81           -e|--extents
82               print only extent-related information: extent and device trees
83
84           -d|--device
85               print only device-related information: tree root, chunk and
86               device trees
87
88           -r|--roots
89               print only short root node information, ie. the root tree keys
90
91           -R|--backups
92               same as --roots plus print backup root info, ie. the backup
93               root keys and the respective tree root block offset
94
95           -u|--uuid
96               print only the uuid tree information, empty output if the tree
97               does not exist
98
99           -b <block_num>
100               print info of the specified block only, can be specified
101               multiple times
102
103           --follow
104               use with -b, print all children tree blocks of <block_num>
105
106           --dfs
107               (default up to 5.2)
108
109               use depth-first search to print trees, the nodes and leaves are
110               intermixed in the output
111
112           --bfs
113               (default since 5.3)
114
115               use breadth-first search to print trees, the nodes are printed
116               before all leaves
117
118           --hide-names
119               print a placeholder HIDDEN instead of various names, useful for
120               developers to inspect the dump while keeping potentially
121               sensitive information hidden
122
123               This is:
124
125               ·   directory entries (files, directories, subvolumes)
126
127               ·   default subvolume
128
129               ·   extended attributes (name, value)
130
131               ·   hardlink names (if stored inside another item or as
132                   extended references in standalone items)
133
134                       Note
135                       lengths are not hidden because they can be calculated
136                       from the item size anyway.
137
138           --noscan
139               do not automatically scan the system for other devices from the
140               same filesystem, only use the devices provided as the arguments
141
142           -t <tree_id>
143               print only the tree with the specified ID, where the ID can be
144               numerical or common name in a flexible human readable form
145
146               The tree id name recognition rules:
147
148               ·   case does not matter
149
150               ·   the C source definition, eg. BTRFS_ROOT_TREE_OBJECTID
151
152               ·   short forms without BTRFS_ prefix, without _TREE and
153                   _OBJECTID suffix, eg. ROOT_TREE, ROOT
154
155               ·   convenience aliases, eg. DEVICE for the DEV tree, CHECKSUM
156                   for CSUM
157
158               ·   unrecognized ID is an error
159
160       inode-resolve [-v] <ino> <path>
161           (needs root privileges)
162
163           resolve paths to all files with given inode number ino in a given
164           subvolume at path, ie. all hardlinks
165
166           Options
167
168           -v
169               verbose mode, print count of returned paths and ioctl() return
170               value
171
172       logical-resolve [-Pvo] [-s <bufsize>] <logical> <path>
173           (needs root privileges)
174
175           resolve paths to all files at given logical address in the linear
176           filesystem space
177
178           Options
179
180           -P
181               skip the path resolving and print the inodes instead
182
183           -v
184               verbose mode, print count of returned paths and all ioctl()
185               return values
186
187           -o
188               ignore offsets, find all references to an extent instead of a
189               single block. Requires kernel support for the V2 ioctl (added
190               in 4.15). The results might need further processing to filter
191               out unwanted extents by the offset that is supposed to be
192               obtained by other means.
193
194           -s <bufsize>
195               set internal buffer for storing the file names to bufsize,
196               default is 64k, maximum 16m. Buffer sizes over 64K require
197               kernel support for the V2 ioctl (added in 4.15).
198
199       min-dev-size [options] <path>
200           (needs root privileges)
201
202           return the minimum size the device can be shrunk to, without
203           performing any resize operation, this may be useful before
204           executing the actual resize operation
205
206           Options
207
208           --id <id>
209               specify the device id to query, default is 1 if this option is
210               not used
211
212       rootid <path>
213           for a given file or directory, return the containing tree root id,
214           but for a subvolume itself return its own tree id (ie. subvol id)
215
216               Note
217               The result is undefined for the so-called empty subvolumes
218               (identified by inode number 2), but such a subvolume does not
219               contain any files anyway
220
221       subvolid-resolve <subvolid> <path>
222           (needs root privileges)
223
224           resolve the absolute path of the subvolume id subvolid
225
226       tree-stats [options] <device>
227           (needs root privileges)
228
229           Print sizes and statistics of trees.
230
231           Options
232
233           -b
234               Print raw numbers in bytes.
235

EXIT STATUS

237       btrfs inspect-internal returns a zero exit status if it succeeds. Non
238       zero is returned in case of failure.
239

AVAILABILITY

241       btrfs is part of btrfs-progs. Please refer to the btrfs wiki
242       http://btrfs.wiki.kernel.org for further details.
243

SEE ALSO

245       mkfs.btrfs(8)
246
247
248
249Btrfs v5.6                        04/05/2020             BTRFS-INSPECT-INTE(8)
Impressum