Debian Codegraph @

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