1
.TH BTRFS 8 "" "btrfs" "btrfs"
3
.\" Man page written by Goffredo Baroncelli <kreijack@inwind.it> (Feb 2010)
4
.\" Modified by Qu Wenruo <quwenruo@cn.fujitsu.com> (Jun 2013)
7
btrfs \- control a btrfs filesystem
9
\fBbtrfs\fP \fBsubvolume create\fP [-i \fI<qgroupid>\fP] [\fI<dest>\fP/]\fI<name>\fP
11
\fBbtrfs\fP \fBsubvolume delete\fP [\fIoptions\fP] \fI<subvolume>\fP [\fI<subvolume>...\fP]
13
\fBbtrfs\fP \fBsubvolume list\fP [\fIoptions\fP] [-G [+|-]\fIvalue\fP] [-C [+|-]\fIvalue\fP] [--sort=rootid,gen,ogen,path] \fI<path>\fP
15
\fBbtrfs\fP \fBsubvolume snapshot\fP [-r] \fI<source>\fP \fI<dest>\fP|[\fI<dest>\fP/]\fI<name>\fP
17
\fBbtrfs\fP \fBsubvolume get-default\fP\fI <path>\fP
19
\fBbtrfs\fP \fBsubvolume set-default\fP\fI <id> <path>\fP
21
\fBbtrfs\fP \fBsubvolume find-new\fP\fI <subvolume> <lastgen>\fP
23
\fBbtrfs\fP \fBsubvolume show\fP\fI <path>\fP
26
\fBbtrfs\fP \fBfilesystem df\fP\fI <path>\fP
28
\fBbtrfs\fP \fBfilesystem show\fP [\fI--mounted\fP|\fI--all-devices\fP|\fI<uuid>\fP]\fP
30
\fBbtrfs\fP \fBfilesystem sync\fP\fI <path> \fP
32
\fBbtrfs\fP \fBfilesystem defragment\fP [\fIoptions\fP] \fI<file>\fP|\fI<dir>\fP [\fI<file>\fP|\fI<dir>...\fP]\fP
34
\fBbtrfs\fP \fBfilesystem resize\fP [\fIdevid\fP:][+/\-]\fI<size>\fP[gkm]|[\fIdevid\fP:]\fImax <path>\fP
36
\fBbtrfs\fP \fBfilesystem label\fP [\fI<device>\fP|\fI<mount_point>\fP] [\fI<newlabel>\fP]
39
\fBbtrfs\fP \fB[filesystem] balance start\fP [\fIoptions\fP] \fI<path>\fP
41
\fBbtrfs\fP \fB[filesystem] balance pause\fP\fI <path>\fP
43
\fBbtrfs\fP \fB[filesystem] balance cancel\fP\fI <path>\fP
45
\fBbtrfs\fP \fB[filesystem] balance resume\fP\fI <path>\fP
47
\fBbtrfs\fP \fB[filesystem] balance status\fP [-v] \fI<path>\fP
50
\fBbtrfs\fP \fBdevice add\fP [-Kf] \fI<device>\fP [\fI<device>...\fP] \fI<path>\fP
52
\fBbtrfs\fP \fBdevice delete\fP \fI<device>\fP [\fI<device>...\fP] \fI<path>\fP
54
\fBbtrfs\fP \fBdevice scan\fP [\fI--all-devices\fP|\fI<device> \P[\fI<device>...\fP]
56
\fBbtrfs\fP \fBdevice ready\fP\fI <device>\fP
58
\fBbtrfs\fP \fBdevice stats\fP [-z] {\fI<path>\fP|\fI<device>\fP}
61
\fBbtrfs\fP \fBscrub start\fP [-BdqrRf] [-c \fIioprio_class\fP -n \fIioprio_classdata\fP] {\fI<path>\fP|\fI<device>\fP}
63
\fBbtrfs\fP \fBscrub cancel\fP {\fI<path>\fP|\fI<device>\fP}
65
\fBbtrfs\fP \fBscrub resume\fP [-BdqrR] [-c \fIioprio_class\fP -n \fIioprio_classdata\fP] {\fI<path>\fP|\fI<device>\fP}
67
\fBbtrfs\fP \fBscrub status\fP [-d] {\fI<path>\fP|\fI<device>\fP}
70
\fBbtrfs\fP \fBcheck\fP [\fIoptions\fP] \fI<device>\fP
72
\fBbtrfs\fP \fBrescue chunk-recover\fP [\fIoptions\fP] \fI<path>\fP
74
\fBbtrfs\fP \fBrescue super-recover\fP [\fIoptions\fP] \fI<path>\fP
76
\fBbtrfs\fP \fBrestore\fP [\fIoptions\fP] \fI<device>\fP
79
\fBbtrfs\fP \fBinspect-internal inode-resolve\fP [-v] \fI<inode>\fP \fI<path>\fP
81
\fBbtrfs\fP \fBinspect-internal logical-resolve\fP [-Pv] [-s \fI<size>\fP] \fI<logical>\fP \fI<path>\fP
83
\fBbtrfs\fP \fBinspect-internal subvolid-resolve\fP \fI<subvolid>\fP \fI<path>\fP
85
\fBbtrfs\fP \fBinspect-internal rootid\fP \fI<path>\fP
88
\fBbtrfs\fP \fBsend\fP [-ve] [-p \fI<parent>\fP] [-c \fI<clone-src>\fP] [-f \fI<outfile>\fP] \fI<subvol>\fP [\fI<subvol>\fP...]
90
\fBbtrfs\fP \fBreceive\fP [-ve] [-f \fI<infile>\fP] \fI<mount>\fP
93
\fBbtrfs\fP \fBquota enable\fP\fI <path>\fP
95
\fBbtrfs\fP \fBquota disable\fP\fI <path>\fP
97
\fBbtrfs\fP \fBquota rescan\fP [-s] \fI<path>\fP
100
\fBbtrfs\fP \fBqgroup assign\fP \fI<src>\fP \fI<dst>\fP \fI<path>\fP
102
\fBbtrfs\fP \fBqgroup remove\fP \fI<src>\fP \fI<dst>\fP \fI<path>\fP
104
\fBbtrfs\fP \fBqgroup create\fP \fI<qgroupid>\fP \fI<path>\fP
106
\fBbtrfs\fP \fBqgroup destroy\fP \fI<qgroupid>\fP \fI<path>\fP
108
\fBbtrfs\fP \fBqgroup show\fP \fI<path>\fP
110
\fBbtrfs\fP \fBqgroup limit\fP [\fIoptions\fP] \fI<size>\fP|\fBnone\fP [\fI<qgroupid>\fP] \fI<path>\fP
113
\fBbtrfs\fP \fBreplace start\fP [-Bfr] \fI<srcdev>\fP|\fI<devid> <targetdev> <mount_point>\fP
115
\fBbtrfs\fP \fBreplace status\fP [-1] \fI<mount_point>\fP
117
\fBbtrfs\fP \fBreplace cancel\fP \fI<mount_point>\fP
119
\fBbtrfs\fP \fBhelp|\-\-help \fP
121
\fBbtrfs\fP \fB<command> \-\-help \fP
125
is used to control the filesystem and the files and directories stored. It is
126
the tool to create or destroy a snapshot or a subvolume for the
127
filesystem, to defrag a file or a directory, flush the data to the disk,
128
to resize the filesystem, to scan the device.
130
It is possible to abbreviate the commands unless the commands are ambiguous.
131
For example: it is possible to run
134
.I btrfs subvolume snapshot.
137
is not allowed, because
139
may be interpreted both as
145
returns filesystem sync
146
If a command is terminated by
148
, the detailed help is showed. If the passed command matches more commands,
149
detailed help of all the matched commands is showed. For example
151
shows the help of all
158
\fBsubvolume create\fP [-i \fI<qgroupid>\fP] [\fI<dest>\fP/]\fI<name>\fP
159
Create a subvolume \fI<name>\fR in \fI<dest>\fR.
160
If \fI<dest>\fR is not given subvolume \fI<name>\fR will be created in the
165
.IP "\fB-i\fP \fI<qgroupid>\fR" 5
166
Add the newly created subvolume to a qgroup. This option can be given multiple
171
\fBsubvolume delete\fR [\fIoptions\fP] \fI<subvolume>\fP [\fI<subvolume>...\fP]\fR
172
Delete the subvolume(s) from the filesystem. If \fI<subvolume>\fR is not a
173
subvolume, \fBbtrfs\fR returns an error but continues if there are more arguments
176
The corresponding directory is removed instantly but the data blocks are
177
removed later. The deletion does not involve full commit by default due to
178
performance reasons (as a consequence, the subvolume may appear again after a
179
crash). Use one of the --commit options to wait until the operation is safely
184
.IP "\fB-c|--commit-after\fP" 5
185
wait for transaction commit at the end of the operation
186
.IP "\fB-C|--commit-each\fP" 5
187
wait for transaction commit after deleting each subvolume
191
\fBsubvolume list\fR [\fIoptions\fP] [-G [+|-]\fIvalue\fP] [-C [+|-]\fIvalue\fP] [--sort=rootid,gen,ogen,path] \fI<path>\fR
193
List the subvolumes present in the filesystem \fI<path>\fR. For every
194
subvolume the following information is shown by default.
195
ID \fI<ID>\fP top level \fI<ID>\fP path \fI<path>\fP
196
where path is the relative path of the subvolume to the \fItop level\fR
199
The subvolume's ID may be used by the \fBsubvolume set-default\fR command, or
200
at mount time via the \fIsubvolid=\fR option.
201
If \fI-p\fR is given, then \fIparent <ID>\fR is added to the output between ID
202
and top level. The parent's ID may be used at mount time via the
203
\fIsubvolrootid=\fR option.
210
print all the subvolumes in the filesystem and distinguish between
211
absolute and relative path with respect to the given \fI<path>\fP.
213
print the ogeneration of the subvolume, aliases: ogen or origin generation.
215
print the generation of the subvolume.
217
print only subvolumes bellow specified <path>.
219
print the UUID of the subvolume.
221
print the parent uuid of subvolumes (and snapshots).
223
print the result as a table.
225
only snapshot subvolumes in the filesystem will be listed.
227
only readonly subvolumes in the filesystem will be listed.
228
.IP "\fB-G [+|-]\fIvalue\fP\fP" 5
229
list subvolumes in the filesystem that its generation is
230
>=, <= or = \fIvalue\fP. '+' means >= \fIvalue\fP, '-' means <= \fIvalue\fP, If there is
231
neither '+' nor '-', it means = \fIvalue\fP.
232
.IP "\fB-C [+|-]\fIvalue\fP" 5
233
list subvolumes in the filesystem that its ogeneration is
234
>=, <= or = \fIvalue\fP. The usage is the same to '-g' option.
235
.IP "\fB--sort=rootid,gen,ogen,path\fP" 5
236
list subvolumes in order by specified items.
237
you can add '+' or '-' in front of each items, '+' means ascending, '-'
238
means descending. The default is ascending.
240
for \fB--sort\fP you can combine some items together by ',', just like
241
\f--sort=+ogen,-gen,path,rootid\fR.
245
\fBsubvolume snapshot\fP [-r] \fI<source>\fP \fI<dest>\fP|[\fI<dest>\fP/]\fI<name>\fP
246
Create a writable/readonly snapshot of the subvolume \fI<source>\fR with the
247
name \fI<name>\fR in the \fI<dest>\fR directory.
248
If only \fI<dest>\fR is given, the subvolume will be named the basename of \fI<source>\fR.
249
If \fI<source>\fR is not a subvolume, \fBbtrfs\fR returns an error.
250
If \fI-r\fR is given, the snapshot will be readonly.
253
\fBsubvolume get-default\fR\fI <path>\fR
254
Get the default subvolume of the filesystem \fI<path>\fR. The output format
255
is similar to \fBsubvolume list\fR command.
258
\fBsubvolume set-default\fR\fI <id> <path>\fR
259
Set the subvolume of the filesystem \fI<path>\fR which is mounted as
260
\fIdefault\fR. The subvolume is identified by \fI<id>\fR, which
261
is returned by the \fBsubvolume list\fR command.
264
\fBsubvolume find-new\fR\fI <subvolume> <last_gen>\fR
265
List the recently modified files in a subvolume, after \fI<last_gen>\fR ID.
268
\fBsubvolume show\fR\fI <path>\fR
269
Show information of a given subvolume in the \fI<path>\fR.
272
\fBfilesystem df\fP\fI <path>\fR
273
Show space usage information for a mount point.
276
\fBfilesystem show\fR [\fI--mounted\fP|\fI--all-devices\fP|\fI<uuid>\fR]\fR
277
Show the btrfs filesystem with some additional info. If no option or \fIUUID\fP
278
is passed, \fBbtrfs\fR shows information of all the btrfs filesystem both mounted
280
If \fB--mounted\fP is passed, it would probe btrfs kernel to list mounted btrfs filesystem(s);
281
If \fB--all-devices\fP is passed, all the devices under /dev are scanned;
282
otherwise the devices list is extracted from the /proc/partitions file.
285
\fBfilesystem sync\fR\fI <path> \fR
286
Force a sync for the filesystem identified by \fI<path>\fR.
289
\fBfilesystem defragment\fP [\fIoptions\fP] \fI<file>\fP|\fI<dir>\fP [\fI<file>\fP|\fI<dir>...\fP]\fP
290
Defragment file data and/or directory metadata. If \fB-r\fP is passed,
291
files in \fIdir\fR will be defragmented recursively.
294
The start position and the number of bytes to defragment can be specified by
295
\fIstart\fR and \fIlen\fR. Any extent bigger than threshold will be
296
considered already defragged. Use 0 to take the kernel default, and use 1 to
297
say every single extent must be rewritten. You can also turn on compression in
298
defragment operations.
305
compress file contents while defragmenting
307
defragment files recursively
309
flush filesystem after defragmenting
310
.IP "\fB-s \fIstart\fP\fP" 5
311
defragment only from byte \fIstart\fR onward
312
.IP "\fB-l \fIlen\fP\fP" 5
313
defragment only up to \fIlen\fR bytes
314
.IP "\fB-t \fIsize\fP\fP" 5
315
defragment only files at least \fIsize\fR bytes big
317
For \fBstart\fP, \fBlen\fP, \fBsize\fP it is possible to append a suffix
318
like \fBk\fP for 1 KBytes, \fBm\fP for 1 MBytes...
320
NOTE: defragmenting with kernels up to 2.6.37 will unlink COW-ed copies of data,
321
don't use it if you use snapshots, have de-duplicated your data or made
322
copies with \fBcp --reflink\fP.
327
.\" Some wording are extracted by the resize2fs man page
329
\fBfilesystem resize\fP [\fIdevid\fP:][+/\-]\fI<size>\fP[gkm]|[\fIdevid\fP:]\fImax <path>\fR
330
Resize a filesystem identified by \fI<path>\fR for the underlying device
331
\fIdevid\fR. The \fIdevid\fR can be found with \fBbtrfs filesystem show\fR and
332
defaults to 1 if not specified.
333
The \fI<size>\fR parameter specifies the new size of the filesystem.
334
If the prefix \fI+\fR or \fI\-\fR is present the size is increased or decreased
335
by the quantity \fI<size>\fR.
336
If no units are specified, the unit of the \fI<size>\fR parameter defaults to
337
bytes. Optionally, the size parameter may be suffixed by one of the following
338
units designators: 'K', 'M', or 'G', kilobytes, megabytes, or gigabytes,
341
If 'max' is passed, the filesystem will occupy all available space on the
344
The \fBresize\fR command \fBdoes not\fR manipulate the size of underlying
345
partition. If you wish to enlarge/reduce a filesystem, you must make sure you
346
can expand the partition before enlarging the filesystem and shrink the
347
partition after reducing the size of the filesystem. This can done using
348
\fBfdisk(8)\fR or \fBparted(8)\fR to delete the existing partition and recreate
349
it with the new desired size. When recreating the partition make sure to use
350
the same starting disk cylinder as before.
353
\fBfilesystem label\fP [\fI<dev>\fP|\fI<mount_point>\fP] [\fInewlabel\fP]\fP
354
Show or update the label of a filesystem. \fI[<device>|<mountpoint>]\fR is used
355
to identify the filesystem.
356
If a \fInewlabel\fR optional argument is passed, the label is changed. The
357
following constraints exist for a label:
359
- the maximum allowable length shall be less than 256 chars
362
\fB[filesystem] balance start\fR [\fIoptions\fP] \fI<path>\fR
363
Balance chunks across the devices
364
Balance and/or convert (change allocation profile of) chunks that
365
passed all \fIfilters\fR in a comma-separated list of filters for a
366
particular chunk type.
367
If filter list is not given balance all chunks of that type.
368
In case none of the \fI-d\fR, \fI-m\fR or \fI-s\fR options is
369
given balance all chunks in a filesystem.
373
.IP "\fB-d[\fIfilters\fP]\fR" 5
375
.IP "\fB-m[\fIfilters\fP]\fR" 5
376
act on metadata chunks
377
.IP "\fB-s[\fIfilters\fP]\fR" 5
378
act on system chunks (only under -f)
382
force reducing of metadata integrity
386
\fB[filesystem] balance pause\fR\fI <path>\fR
387
Pause running balance.
390
\fB[filesystem] balance cancel\fR\fI <path>\fR
391
Cancel running or paused balance.
394
\fB[filesystem] balance resume\fR\fI <path>\fR
395
Resume interrupted balance.
398
\fB[filesystem] balance status\fR [-v] \fI<path>\fR
399
Show status of running or paused balance.
408
\fBdevice add\fR\fI [-Kf] <dev> \fP[\fI<dev>...\fP] \fI<path>\fR
409
Add device(s) to the filesystem identified by \fI<path>\fR.
410
If applicable, a whole device discard (TRIM) operation is performed.
414
.IP "\fB-K|--nodiscard\fP" 5
415
do not perform discard by default
416
.IP "\fB-f|--force\fP" 5
417
force overwrite of existing filesystem on the given disk(s)
421
\fBdevice delete\fR\fI <dev> \fP[\fI<dev>...\fP] \fI<path>\fR
422
Remove device(s) from a filesystem identified by \fI<path>\fR.
425
\fBdevice scan\fR [--all-devices|\fI<device> \fP[\fI<device>...\fP]\fR
426
If one or more devices are passed, these are scanned for a btrfs filesystem.
427
If no devices are passed, \fBbtrfs\fR uses block devices containing btrfs
428
filesystem as listed by blkid.
429
Finally, if \fB--all-devices\fP is passed, all the devices under /dev are
433
\fBdevice ready\fR \fI<device>\fR
434
Check device to see if it has all of it's devices in cache for mounting.
437
\fBdevice stats\fP [-z] {\fI<path>\fP|\fI<device>\fP}
438
Read and print the device IO stats for all devices of the filesystem
439
identified by \fI<path>\fR or for a single \fI<device>\fR.
444
Reset stats to zero after reading them.
448
\fBscrub start\fP [-BdqrR] [-c \fIioprio_class\fP -n \fIioprio_classdata\fP] {\fI<path>\fP|\fI<device>\fP}
449
Start a scrub on all devices of the filesystem identified by \fI<path>\fR or on
450
a single \fI<device>\fR. Without options, scrub is started as a background
451
process. Progress can be obtained with the \fBscrub status\fR command. Scrubbing
452
involves reading all data from all disks and verifying checksums. Errors are
453
corrected along the way if possible.
455
The default IO priority of scrub is the idle class. The priority can be configured similar to the
462
Do not background and print scrub statistics when finished.
464
Print separate statistics for each device of the filesystem (-B only).
466
Quiet. Omit error messages and statistics.
468
Read only mode. Do not attempt to correct anything.
470
Raw print mode. Print full data instead of summary.
471
.IP "\fB-c \fIioprio_class\fP" 5
472
Set IO priority class (see
475
.IP "\fB-n \fIioprio_classdata\fP" 5
476
Set IO priority classdata (see
480
force to check whether scrub has started or resumed in userspace.
481
this is useful when scrub stat record file is damaged.
485
\fBscrub cancel\fP {\fI<path>\fP|\fI<device>\fP}
486
If a scrub is running on the filesystem identified by \fI<path>\fR, cancel it.
487
Progress is saved in the scrub progress file and scrubbing can be resumed later
488
using the \fBscrub resume\fR command.
489
If a \fI<device>\fR is given, the corresponding filesystem is found and
490
\fBscrub cancel\fP behaves as if it was called on that filesystem.
493
\fBscrub resume\fP [-BdqrR] [-c ioprio_class -n ioprio_classdata] {\fI<path>\fP|\fI<device>\fP}
494
Resume a canceled or interrupted scrub cycle on the filesystem identified by
495
\fI<path>\fR or on a given \fI<device>\fR. Does not start a new scrub if the
496
last scrub finished successfully.
501
see \fBscrub start\fP.
505
\fBscrub status\fP [-d] {\fI<path>\fP|\fI<device>\fP}
506
Show status of a running scrub for the filesystem identified by \fI<path>\fR or
507
for the specified \fI<device>\fR.
508
If no scrub is running, show statistics of the last finished or canceled scrub
509
for that filesystem or device.
514
Print separate statistics for each device of the filesystem.
518
\fBcheck\fR [\fIoptions\fP] <device>\fR
519
Check an unmounted btrfs filesystem.
523
.IP "\fB-s|--support \fI<superblock>\fP\fR" 5
524
use this superblock copy.
525
.IP "\fB--repair\fP" 5
526
try to repair the filesystem.
527
.IP "\fB--init-csum-tree\fP" 5
528
create a new CRC tree.
529
.IP "\fB--init-extent-tree\fP" 5
530
create a new extent tree.
534
\fBrescue chunk-recover\fR [\fIoptions\fP] <device>\fR
535
Recover the chunk tree by scanning the devices one by one.
540
assume an answer of 'yes' to all questions.
548
\fBrescue super-recover\fR [\fIoptions\fP] <device>\fR
549
Recover bad superblocks from good copies.
554
assume an answer of 'yes' to all questions.
560
\fBrestore\fR [\fIoptions\fP] <device>\fR
561
Try to restore files from a damaged filesystem(unmounted).
568
get extended attributes.
575
.IP "\fB-t \fI<location>\fP\fP" 5
577
.IP "\fB-f \fI<offset>\fP\fP" 5
579
.IP "\fB-u \fI<block>\fP\fP" 5
581
.IP "\fB-r \fI<rootid>\fP\fP" 5
590
\fBinspect-internal inode-resolve\fP [-v] \fI<inode>\fP \fI<path>\fP
591
Resolves an <inode> in subvolume <path> to all filesystem paths.
596
verbose mode. print count of returned paths and ioctl() return value
600
\fBinspect-internal logical-resolve\fP [-Pv] [-s bufsize] \fI<logical>\fP \fI<path>\fP
601
Resolves a <logical> address in the filesystem mounted at <path> to all inodes.
602
By default, each inode is then resolved to a file system path (similar to the
603
\fBinode-resolve\fP subcommand).
608
skip the path resolving and print the inodes instead
610
verbose mode. print count of returned paths and all ioctl() return values
611
.IP "\fB-s \fI<bufsize>\fP" 5
612
set inode container's size. This is used to increase inode container's size in case it is
613
not enough to read all the resolved results. The max value one can set is 64k.
617
\fBinspect-internal subvolid-resolve\fP \fI<subvolid> <path>\fP
618
Get file system paths for the given subvolume ID.
621
\fBinspect-internal rootid\fP \fI<path>\fP
622
For a given file or directory, return the containing tree root id. For a
623
subvolume return it's own tree id.
625
The result is undefined for the so-called empty subvolumes (identified by inode number 2).
628
\fBsend\fP [-ve] [-p \fI<parent>\fP] [-c \fI<clone-src>\fP] [-f \fI<outfile>\fP] \fI<subvol>\fP [\fI<subvol>...\fP]
629
Send the subvolume(s) to stdout.
630
Sends the subvolume(s) specified by \fI<subvol>\fR to stdout.
631
By default, this will send the whole subvolume. To do an incremental
632
send, use '\fI-p <parent>\fR'. If you want to allow btrfs to clone from
633
any additional local snapshots, use '\fI-c <clone-src>\fR' (multiple times
634
where applicable). You must not specify clone sources unless you
635
guarantee that these snapshots are exactly in the same state on both
636
sides, the sender and the receiver. It is allowed to omit the '\fI-p <parent>\fR'
637
option when '\fI-c <clone-src>\fR' options are given, in
638
which case '\fBbtrfs send\fP' will determine a suitable parent among the
639
clone sources itself.
644
Enable verbose debug output. Each occurrence of this option increases the
647
If sending multiple subvols at once, use the new format and omit the <end cmd> between the subvols.
648
.IP "\fB-p \fI<parent>\fP" 5
649
Send an incremental stream from \fI<parent>\fR to \fI<subvol>\fR.
650
.IP "\fB-c \fI<clone-src>\fP" 5
651
Use this snapshot as a clone source for an incremental send (multiple allowed).
652
.IP "\fB-f \fI<outfile>\fP" 5
653
Output is normally written to stdout. To write to a file, use this option.
654
An alternative would be to use pipes.
658
\fBreceive\fP [-ve] [-f \fI<infile>\fR] \fI<mount>\fR
659
Receive subvolumes from stdin.
660
Receives one or more subvolumes that were previously
661
sent with btrfs send. The received subvolumes are stored
663
btrfs receive will fail with the following case:
665
1.a receiving subvolume already exists.
667
2.a previously received subvolume was changed after it was received.
669
3.default subvolume is changed or you don't mount btrfs filesystem with
672
After receiving a subvolume, it is immediately set to read only.
677
Enable verbose debug output. Each occurrence of this option increases the
679
.IP "\fB-f \fI<infile>\fR" 5
680
By default, btrfs receive uses stdin to receive the subvolumes.
681
Use this option to specify a file to use instead.
683
Terminate after receiving an <end cmd> in the data stream.
684
Without this option, the receiver terminates only if an error is recognized or on EOF.
688
\fBquota enable\fR \fI<path>\fR
689
Enable subvolume quota support for a filesystem.
692
\fBquota disable\fR \fI<path>\fR
693
Disable subvolume quota support for a filesystem.
696
\fBquota rescan\fR [-s] \fI<path>\fR
697
Trash all qgroup numbers and scan the metadata again with the current config.
702
show status of a running rescan operation.
706
\fBqgroup assign\fP \fI<src> <dst> <path>\fP
707
Enable subvolume qgroup support for a filesystem.
710
\fBqgroup remove\fP \fI<src> <dst> <path>\fP
711
Remove a subvol from a quota group.
714
\fBqgroup create\fP \fI<qgroupid> <path>\fP
715
Create a subvolume quota group.
718
\fBqgroup destroy\fP \fI<qgroupid> <path>\fP
719
Destroy a subvolume quota group.
722
\fBqgroup show\fP \fI<path>\fP
723
Show all subvolume quota groups.
726
\fBqgroup limit\fP [\fIoptions\fP] \fI<size>\fP|\fBnone\fP [\fI<qgroupid>\fP] \fI<path>\fP
727
Limit the size of a subvolume quota group.
730
\fBreplace start\fR [-Bfr] \fI<srcdev>\fP|\fI<devid> <targetdev> <path>\fR
731
Replace device of a btrfs filesystem.
732
On a live filesystem, duplicate the data to the target device which
733
is currently stored on the source device. If the source device is not
734
available anymore, or if the \fB-r\fR option is set, the data is built
735
only using the RAID redundancy mechanisms. After completion of the
736
operation, the source device is removed from the filesystem.
737
If the \fI<srcdev>\fR is a numerical value, it is assumed to be the device id
738
of the filesystem which is mounted at mount_point, otherwise is is
739
the path to the source device. If the source device is disconnected,
740
from the system, you have to use the \fIdevid\fR parameter format.
741
The \fI<targetdev>\fP needs to be same size or larger than the \fI<srcdev>\fR.
746
only read from \fI<srcdev>\fR if no other zero-defect mirror exists (enable
747
this if your drive has lots of read errors, the access would be very slow)
749
force using and overwriting \fI<targetdev>\fR even if it looks like
750
containing a valid btrfs filesystem. A valid filesystem is
751
assumed if a btrfs superblock is found which contains a
752
correct checksum. Devices which are currently mounted are
753
never allowed to be used as the \fI<targetdev>\fR
759
\fBreplace status\fR [-1] \fI<mount_point>\fR
760
Print status and progress information of a running device replace operation.
765
print once instead of print continuously until the replace
766
operation finishes (or is canceled)
770
\fBreplace cancel\fR \fI<mount_point>\fR
771
Cancel a running device replace operation.
775
\fBbtrfs\fR returns a zero exist status if it succeeds. Non zero is returned in
780
is part of btrfs-progs. Btrfs filesystem is currently under heavy development,
781
and not suitable for any uses other than benchmarking and review.
782
Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for