Debian Codegraph @

upstream/debian-trixie/man8/btrfstune.8

raw
1 .\" Man page generated from reStructuredText.
2 .
3 .
4 .nr rst2man-indent-level 0
5 .
6 .de1 rstReportMargin
7 \\$1 \\n[an-margin]
8 level \\n[rst2man-indent-level]
9 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
10 -
11 \\n[rst2man-indent0]
12 \\n[rst2man-indent1]
13 \\n[rst2man-indent2]
14 ..
15 .de1 INDENT
16 .\" .rstReportMargin pre:
17 . RS \\$1
18 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
19 . nr rst2man-indent-level +1
20 .\" .rstReportMargin post:
21 ..
22 .de UNINDENT
23 . RE
24 .\" indent \\n[an-margin]
25 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
26 .nr rst2man-indent-level -1
27 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
28 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
29 ..
30 .TH "BTRFSTUNE" "8" "May 18, 2026" "7.0" "BTRFS"
31 .SH NAME
32 btrfstune \- tune various filesystem parameters
33 .SH SYNOPSIS
34 .sp
35 \fBbtrfstune\fP [options] <device> [<device>...]
36 .SH DESCRIPTION
37 .sp
38 \fBbtrfstune\fP can be used to enable, disable, or set various filesystem
39 parameters. The filesystem must be unmounted.
40 .sp
41 The common use case is to enable features that were not enabled at mkfs time.
42 Please make sure that you have kernel support for the features. You can find a
43 complete list of features and kernel version of their introduction at
44 \fI\%Feature by version\fP page. Also, the manual page
45 \fI\%mkfs.btrfs(8)\fP contains more details about the features.
46 .sp
47 Some of the features could be also enabled on a mounted filesystem by other
48 means. Please refer to the \fIFILESYSTEM FEATURES\fP in \fI\%btrfs(5)\fP\&.
49 .sp
50 \fBNOTE:\fP
51 .INDENT 0.0
52 .INDENT 3.5
53 \fBbtrfstune\fP requires the target filesystem to have no running replace
54 nor balance. Please finish/cancel the running replace/balance before using
55 \fBbtrfstune\fP\&.
56 .UNINDENT
57 .UNINDENT
58 .SH OPTIONS
59 .INDENT 0.0
60 .TP
61 .B \-\-convert\-to\-block\-group\-tree
62 (since kernel 6.1)
63 .sp
64 Convert portions of extent tree that tracks block groups to a separate
65 block group tree. This greatly reduces mount time. Can be also enabled
66 at mkfs time.
67 .TP
68 .B \-\-convert\-from\-block\-group\-tree
69 (since kernel 6.1)
70 .sp
71 Convert block groups tracked in standalone block group tree back to
72 extent tree and remove \fIblock\-group\-tree\fP feature bit from the filesystem.
73 .TP
74 .B \-\-convert\-to\-free\-space\-tree
75 (since kernel 4.5)
76 .sp
77 Convert to free\-space\-tree feature (v2 of space cache).
78 .TP
79 .B \-\-enable\-simple\-quota
80 (since kernel 6.7)
81 .sp
82 Enable simple quota accounting (\fIsquota\fP mkfs feature). This is an
83 alternative to qgroups with a smaller performance impact but no notion
84 of shared vs. exclusive usage.
85 .TP
86 .B \-\-remove\-simple\-quota
87 Remove simple quota accounting related structures.
88 .TP
89 .B \-f
90 Allow dangerous changes, e.g. clear the seeding flag or change fsid.
91 Make sure that you are aware of the dangers.
92 .TP
93 .B \-m
94 (since kernel: 5.0)
95 .sp
96 change fsid stored as \fImetadata_uuid\fP to a randomly generated UUID,
97 see also \fI\-U\fP
98 .UNINDENT
99 .INDENT 0.0
100 .TP
101 .BI \-M \ <UUID>
102 (since kernel: 5.0)
103 .sp
104 change fsid stored as \fImetadata_uuid\fP to a given UUID, see also \fI\-U\fP
105 .sp
106 The metadata_uuid is stored only in the superblock and is a backward
107 incompatible change. The fsid in metadata blocks remains unchanged and
108 is not overwritten, thus the whole operation is significantly faster
109 than \fI\-U\fP\&.
110 .sp
111 The new metadata_uuid can be used for mount by UUID and is also used to
112 identify devices of a multi\-device filesystem.
113 .TP
114 .B \-n
115 (since kernel: 3.14)
116 .sp
117 Enable no\-holes feature (more efficient representation of file holes),
118 enabled by mkfs feature \fIno\-holes\fP\&.
119 .TP
120 .B \-r
121 (since kernel: 3.7)
122 .sp
123 Enable extended inode refs (hardlink limit per file in a directory is
124 65536), enabled by mkfs feature \fIextref\fP\&.
125 .TP
126 .BI \-S \ <0|1>
127 Enable seeding on a given device. Value 1 will enable seeding, 0 will
128 disable it. A seeding filesystem is forced to be mounted read\-only. A
129 new device can be added to the filesystem and will capture all writes
130 keeping the seeding device intact. See also section
131 \fI\%SEEDING DEVICE\fP
132 in \fI\%btrfs(5)\fP\&.
133 .sp
134 \fBWARNING:\fP
135 .INDENT 7.0
136 .INDENT 3.5
137 Clearing the seeding flag on a device may be dangerous. If a
138 previously\-seeding device is changed, all filesystems that used
139 that device will become unmountable. Setting the seeding flag
140 back will not fix that.
141 .sp
142 A valid usecase is \fIseeding device as a base image\fP\&. Clear the
143 seeding flag, update the filesystem and make it seeding again,
144 provided that it\(aqs OK to throw away all filesystems built on
145 top of the previous base.
146 .UNINDENT
147 .UNINDENT
148 .TP
149 .B \-u
150 Change fsid to a randomly generated UUID or continue previous fsid
151 change operation in case it was interrupted.
152 .TP
153 .BI \-U \ <UUID>
154 Change fsid to \fIUUID\fP in all metadata blocks.
155 .sp
156 The \fIUUID\fP should be a 36 bytes string in \X'tty: link https://man7.org/linux/man-pages/man3/printf.3.html'\fI\%printf(3)\fP\X'tty: link' format
157 \fB%08x\-%04x\-%04x\-%04x\-%012x\fP\&.
158 If there is a previous unfinished fsid change, it will continue only if the
159 \fIUUID\fP matches the unfinished one or if you use the option \fI\-u\fP\&.
160 .sp
161 All metadata blocks are rewritten, this may take some time, but the final
162 filesystem compatibility is unaffected, unlike \fI\-M\fP\&.
163 .sp
164 \fBWARNING:\fP
165 .INDENT 7.0
166 .INDENT 3.5
167 Cancelling or interrupting a UUID change operation will make
168 the filesystem temporarily unmountable. To fix it, rerun
169 \fBbtrfstune \-u\fP and let it complete.
170 .UNINDENT
171 .UNINDENT
172 .TP
173 .B \-x
174 (since kernel: 3.10)
175 .sp
176 Enable skinny metadata extent refs (more efficient representation of
177 extents), enabled by mkfs feature \fIskinny\-metadata\fP\&.
178 .sp
179 All newly created extents will use the new representation. To
180 completely switch the entire filesystem, run a full balance of the
181 metadata. Please refer to \fI\%btrfs\-balance(8)\fP\&.
182 .TP
183 .B \-\-version
184 Print the \fBbtrfstune\fP version, builtin features and exit.
185 .UNINDENT
186 .SH EXIT STATUS
187 .sp
188 \fBbtrfstune\fP returns 0 if no error happened, 1 otherwise.
189 .SH COMPATIBILITY NOTE
190 .sp
191 This deprecated tool exists for historical reasons but is still in use today.
192 Its functionality will be merged to the main tool, at which time \fBbtrfstune\fP
193 will be declared obsolete and scheduled for removal.
194 .SH SEE ALSO
195 .sp
196 \fI\%btrfs(5)\fP,
197 \fI\%btrfs\-balance(8)\fP,
198 \fI\%mkfs.btrfs(8)\fP
199 .\" Generated by docutils manpage writer.
200 .