packaging: Enable LTO and set visibility to hidden
[platform/upstream/btrfs-progs.git] / Documentation / btrfs.asciidoc
1 btrfs(8)
2 ========
3
4 NAME
5 ----
6 btrfs - a toolbox to manage btrfs filesystems
7
8 SYNOPSIS
9 --------
10 *btrfs* <command> [<args>]
11
12 DESCRIPTION
13 -----------
14 The *btrfs* utility is a toolbox for managing btrfs filesystems.  There are
15 command groups to work with subvolumes, devices, for whole filesystem or other
16 specific actions. See section *COMMANDS*.
17
18 There are also standalone tools for some tasks like *btrfs-convert* or
19 *btrfstune* that were separate historically and/or haven't been merged to the
20 main utility. See section 'STANDALONE TOOLS' for more details.
21
22 For other topics (mount options, etc) please refer to the separate manual
23 page `btrfs`(5).
24
25 COMMAND SYNTAX
26 --------------
27
28 Any command name can be shortened so long as the shortened form is unambiguous,
29 however, it is recommended to use full command names in scripts.  All command
30 groups have their manual page named *btrfs-<group>*.
31
32 For example: it is possible to run *btrfs sub snaps* instead of
33 *btrfs subvolume snapshot*.
34 But *btrfs file s* is not allowed, because *file s* may be interpreted
35 both as *filesystem show* and as *filesystem sync*.
36
37 If the command name is ambiguous, the list of conflicting options is
38 printed.
39
40 For an overview of a given command use 'btrfs command --help'
41 or 'btrfs [command...] --help --full' to print all available options.
42
43 COMMANDS
44 --------
45 *balance*::
46         Balance btrfs filesystem chunks across single or several devices. +
47         See `btrfs-balance`(8) for details.
48
49 *check*::
50         Do off-line check on a btrfs filesystem. +
51         See `btrfs-check`(8) for details.
52
53 *device*::
54         Manage devices managed by btrfs, including add/delete/scan and so
55         on. +
56         See `btrfs-device`(8) for details.
57
58 *filesystem*::
59         Manage a btrfs filesystem, including label setting/sync and so on. +
60         See `btrfs-filesystem`(8) for details.
61
62 *inspect-internal*::
63         Debug tools for developers/hackers. +
64         See `btrfs-inspect-internal`(8) for details.
65
66 *property*::
67         Get/set a property from/to a btrfs object. +
68         See `btrfs-property`(8) for details.
69
70 *qgroup*::
71         Manage quota group(qgroup) for btrfs filesystem. +
72         See `btrfs-qgroup`(8) for details.
73
74 *quota*::
75         Manage quota on btrfs filesystem like enabling/rescan and etc. +
76         See `btrfs-quota`(8) and `btrfs-qgroup`(8) for details.
77
78 *receive*::
79         Receive subvolume data from stdin/file for restore and etc. +
80         See `btrfs-receive`(8) for details.
81
82 *replace*::
83         Replace btrfs devices. +
84         See `btrfs-replace`(8) for details.
85
86 *rescue*::
87         Try to rescue damaged btrfs filesystem. +
88         See `btrfs-rescue`(8) for details.
89
90 *restore*::
91         Try to restore files from a damaged btrfs filesystem. +
92         See `btrfs-restore`(8) for details.
93
94 *scrub*::
95         Scrub a btrfs filesystem. +
96         See `btrfs-scrub`(8) for details.
97
98 *send*::
99         Send subvolume data to stdout/file for backup and etc. +
100         See `btrfs-send`(8) for details.
101
102 *subvolume*::
103         Create/delete/list/manage btrfs subvolume. +
104         See `btrfs-subvolume`(8) for details.
105
106 STANDALONE TOOLS
107 ----------------
108
109 New functionality could be provided using a standalone tool. If the functionality
110 proves to be useful, then the standalone tool is declared obsolete and its
111 functionality is copied to the main tool. Obsolete tools are removed after a
112 long (years) depreciation period.
113
114 Tools that are still in active use without an equivalent in *btrfs*:
115
116 *btrfs-convert*:: in-place conversion from ext2/3/4 filesystems to btrfs
117 *btrfstune*:: tweak some filesystem properties on a unmounted filesystem
118 *btrfs-select-super*:: rescue tool to overwrite primary superblock from a spare copy
119 *btrfs-find-root*:: rescue helper to find tree roots in a filesystem
120
121 Deprecated and obsolete tools:
122
123 *btrfs-debug-tree*:: moved to *btrfs inspect-internal dump-tree*. Removed from
124 source distribution.
125 *btrfs-show-super*:: moved to *btrfs inspect-internal dump-super*, standalone
126 removed.
127 *btrfs-zero-log*:: moved to *btrfs rescue zero-log*, standalone removed.
128
129 EXIT STATUS
130 -----------
131 *btrfs* returns a zero exit status if it succeeds. Non zero is returned in
132 case of failure.
133
134 AVAILABILITY
135 ------------
136 *btrfs* is part of btrfs-progs.
137 Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for
138 further details.
139
140 SEE ALSO
141 --------
142 `btrfs-balance`(8),
143 `btrfs-check`(8),
144 `btrfs-convert`(8),
145 `btrfs-device`(8),
146 `btrfs-filesystem`(8),
147 `btrfs-inspect-internal`(8),
148 `btrfs-property`(8),
149 `btrfs-qgroup`(8),
150 `btrfs-quota`(8),
151 `btrfs-receive`(8),
152 `btrfs-replace`(8),
153 `btrfs-rescue`(8),
154 `btrfs-restore`(8),
155 `btrfs-scrub`(8),
156 `btrfs-send`(8),
157 `btrfs-subvolume`(8),
158 `btrfstune`(8),
159 `mkfs.btrfs`(8)