summaryrefslogtreecommitdiff
path: root/Documentation/btrfs.8
blob: 21e7858d62912bf020be08c29e47871842afadb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
'\" t
.\"     Title: btrfs
.\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: 01/23/2019
.\"    Manual: Btrfs Manual
.\"    Source: Btrfs v4.20.1
.\"  Language: English
.\"
.TH "BTRFS" "8" "01/23/2019" "Btrfs v4\&.20\&.1" "Btrfs Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
btrfs \- a toolbox to manage btrfs filesystems
.SH "SYNOPSIS"
.sp
\fBbtrfs\fR \fI<command>\fR [\fI<args>\fR]
.SH "DESCRIPTION"
.sp
The \fBbtrfs\fR utility is a toolbox for managing btrfs filesystems\&. There are command groups to work with subvolumes, devices, for whole filesystem or other specific actions\&. See section \fBCOMMANDS\fR\&.
.sp
There are also standalone tools for some tasks like \fBbtrfs\-convert\fR or \fBbtrfstune\fR that were separate historically and/or haven\(cqt been merged to the main utility\&. See section \fISTANDALONE TOOLS\fR for more details\&.
.sp
For other topics (mount options, etc) please refer to the separate manual page \fBbtrfs\fR(5)\&.
.SH "COMMAND SYNTAX"
.sp
Any command name can be shortened so long as the shortened form is unambiguous, however, it is recommended to use full command names in scripts\&. All command groups have their manual page named \fBbtrfs\-\fR\fB\fI<group>\fR\fR\&.
.sp
For example: it is possible to run \fBbtrfs sub snaps\fR instead of \fBbtrfs subvolume snapshot\fR\&. But \fBbtrfs file s\fR is not allowed, because \fBfile s\fR may be interpreted both as \fBfilesystem show\fR and as \fBfilesystem sync\fR\&.
.sp
If the command name is ambiguous, the list of conflicting options is printed\&.
.sp
For an overview of a given command use \fIbtrfs command \-\-help\fR or \fIbtrfs [command\&...] \-\-help \-\-full\fR to print all available options\&.
.SH "COMMANDS"
.PP
\fBbalance\fR
.RS 4
Balance btrfs filesystem chunks across single or several devices\&.

See
\fBbtrfs\-balance\fR(8) for details\&.
.RE
.PP
\fBcheck\fR
.RS 4
Do off\-line check on a btrfs filesystem\&.

See
\fBbtrfs\-check\fR(8) for details\&.
.RE
.PP
\fBdevice\fR
.RS 4
Manage devices managed by btrfs, including add/delete/scan and so on\&.

See
\fBbtrfs\-device\fR(8) for details\&.
.RE
.PP
\fBfilesystem\fR
.RS 4
Manage a btrfs filesystem, including label setting/sync and so on\&.

See
\fBbtrfs\-filesystem\fR(8) for details\&.
.RE
.PP
\fBinspect\-internal\fR
.RS 4
Debug tools for developers/hackers\&.

See
\fBbtrfs\-inspect\-internal\fR(8) for details\&.
.RE
.PP
\fBproperty\fR
.RS 4
Get/set a property from/to a btrfs object\&.

See
\fBbtrfs\-property\fR(8) for details\&.
.RE
.PP
\fBqgroup\fR
.RS 4
Manage quota group(qgroup) for btrfs filesystem\&.

See
\fBbtrfs\-qgroup\fR(8) for details\&.
.RE
.PP
\fBquota\fR
.RS 4
Manage quota on btrfs filesystem like enabling/rescan and etc\&.

See
\fBbtrfs\-quota\fR(8) and
\fBbtrfs\-qgroup\fR(8) for details\&.
.RE
.PP
\fBreceive\fR
.RS 4
Receive subvolume data from stdin/file for restore and etc\&.

See
\fBbtrfs\-receive\fR(8) for details\&.
.RE
.PP
\fBreplace\fR
.RS 4
Replace btrfs devices\&.

See
\fBbtrfs\-replace\fR(8) for details\&.
.RE
.PP
\fBrescue\fR
.RS 4
Try to rescue damaged btrfs filesystem\&.

See
\fBbtrfs\-rescue\fR(8) for details\&.
.RE
.PP
\fBrestore\fR
.RS 4
Try to restore files from a damaged btrfs filesystem\&.

See
\fBbtrfs\-restore\fR(8) for details\&.
.RE
.PP
\fBscrub\fR
.RS 4
Scrub a btrfs filesystem\&.

See
\fBbtrfs\-scrub\fR(8) for details\&.
.RE
.PP
\fBsend\fR
.RS 4
Send subvolume data to stdout/file for backup and etc\&.

See
\fBbtrfs\-send\fR(8) for details\&.
.RE
.PP
\fBsubvolume\fR
.RS 4
Create/delete/list/manage btrfs subvolume\&.

See
\fBbtrfs\-subvolume\fR(8) for details\&.
.RE
.SH "STANDALONE TOOLS"
.sp
New functionality could be provided using a standalone tool\&. If the functionality proves to be useful, then the standalone tool is declared obsolete and its functionality is copied to the main tool\&. Obsolete tools are removed after a long (years) depreciation period\&.
.sp
Tools that are still in active use without an equivalent in \fBbtrfs\fR:
.PP
\fBbtrfs\-convert\fR
.RS 4
in\-place conversion from ext2/3/4 filesystems to btrfs
.RE
.PP
\fBbtrfstune\fR
.RS 4
tweak some filesystem properties on a unmounted filesystem
.RE
.PP
\fBbtrfs\-select\-super\fR
.RS 4
rescue tool to overwrite primary superblock from a spare copy
.RE
.PP
\fBbtrfs\-find\-root\fR
.RS 4
rescue helper to find tree roots in a filesystem
.RE
.sp
Deprecated and obsolete tools:
.PP
\fBbtrfs\-debug\-tree\fR
.RS 4
moved to
\fBbtrfs inspect\-internal dump\-tree\fR\&. Removed from source distribution\&.
.RE
.PP
\fBbtrfs\-show\-super\fR
.RS 4
moved to
\fBbtrfs inspect\-internal dump\-super\fR, standalone removed\&.
.RE
.PP
\fBbtrfs\-zero\-log\fR
.RS 4
moved to
\fBbtrfs rescue zero\-log\fR, standalone removed\&.
.RE
.SH "EXIT STATUS"
.sp
\fBbtrfs\fR returns a zero exit status if it succeeds\&. Non zero is returned in case of failure\&.
.SH "AVAILABILITY"
.sp
\fBbtrfs\fR is part of btrfs\-progs\&. Please refer to the btrfs wiki \m[blue]\fBhttp://btrfs\&.wiki\&.kernel\&.org\fR\m[] for further details\&.
.SH "SEE ALSO"
.sp
\fBbtrfs\-balance\fR(8), \fBbtrfs\-check\fR(8), \fBbtrfs\-convert\fR(8), \fBbtrfs\-device\fR(8), \fBbtrfs\-filesystem\fR(8), \fBbtrfs\-inspect\-internal\fR(8), \fBbtrfs\-property\fR(8), \fBbtrfs\-qgroup\fR(8), \fBbtrfs\-quota\fR(8), \fBbtrfs\-receive\fR(8), \fBbtrfs\-replace\fR(8), \fBbtrfs\-rescue\fR(8), \fBbtrfs\-restore\fR(8), \fBbtrfs\-scrub\fR(8), \fBbtrfs\-send\fR(8), \fBbtrfs\-subvolume\fR(8), \fBbtrfstune\fR(8), \fBmkfs\&.btrfs\fR(8)