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