1MKFS.BTRFS(8) System Manager's Manual MKFS.BTRFS(8)
2
3
4
6 mkfs.btrfs - create a btrfs filesystem
7
9 mkfs.btrfs [ -A alloc-start ] [ -b byte-count ] [ -d data-profile ] [
10 -l leafsize ] [ -L label ] [ -m metadata profile ] [ -M mixed
11 data+metadata ] [ -n nodesize ] [ -s sectorsize ] [ -r rootdir ] [ -K ]
12 [ -h ] [ -V ]
13 device [ device ... ]
14
16 mkfs.btrfs is used to create a btrfs filesystem (usually in a disk par‐
17 tition, or an array of disk partitions). device is the special file
18 corresponding to the device (e.g /dev/sdXX ). If multiple devices
19 are specified, btrfs is created spanning across the specified devices.
20
22 -A, --alloc-start offset
23 Specify the offset from the start of the device to start the
24 btrfs filesystem. The default value is zero, or the start of the
25 device.
26
27 -b, --byte-count size
28 Specify the size of the resultant filesystem. If this option is
29 not used, mkfs.btrfs uses all the available storage for the
30 filesystem.
31
32 -d, --data type
33 Specify how the data must be spanned across the devices speci‐
34 fied. Valid values are raid0, raid1, raid10 or single.
35
36 -l, --leafsize size
37 Specify the leaf size, the least data item in which btrfs stores
38 data. The default value is the page size.
39
40 -L, --label name
41 Specify a label for the filesystem.
42
43 -m, --metadata profile
44 Specify how metadata must be spanned across the devices speci‐
45 fied. Valid values are raid0, raid1, raid10 or single.
46
47 -M, --mixed
48 Mix data and metadata chunks together for more efficient space
49 utilization. This feature incurs a performance penalty in
50 larger filesystems. It is recommended for use with filesystems
51 of 1 GiB or smaller.
52
53 -n, --nodesize size
54 Specify the nodesize. By default the value is set to the page‐
55 size.
56
57 -s, --sectorsize size
58 Specify the sectorsize, the minimum block allocation.
59
60 -r, --rootdir rootdir
61 Specify a directory to copy into the newly created fs.
62
63 -K, --nodiscard
64 Do not perform whole device TRIM operation by default.
65
66 -V, --version
67 Print the mkfs.btrfs version and exit.
68
70 mkfs.btrfs is part of btrfs-progs. Btrfs is currently under heavy
71 development, and not suitable for any uses other than benchmarking and
72 review. Please refer to the btrfs wiki http://btrfs.wiki.kernel.org
73 for further details.
74
76 btrfsck(8)
77
78
79
80 MKFS.BTRFS(8)