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
19       https://btrfs.wiki.kernel.org/index.php/Changelog#By_feature  .   Also,
20       the manual page mkfs.btrfs(8) contains more details about the features.
21
22       Some  of  the features could be also enabled on a mounted filesystem by
23       other means.  Please refer to the FILESYSTEM FEATURES in btrfs(5).
24

OPTIONS

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

EXIT STATUS

108       btrfstune returns 0 if no error happened, 1 otherwise.
109

COMPATIBILITY NOTE

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

SEE ALSO

116       btrfs(5), btrfs-balance(8), mkfs.btrfs(8)
117
118
119
120
1216.1.3                            Jan 25, 2023                     BTRFSTUNE(8)
Impressum