1BTRFSTUNE(8)                         BTRFS                        BTRFSTUNE(8)
2
3
4

NAME

6       btrfstune - tune various filesystem parameters
7

SYNOPSIS

9       btrfstune [options] <device> [<device>...]
10

DESCRIPTION

12       btrfstune can be used to enable, disable, or set various filesystem pa‐
13       rameters. The filesystem must be unmounted.
14
15       The common use case is to enable features that were not enabled at mkfs
16       time.   Please make sure that you have kernel support for the features.
17       You can find a complete list of features and kernel  version  of  their
18       introduction  at  Feature  by  version  page.   Also,  the  manual page
19       mkfs.btrfs(8) contains more details about the features.
20
21       Some of the features could be also enabled on a mounted  filesystem  by
22       other means.  Please refer to the FILESYSTEM FEATURES in btrfs(5).
23

OPTIONS

25       --convert-to-block-group-tree
26              (since kernel 6.1)
27
28              Convert  portions  of  extent tree that tracks block groups to a
29              separate block group tree. This greatly reduces mount time.  Can
30              be also enabled at mkfs time.
31
32       --convert-from-block-group-tree
33              (since kernel 6.1)
34
35              Convert block groups tracked in standalone block group tree back
36              to extent tree and remove block-group-tree feature bit from  the
37              filesystem.
38
39       --convert-to-free-space-tree
40              (since kernel 4.5)
41
42              Convert to free-space-tree feature (v2 of space cache).
43
44       -f     Allow  dangerous  changes, e.g. clear the seeding flag or change
45              fsid.  Make sure that you are aware of the dangers.
46
47       -m     (since kernel: 5.0)
48
49              change fsid stored as  metadata_uuid  to  a  randomly  generated
50              UUID, see also -U
51
52       -M <UUID>
53              (since kernel: 5.0)
54
55              change fsid stored as metadata_uuid to a given UUID, see also -U
56
57              The  metadata_uuid  is  stored  only  in the superblock and is a
58              backward incompatible change. The fsid in  metadata  blocks  re‐
59              mains unchanged and is not overwritten, thus the whole operation
60              is significantly faster than -U.
61
62              The new metadata_uuid can be used for mount by UUID and is  also
63              used to identify devices of a multi-device filesystem.
64
65       -n     (since kernel: 3.14)
66
67              Enable  no-holes  feature (more efficient representation of file
68              holes), enabled by mkfs feature no-holes.
69
70       -r     (since kernel: 3.7)
71
72              Enable extended inode refs (hardlink limit per file in a  direc‐
73              tory is 65536), enabled by mkfs feature extref.
74
75       -S <0|1>
76              Enable seeding on a given device. Value 1 will enable seeding, 0
77              will disable it.  A seeding filesystem is forced to  be  mounted
78              read-only.  A new device can be added to the filesystem and will
79              capture all writes keeping the seeding device intact.  See  also
80              section SEEDING DEVICE in btrfs(5).
81
82              WARNING:
83                 Clearing the seeding flag on a device may be dangerous.  If a
84                 previously-seeding device is changed,  all  filesystems  that
85                 used that device will become unmountable. Setting the seeding
86                 flag back will not fix that.
87
88                 A valid usecase is seeding device as a base image. Clear  the
89                 seeding  flag,  update  the  filesystem  and  make it seeding
90                 again, provided that it's OK to throw  away  all  filesystems
91                 built on top of the previous base.
92
93       -u     Change  fsid  to  a randomly generated UUID or continue previous
94              fsid change operation in case it was interrupted.
95
96       -U <UUID>
97              Change fsid to UUID in all metadata blocks.
98
99              The UUID should  be  a  36  bytes  string  in  printf(3)  format
100              %08x-%04x-%04x-%04x-%012x.   If  there  is a previous unfinished
101              fsid change, it will continue only if the UUID matches  the  un‐
102              finished one or if you use the option -u.
103
104              All  metadata blocks are rewritten, this may take some time, but
105              the final filesystem compatibility is unaffected, unlike -M.
106
107              WARNING:
108                 Cancelling or interrupting a UUID change operation will  make
109                 the  filesystem  temporarily  unmountable.   To fix it, rerun
110                 btrfstune -u and let it complete.
111
112       -x     (since kernel: 3.10)
113
114              Enable skinny metadata extent refs (more  efficient  representa‐
115              tion of extents), enabled by mkfs feature skinny-metadata.
116
117              All  newly  created  extents will use the new representation. To
118              completely switch the entire filesystem, run a full  balance  of
119              the metadata. Please refer to btrfs-balance(8).
120

EXIT STATUS

122       btrfstune returns 0 if no error happened, 1 otherwise.
123

COMPATIBILITY NOTE

125       This  deprecated tool exists for historical reasons but is still in use
126       today.  Its functionality will be merged to the  main  tool,  at  which
127       time btrfstune will be declared obsolete and scheduled for removal.
128

SEE ALSO

130       btrfs(5), btrfs-balance(8), mkfs.btrfs(8)
131
132
133
134
1356.6.2                            Nov 24, 2023                     BTRFSTUNE(8)
Impressum