btrfs-progs: inspect: add command min-dev-size
[platform/upstream/btrfs-progs.git] / Documentation / btrfs-inspect-internal.asciidoc
1 btrfs-inspect-internal(8)
2 =========================
3
4 NAME
5 ----
6 btrfs-inspect-internal - resolve different btrfs items for debug purpose
7
8 SYNOPSIS
9 --------
10 *btrfs inspect-internal* <subcommand> <args>
11
12 DESCRIPTION
13 -----------
14 *btrfs inspect-internal* is used to resolve different items for debug purpose.
15
16 SUBCOMMAND
17 ----------
18 *inode-resolve* [-v] <inode> <path>::
19 Resolves an <inode> in subvolume <path> to all filesystem paths.
20 +
21 `Options`
22 +
23 -v::::
24 verbose mode. print count of returned paths and ioctl() return value
25
26 *logical-resolve* [-Pv] [-s <bufsize>] <logical> <path>::
27 Resolves a <logical> address in the filesystem mounted at <path> to all inodes.
28 +
29 By default, each inode is then resolved to a file system path (similar to the
30 inode-resolve subcommand).
31 +
32 `Options`
33 +
34 -P::::
35 skip the path resolving and print the inodes instead
36 -v::::
37 verbose mode. print count of returned paths and all ioctl() return values
38 -s <bufsize>::::
39 set inode container's size.
40 +
41 This is used to increase inode container's size in case it is
42 not enough to read all the resolved results. The max value one can set is 64k.
43
44 *min-dev-size* [options] <path>::
45 Return the minimum size the device can be shrunk to, without performing any
46 resize operation.
47 +
48 `Options`
49 +
50 --id::::
51 specify the device id to query, default is 1
52
53 *rootid* <path>::
54 For a given file or directory, return the containing tree root id. For a
55 subvolume return it's own tree id.
56 +
57 The result is undefined for the so-called empty subvolumes (identified by inode number 2).
58
59 *subvolid-resolve* <subvolid> <path>::
60 Get file system paths for the given subvolume ID.
61
62 EXIT STATUS
63 -----------
64 *btrfs inspect-internal* returns a zero exit status if it succeeds. Non zero is
65 returned in case of failure.
66
67 AVAILABILITY
68 ------------
69 *btrfs* is part of btrfs-progs.
70 Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for
71 further details.
72
73 SEE ALSO
74 --------
75 `mkfs.btrfs`(8),
76 `btrfs-debug-tree`(8)