45386587d5c3be3f9d10f6324f84e7164a7a3b00
[platform/upstream/btrfs-progs.git] / man / mkfs.btrfs.8.in
1 .TH MKFS.BTRFS 8
2 .SH NAME
3 mkfs.btrfs \- create a btrfs filesystem
4 .SH SYNOPSIS
5 .B mkfs.btrfs
6 [ \fB\-A\fP\fI alloc-start\fP ]
7 [ \fB\-b\fP\fI byte-count\fP ]
8 [ \fB\-d\fP\fI data-profile\fP ]
9 [ \fB\-l\fP\fI leafsize\fP ]
10 [ \fB\-L\fP\fI label\fP ]
11 [ \fB\-m\fP\fI metadata profile\fP ]
12 [ \fB\-M\fP\fI mixed data+metadata\fP ]
13 [ \fB\-n\fP\fI nodesize\fP ]
14 [ \fB\-s\fP\fI sectorsize\fP ]
15 [ \fB\-r\fP\fI rootdir\fP ]
16 [ \fB\-K\fP ]
17 [ \fB\-h\fP ]
18 [ \fB\-V\fP ]
19 \fI device\fP [ \fIdevice ...\fP ]
20 .SH DESCRIPTION
21 .B mkfs.btrfs
22 is used to create a btrfs filesystem (usually in a disk partition, or an array
23 of disk partitions).
24 .I device
25 is the special file corresponding to the device (e.g \fI/dev/sdXX\fP ).
26 If multiple \fI devices \fP are specified, btrfs is created
27 spanning across the specified \fI devices\fP.
28 .SH OPTIONS
29 .TP
30 \fB\-A\fR, \fB\-\-alloc\-start \fIoffset\fR
31 Specify the offset from the start of the device to start the btrfs filesystem. The default value is zero, or the start of the device.
32 .TP
33 \fB\-b\fR, \fB\-\-byte\-count \fIsize\fR
34 Specify the size of the resultant filesystem. If this option is not used,
35 mkfs.btrfs uses all the available storage for the filesystem.
36 .TP
37 \fB\-d\fR, \fB\-\-data \fItype\fR
38 Specify how the data must be spanned across the devices specified. Valid
39 values are raid0, raid1, raid10 or single.
40 .TP
41 \fB\-l\fR, \fB\-\-leafsize \fIsize\fR
42 Specify the leaf size, the least data item in which btrfs stores data. The
43 default value is the page size.
44 .TP
45 \fB\-L\fR, \fB\-\-label \fIname\fR
46 Specify a label for the filesystem.
47 .TP
48 \fB\-m\fR, \fB\-\-metadata \fIprofile\fR
49 Specify how metadata must be spanned across the devices specified. Valid
50 values are raid0, raid1, raid10, single or dup.  Single device will have dup
51 set by default except in the case of SSDs which will default to single.  This is
52 because SSDs can remap blocks internally so duplicate blocks could end up in the
53 same erase block which negates the benefits of doing metadata duplication.
54 .TP
55 \fB\-M\fR, \fB\-\-mixed\fR
56 Mix data and metadata chunks together for more efficient space 
57 utilization.  This feature incurs a performance penalty in
58 larger filesystems.  It is recommended for use with filesystems
59 of 1 GiB or smaller.
60 .TP
61 \fB\-n\fR, \fB\-\-nodesize \fIsize\fR
62 Specify the nodesize. By default the value is set to the pagesize.
63 .TP
64 \fB\-s\fR, \fB\-\-sectorsize \fIsize\fR
65 Specify the sectorsize, the minimum block allocation.
66 .TP
67 \fB\-r\fR, \fB\-\-rootdir \fIrootdir\fR
68 Specify a directory to copy into the newly created fs.
69 .TP
70 \fB\-K\fR, \fB\-\-nodiscard \fR
71 Do not perform whole device TRIM operation by default.
72 .TP
73 \fB\-V\fR, \fB\-\-version\fR
74 Print the \fBmkfs.btrfs\fP version and exit.
75 .SH UNIT
76 As default the unit is the byte, however it is possible to append a suffix
77 to the arguments like \fBk\fP for KBytes, \fBm\fP for MBytes...
78 .SH AVAILABILITY
79 .B mkfs.btrfs
80 is part of btrfs-progs. Btrfs is currently under heavy development,
81 and not suitable for any uses other than benchmarking and review.
82 Please refer to the btrfs wiki
83 http://btrfs.wiki.kernel.org for further details.
84 .SH SEE ALSO
85 .BR btrfsck (8)