path: root/man
diff options
authorKoen De Wit <>2013-07-11 22:56:17 +0200
committerDavid Sterba <>2013-09-03 19:40:49 +0200
commitb9b1fc4f0dea55ed276819538d1d46e61edf1d86 (patch)
treedb4c7adae87982fe5da89b43e486db48734a821f /man
parent560f0713139b6a1fbe059d895dd059e6a98ec18b (diff)
btrfs-progs: mkfs.btrfs documentation: clarify current restrictions of sectorsize, nodesize and leafsize
Commit 8d082fb727ac11930ea20bf1612e334ea7c2b697 (Btrfs: do not mount when we have a sectorsize unequal to PAGE_SIZE) requires the sectorsize to be equal to the pagesize for the filesystem to be mountable. The nodesize and leafsize should be equal, and not larger than 65536. Adding this information to the manpage and usage instructions of mkfs.btrfs. Signed-off-by: Koen De Wit <> Signed-off-by: David Sterba <> Signed-off-by: Chris Mason <>
Diffstat (limited to 'man')
1 files changed, 11 insertions, 7 deletions
diff --git a/man/ b/man/
index 548e754f..b54e9354 100644
--- a/man/
+++ b/man/
@@ -7,11 +7,11 @@ mkfs.btrfs \- create a btrfs filesystem
[ \fB\-b\fP\fI byte-count\fP ]
[ \fB\-d\fP\fI data-profile\fP ]
[ \fB\-f\fP ]
+[ \fB\-n\fP\fI nodesize\fP ]
[ \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\-n\fP\fI nodesize\fP ]
[ \fB\-s\fP\fI sectorsize\fP ]
[ \fB\-r\fP\fI rootdir\fP ]
[ \fB\-K\fP ]
@@ -45,9 +45,12 @@ 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.
+\fB\-n\fR, \fB\-\-nodesize \fIsize\fR
\fB\-l\fR, \fB\-\-leafsize \fIsize\fR
-Specify the leaf size, the least data item in which btrfs stores data. The
-default value is the page size.
+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
\fB\-L\fR, \fB\-\-label \fIname\fR
Specify a label for the filesystem.
@@ -66,11 +69,12 @@ utilization. This feature incurs a performance penalty in
larger filesystems. It is recommended for use with filesystems
of 1 GiB or smaller.
-\fB\-n\fR, \fB\-\-nodesize \fIsize\fR
-Specify the nodesize. By default the value is set to the pagesize.
\fB\-s\fR, \fB\-\-sectorsize \fIsize\fR
-Specify the sectorsize, the minimum block allocation.
+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.
\fB\-r\fR, \fB\-\-rootdir \fIrootdir\fR
Specify a directory to copy into the newly created fs.