2009-01-21 18:22:49 +00:00
|
|
|
.TH MKFS.BTRFS 8
|
|
|
|
.SH NAME
|
2012-09-21 07:00:15 +00:00
|
|
|
mkfs.btrfs \- create a btrfs filesystem
|
2009-01-21 18:22:49 +00:00
|
|
|
.SH SYNOPSIS
|
|
|
|
.B mkfs.btrfs
|
|
|
|
[ \fB\-A\fP\fI alloc-start\fP ]
|
|
|
|
[ \fB\-b\fP\fI byte-count\fP ]
|
2012-01-09 15:18:55 +00:00
|
|
|
[ \fB\-d\fP\fI data-profile\fP ]
|
2013-03-21 07:17:17 +00:00
|
|
|
[ \fB\-f\fP ]
|
2013-07-11 20:56:17 +00:00
|
|
|
[ \fB\-n\fP\fI nodesize\fP ]
|
2012-01-09 15:18:55 +00:00
|
|
|
[ \fB\-l\fP\fI leafsize\fP ]
|
|
|
|
[ \fB\-L\fP\fI label\fP ]
|
|
|
|
[ \fB\-m\fP\fI metadata profile\fP ]
|
|
|
|
[ \fB\-M\fP\fI mixed data+metadata\fP ]
|
|
|
|
[ \fB\-s\fP\fI sectorsize\fP ]
|
2012-01-09 15:18:56 +00:00
|
|
|
[ \fB\-r\fP\fI rootdir\fP ]
|
2012-07-17 10:30:16 +00:00
|
|
|
[ \fB\-K\fP ]
|
2013-05-16 15:04:04 +00:00
|
|
|
[ \fB\-O\fP\fI feature1,feature2,...\fP ]
|
2012-01-09 15:18:55 +00:00
|
|
|
[ \fB\-h\fP ]
|
|
|
|
[ \fB\-V\fP ]
|
|
|
|
\fI device\fP [ \fIdevice ...\fP ]
|
2009-01-21 18:22:49 +00:00
|
|
|
.SH DESCRIPTION
|
|
|
|
.B mkfs.btrfs
|
2012-09-21 07:00:15 +00:00
|
|
|
is used to create a btrfs filesystem (usually in a disk partition, or an array
|
2009-01-21 18:22:49 +00:00
|
|
|
of disk partitions).
|
|
|
|
.I device
|
|
|
|
is the special file corresponding to the device (e.g \fI/dev/sdXX\fP ).
|
|
|
|
If multiple \fI devices \fP are specified, btrfs is created
|
|
|
|
spanning across the specified \fI devices\fP.
|
|
|
|
.SH OPTIONS
|
|
|
|
.TP
|
|
|
|
\fB\-A\fR, \fB\-\-alloc\-start \fIoffset\fR
|
|
|
|
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.
|
|
|
|
.TP
|
|
|
|
\fB\-b\fR, \fB\-\-byte\-count \fIsize\fR
|
|
|
|
Specify the size of the resultant filesystem. If this option is not used,
|
|
|
|
mkfs.btrfs uses all the available storage for the filesystem.
|
|
|
|
.TP
|
|
|
|
\fB\-d\fR, \fB\-\-data \fItype\fR
|
|
|
|
Specify how the data must be spanned across the devices specified. Valid
|
2013-03-15 14:02:57 +00:00
|
|
|
values are raid0, raid1, raid5, raid6, raid10 or single.
|
2009-01-21 18:22:49 +00:00
|
|
|
.TP
|
2013-03-13 15:37:27 +00:00
|
|
|
\fB\-f\fR, \fB\-\-force\fR
|
2013-02-14 18:30:03 +00:00
|
|
|
Force overwrite when an existing filesystem is detected on the device.
|
|
|
|
By default, mkfs.btrfs will not write to the device if it suspects that
|
|
|
|
there is a filesystem or partition table on the device already.
|
|
|
|
.TP
|
2013-07-11 20:56:17 +00:00
|
|
|
\fB\-n\fR, \fB\-\-nodesize \fIsize\fR
|
2009-01-21 18:22:49 +00:00
|
|
|
\fB\-l\fR, \fB\-\-leafsize \fIsize\fR
|
2013-07-11 20:56:17 +00:00
|
|
|
Specify the nodesize, the tree block size in which btrfs stores data. The
|
|
|
|
default value is the page size. Must be a multiple of the sectorsize, but
|
|
|
|
not larger than 65536. Leafsize always equals nodesize and the options are
|
|
|
|
aliases.
|
2009-01-21 18:22:49 +00:00
|
|
|
.TP
|
|
|
|
\fB\-L\fR, \fB\-\-label \fIname\fR
|
|
|
|
Specify a label for the filesystem.
|
|
|
|
.TP
|
|
|
|
\fB\-m\fR, \fB\-\-metadata \fIprofile\fR
|
|
|
|
Specify how metadata must be spanned across the devices specified. Valid
|
2013-03-15 14:02:57 +00:00
|
|
|
values are raid0, raid1, raid5, raid6, raid10, single or dup. Single device
|
|
|
|
will have dup set by default except in the case of SSDs which will default to
|
|
|
|
single. This is because SSDs can remap blocks internally so duplicate blocks
|
|
|
|
could end up in the same erase block which negates the benefits of doing
|
|
|
|
metadata duplication.
|
2009-01-21 18:22:49 +00:00
|
|
|
.TP
|
2010-11-15 16:32:12 +00:00
|
|
|
\fB\-M\fR, \fB\-\-mixed\fR
|
|
|
|
Mix data and metadata chunks together for more efficient space
|
|
|
|
utilization. This feature incurs a performance penalty in
|
|
|
|
larger filesystems. It is recommended for use with filesystems
|
|
|
|
of 1 GiB or smaller.
|
|
|
|
.TP
|
2009-01-21 18:22:49 +00:00
|
|
|
\fB\-s\fR, \fB\-\-sectorsize \fIsize\fR
|
2013-07-11 20:56:17 +00:00
|
|
|
Specify the sectorsize, the minimum data block allocation unit. The default
|
|
|
|
value is the page size. If the sectorsize differs from the page size, the
|
|
|
|
created filesystem may not be mountable by current kernel. Therefore it is not
|
|
|
|
recommended to use this option unless you are going to mount it on a system
|
|
|
|
with the appropriate page size.
|
2009-01-21 18:22:49 +00:00
|
|
|
.TP
|
2012-01-09 15:18:56 +00:00
|
|
|
\fB\-r\fR, \fB\-\-rootdir \fIrootdir\fR
|
|
|
|
Specify a directory to copy into the newly created fs.
|
|
|
|
.TP
|
2012-07-17 10:30:16 +00:00
|
|
|
\fB\-K\fR, \fB\-\-nodiscard \fR
|
2012-07-06 14:11:10 +00:00
|
|
|
Do not perform whole device TRIM operation by default.
|
|
|
|
.TP
|
2013-05-16 15:04:04 +00:00
|
|
|
\fB\-O\fR, \fB\-\-features \fIfeature1,feature2,...\fR
|
|
|
|
A list of filesystem features turned on at mkfs time. Not all features are
|
|
|
|
supported by old kernels.
|
|
|
|
|
|
|
|
To see all run
|
|
|
|
|
|
|
|
\fBmkfs.btrfs -O list-all\fR
|
|
|
|
.TP
|
2009-01-21 18:22:49 +00:00
|
|
|
\fB\-V\fR, \fB\-\-version\fR
|
|
|
|
Print the \fBmkfs.btrfs\fP version and exit.
|
2012-10-29 17:53:20 +00:00
|
|
|
.SH UNIT
|
|
|
|
As default the unit is the byte, however it is possible to append a suffix
|
|
|
|
to the arguments like \fBk\fP for KBytes, \fBm\fP for MBytes...
|
2009-01-21 18:22:49 +00:00
|
|
|
.SH AVAILABILITY
|
|
|
|
.B mkfs.btrfs
|
|
|
|
is part of btrfs-progs. Btrfs is currently under heavy development,
|
2009-06-03 16:00:20 +00:00
|
|
|
and not suitable for any uses other than benchmarking and review.
|
2009-01-21 18:22:49 +00:00
|
|
|
Please refer to the btrfs wiki
|
|
|
|
http://btrfs.wiki.kernel.org for further details.
|
|
|
|
.SH SEE ALSO
|
|
|
|
.BR btrfsck (8)
|