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-tree* [options] <device>::
23 (needs root privileges)
25 Dump the whole tree of the given device.
26 This is useful for analyzing filesystem state or inconsistence and has
27 a positive educational effect on understanding the internal structure.
28 <device> is the device file where the filesystem is stored.
33 Print detailed extents info.
35 Print info of btrfs device and root tree dirs only.
37 Print info of roots only.
39 Print info of roots and root backups.
41 Print info of UUID tree only.
43 Print info of the specified block only.
45 Print only the tree with the specified ID.
47 *inode-resolve* [-v] <ino> <path>::
48 (needs root privileges)
50 resolve paths to all files with given inode number 'ino' in a given subvolume
51 at 'path', ie. all hardlinks
56 verbose mode, print count of returned paths and ioctl() return value
58 *logical-resolve* [-Pv] [-s <bufsize>] <logical> <path>::
59 (needs root privileges)
61 resolve paths to all files at given 'logical' address in the linear filesystem space
66 skip the path resolving and print the inodes instead
68 verbose mode, print count of returned paths and all ioctl() return values
70 set internal buffer for storing the file names to 'bufsize', default is 4096, maximum 64k
72 *min-dev-size* [options] <path>::
73 (needs root privileges)
75 return the minimum size the device can be shrunk to, without performing any
76 resize operation, this may be useful before executing the actual resize operation
81 specify the device 'id' to query, default is 1 if this option is not used
84 for a given file or directory, return the containing tree root id, for a
85 subvolume itself return it's own tree id (ie. subvol id)
87 NOTE: The result is undefined for the so-called empty subvolumes (identified by
88 inode number 2), but such subvolume does not contain any files anyway
90 *show-super* [options] <device> [device...]::
91 (needs root privileges)
93 Show btrfs superblock information stored in devices.
94 It is used to print the information of superblock,
95 you can specify which mirror to print out.
97 By default, every device's first superblock will be printed out.
99 Mainly used for debug purpose.
104 Print full superblock information.
106 Including the system chunk array and backup roots.
109 Print information of all superblocks.
111 If this option is given, '-i' option will be ignored.
113 -i <super_mirror>::::
114 Specify which mirror to print out.
116 <super_mirror> is between 0 and 2.
117 If several '-i <super_mirror>' are given, only the last one is valid.
120 Attempt to print the superblock even if no superblock magic is found. May end
123 specifiy offset to a superblock in a non-standard location at 'bytenr', useful
124 for debugging (disables the '-f' option)
126 *subvolid-resolve* <subvolid> <path>::
127 (needs root privileges)
129 resolve the absolute path of a the subvolume id 'subvolid'
133 *btrfs inspect-internal* returns a zero exit status if it succeeds. Non zero is
134 returned in case of failure.
138 *btrfs* is part of btrfs-progs.
139 Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for
145 `btrfs-debug-tree`(8)