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

EXIT STATUS

104       btrfstune returns 0 if no error happened, 1 otherwise.
105

COMPATIBILITY NOTE

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

SEE ALSO

112       btrfs(5), btrfs-balance(8), mkfs.btrfs(8)
113
115       2022
116
117
118
119
1205.18                             May 25, 2022                     BTRFSTUNE(8)
Impressum