Debian Codegraph @

upstream/fedora-44/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" "Mar 18, 2026" "6.19.1" "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 .SH OPTIONS
51 .INDENT 0.0
52 .TP
53 .B \-\-convert\-to\-block\-group\-tree
54 (since kernel 6.1)
55 .sp
56 Convert portions of extent tree that tracks block groups to a separate
57 block group tree. This greatly reduces mount time. Can be also enabled
58 at mkfs time.
59 .TP
60 .B \-\-convert\-from\-block\-group\-tree
61 (since kernel 6.1)
62 .sp
63 Convert block groups tracked in standalone block group tree back to
64 extent tree and remove \fIblock\-group\-tree\fP feature bit from the filesystem.
65 .TP
66 .B \-\-convert\-to\-free\-space\-tree
67 (since kernel 4.5)
68 .sp
69 Convert to free\-space\-tree feature (v2 of space cache).
70 .TP
71 .B \-\-enable\-simple\-quota
72 (since kernel 6.7)
73 .sp
74 Enable simple quota accounting (\fIsquota\fP mkfs feature). This is an
75 alternative to qgroups with a smaller performance impact but no notion
76 of shared vs. exclusive usage.
77 .TP
78 .B \-\-remove\-simple\-quota
79 Remove simple quota accounting related structures.
80 .TP
81 .B \-f
82 Allow dangerous changes, e.g. clear the seeding flag or change fsid.
83 Make sure that you are aware of the dangers.
84 .TP
85 .B \-m
86 (since kernel: 5.0)
87 .sp
88 change fsid stored as \fImetadata_uuid\fP to a randomly generated UUID,
89 see also \fI\-U\fP
90 .UNINDENT
91 .INDENT 0.0
92 .TP
93 .BI \-M \ <UUID>
94 (since kernel: 5.0)
95 .sp
96 change fsid stored as \fImetadata_uuid\fP to a given UUID, see also \fI\-U\fP
97 .sp
98 The metadata_uuid is stored only in the superblock and is a backward
99 incompatible change. The fsid in metadata blocks remains unchanged and
100 is not overwritten, thus the whole operation is significantly faster
101 than \fI\-U\fP\&.
102 .sp
103 The new metadata_uuid can be used for mount by UUID and is also used to
104 identify devices of a multi\-device filesystem.
105 .TP
106 .B \-n
107 (since kernel: 3.14)
108 .sp
109 Enable no\-holes feature (more efficient representation of file holes),
110 enabled by mkfs feature \fIno\-holes\fP\&.
111 .TP
112 .B \-r
113 (since kernel: 3.7)
114 .sp
115 Enable extended inode refs (hardlink limit per file in a directory is
116 65536), enabled by mkfs feature \fIextref\fP\&.
117 .TP
118 .BI \-S \ <0|1>
119 Enable seeding on a given device. Value 1 will enable seeding, 0 will
120 disable it. A seeding filesystem is forced to be mounted read\-only. A
121 new device can be added to the filesystem and will capture all writes
122 keeping the seeding device intact. See also section
123 SEEDING DEVICE \%<#\:man-btrfs5-seeding-device>
124 in btrfs(5) \%<>\&.
125 .sp
126 \fBWarning:\fP
127 .INDENT 7.0
128 .INDENT 3.5
129 Clearing the seeding flag on a device may be dangerous. If a
130 previously\-seeding device is changed, all filesystems that used
131 that device will become unmountable. Setting the seeding flag
132 back will not fix that.
133 .sp
134 A valid usecase is \fIseeding device as a base image\fP\&. Clear the
135 seeding flag, update the filesystem and make it seeding again,
136 provided that it\(aqs OK to throw away all filesystems built on
137 top of the previous base.
138 .UNINDENT
139 .UNINDENT
140 .TP
141 .B \-u
142 Change fsid to a randomly generated UUID or continue previous fsid
143 change operation in case it was interrupted.
144 .TP
145 .BI \-U \ <UUID>
146 Change fsid to \fIUUID\fP in all metadata blocks.
147 .sp
148 The \fIUUID\fP should be a 36 bytes string in printf(3) \%<https://\:man7\:.org/\:linux/\:man-pages/\:man3/\:printf\:.3\:.html> format
149 \fB%08x\-%04x\-%04x\-%04x\-%012x\fP\&.
150 If there is a previous unfinished fsid change, it will continue only if the
151 \fIUUID\fP matches the unfinished one or if you use the option \fI\-u\fP\&.
152 .sp
153 All metadata blocks are rewritten, this may take some time, but the final
154 filesystem compatibility is unaffected, unlike \fI\-M\fP\&.
155 .sp
156 \fBWarning:\fP
157 .INDENT 7.0
158 .INDENT 3.5
159 Cancelling or interrupting a UUID change operation will make
160 the filesystem temporarily unmountable. To fix it, rerun
161 \fBbtrfstune \-u\fP and let it complete.
162 .UNINDENT
163 .UNINDENT
164 .TP
165 .B \-x
166 (since kernel: 3.10)
167 .sp
168 Enable skinny metadata extent refs (more efficient representation of
169 extents), enabled by mkfs feature \fIskinny\-metadata\fP\&.
170 .sp
171 All newly created extents will use the new representation. To
172 completely switch the entire filesystem, run a full balance of the
173 metadata. Please refer to btrfs\-balance(8) \%<>\&.
174 .TP
175 .B \-\-version
176 Print the \fBbtrfstune\fP version, builtin features and exit.
177 .UNINDENT
178 .SH EXIT STATUS
179 .sp
180 \fBbtrfstune\fP returns 0 if no error happened, 1 otherwise.
181 .SH COMPATIBILITY NOTE
182 .sp
183 This deprecated tool exists for historical reasons but is still in use today.
184 Its functionality will be merged to the main tool, at which time \fBbtrfstune\fP
185 will be declared obsolete and scheduled for removal.
186 .SH SEE ALSO
187 .sp
188 btrfs(5) \%<>,
189 btrfs\-balance(8) \%<>,
190 mkfs.btrfs(8) \%<>
191 .\" End of generated man page.