btrfs-progs: docs: mkfs, implications of DUP on devices
[platform/upstream/btrfs-progs.git] / Documentation / btrfs.asciidoc
1 btrfs(8)
2 ========
3
4 NAME
5 ----
6 btrfs - control a btrfs filesystem
7
8 SYNOPSIS
9 --------
10 *btrfs* <command> [<args>]
11
12 DESCRIPTION
13 -----------
14 *btrfs* is used to control the filesystem and the files and directories stored.
15 It is the tool to create or destroy a snapshot or a subvolume for the
16 filesystem, to defrag a file or a directory, flush the data to the disk,
17 to resize the filesystem, to scan the device.
18
19 It is possible to abbreviate the commands unless the commands are ambiguous.
20 For example: it is possible to run *btrfs sub snaps* instead of
21 *btrfs subvolume snapshot*.
22 But *btrfs file s* is not allowed, because *file s* may be interpreted
23 both as *filesystem show* and as *filesystem sync*.
24
25 If a command is terminated by '--help', the detailed help is showed.
26 If the passed command matches more commands,
27 detailed help of all the matched commands is showed. For example
28 *btrfs dev --help* shows the help of all *device** commands.
29
30 COMMANDS
31 --------
32 *balance*::
33         Balance btrfs filesystem chunks across single or several devices. +
34         See `btrfs-balance`(8) for details.
35
36 *check*::
37         Do off-line check on a btrfs filesystem. +
38         See `btrfs-check`(8) for details.
39
40 *device*::
41         Manage devices managed by btrfs, including add/delete/scan and so
42         on. +
43         See `btrfs-device`(8) for details.
44
45 *filesystem*::
46         Manage a btrfs filesystem, including label setting/sync and so on. +
47         See `btrfs-filesystem`(8) for details.
48
49 *inspect-internal*::
50         Debug tools for developers/hackers. +
51         See `btrfs-inspect-internal`(8) for details.
52
53 *property*::
54         Get/set a property from/to a btrfs object. +
55         See `btrfs-property`(8) for details.
56
57 *qgroup*::
58         Manage quota group(qgroup) for btrfs filesystem. +
59         See `btrfs-qgroup`(8) for details.
60
61 *quota*::
62         Manage quota on btrfs filesystem like enabling/rescan and etc. +
63         See `btrfs-quota`(8) and `btrfs-qgroup`(8) for details.
64
65 *receive*::
66         Receive subvolume data from stdin/file for restore and etc. +
67         See `btrfs-receive`(8) for details.
68
69 *replace*::
70         Replace btrfs devices. +
71         See `btrfs-replace`(8) for details.
72
73 *rescue*::
74         Try to rescue damaged btrfs filesystem. +
75         See `btrfs-rescue`(8) for details.
76
77 *restore*::
78         Try to restore files from a damaged btrfs filesystem. +
79         See `btrfs-restore`(8) for details.
80
81 *scrub*::
82         Scrub a btrfs filesystem. +
83         See `btrfs-scrub`(8) for details.
84
85 *send*::
86         Send subvolume data to stdout/file for backup and etc. +
87         See `btrfs-send`(8) for details.
88
89 *subvolume*::
90         Create/delete/list/manage btrfs subvolume. +
91         See `btrfs-subvolume`(8) for details.
92
93 EXIT STATUS
94 -----------
95 *btrfs* returns a zero exit status if it succeeds. Non zero is returned in
96 case of failure.
97
98 AVAILABILITY
99 ------------
100 *btrfs* is part of btrfs-progs.
101 Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for
102 further details.
103
104 SEE ALSO
105 --------
106 `mkfs.btrfs`(8), `ionice`(1),
107 `btrfs-balance`(8),
108 `btrfs-check`(8),
109 `btrfs-device`(8),
110 `btrfs-filesystem`(8),
111 `btrfs-inspect-internal`(8),
112 `btrfs-property`(8),
113 `btrfs-qgroup`(8),
114 `btrfs-quota`(8),
115 `btrfs-receive`(8),
116 `btrfs-replace`(8),
117 `btrfs-rescue`(8),
118 `btrfs-restore`(8),
119 `btrfs-scrub`(8),
120 `btrfs-send`(8),
121 `btrfs-subvolume`(8),