btrfs-progs: doc: update btrfstune manpage
[platform/upstream/btrfs-progs.git] / Documentation / btrfstune.asciidoc
1 btrfstune(8)
2 ============
3
4 NAME
5 ----
6 btrfstune - tune various filesystem parameters
7
8 SYNOPSIS
9 --------
10 *btrfstune* [options] <dev> [<dev>...]
11
12 DESCRIPTION
13 -----------
14 *btrfstune* can be used to enable, disable or set various filesystem
15 parameters. The filesystem must be unmounted.
16
17 The common usecase is to enable features that were not enabled at mkfs time.
18 Please make sure that you have kernel support for the features.  You can find a
19 complete list of features and kernel version of their introduction at
20 https://btrfs.wiki.kernel.org/index.php/Changelog#By_feature .
21
22 OPTIONS
23 -------
24 -S <0|1>::
25 Enable seeding on a given device. Value 1 will enable seeding, 0 will disable it. +
26 A seeding filesystem is forced to be mounted read-only. A new device can be added
27 to the filesystem and will capture all writes keeping the seeding device intact.
28 -r::
29 Enable extended inode refs (hardlink limit per file in a directory is 65536). Since kernel 3.7.
30 -x::
31 Enable skinny metadata extent refs (more efficient representation of extents). Since kernel 3.10.
32 -n::
33 Enable no-holes feature (more efficient representation of file holes). Since kernel 3.14.
34 -f::
35 Allow dangerous changes, e.g. clear the seeding flag or change fsid. Make sure
36 that you are aware of the dangers.
37 -u::
38 Change fsid to a randomly generated UUID or continue previous fsid change
39 operation in case it was interrupted.
40 -U <UUID>::
41 Change fsid to <UUID>.
42 +
43 The <UUID> should be a 36 bytes string in `printf`(3) format
44 "%08x-%04x-%04x-%04x-%012x".
45 If there is a previous unfinished fsid change, it will continue only if the
46 <UUID> matches the unfinished one or if you use the option '-u'.
47
48 WARNING: Cancelling or interrupting a UUID change operation will make the
49 filesystem temporarily unmountable.  To fix it, rerun 'btrfstune -u' to restore
50 the UUID and let it complete.
51
52 WARNING: Clearing the seeding flag on a device may be dangerous.
53 If a previously-seeding device is changed, all filesystems that used that
54 device will become unmountable. Setting the seeding flag back will not fix
55 that. +
56 A valid usecase is "seeding device as a base image". Clear the seeding
57 flag, update the filesystem and make it seeding again, provided that it's ok
58 to throw away all filesystems built on top of the previous base.
59
60 EXIT STATUS
61 -----------
62 *btrfstune* returns 0 if no error happened, 1 otherwise.
63
64 COMPATIBILITY NOTE
65 ------------------
66 This tool exists for historical reasons but is still in use today.  The
67 functionality is about to be merged to the main tool someday and *btrfstune*
68 will become deprecated and removed afterwards.
69
70 SEE ALSO
71 --------
72 `mkfs.btrfs`(8)