Debian Codegraph @

upstream/debian-unstable/man8/btrfstune.8

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