summaryrefslogtreecommitdiff
path: root/misc/mke2fs.8.in
diff options
context:
space:
mode:
Diffstat (limited to 'misc/mke2fs.8.in')
-rw-r--r--misc/mke2fs.8.in192
1 files changed, 93 insertions, 99 deletions
diff --git a/misc/mke2fs.8.in b/misc/mke2fs.8.in
index 6d443a2a..9c38e203 100644
--- a/misc/mke2fs.8.in
+++ b/misc/mke2fs.8.in
@@ -64,7 +64,7 @@ mke2fs \- create an ext2/ext3/ext4 filesystem
]
[
.B \-O
-.IR feature [,...]
+[^]\fIfeature\fR[,...]
]
[
.B \-q
@@ -187,6 +187,15 @@ Check the device for bad blocks before creating the file system. If
this option is specified twice, then a slower read-write
test is used instead of a fast read-only test.
.TP
+.B \-C " cluster-size"
+Specify the size of cluster in bytes for filesystems using the bigalloc
+feature. Valid cluster-size values are from 2048 to 256M bytes per
+cluster. This can only be specified if the bigalloc feature is
+enabled. (See the
+.B ext4 (5)
+man page for more details about bigalloc.) The default cluster size if
+bigalloc is enabled is 16 times the block size.
+.TP
.B \-D
Use direct I/O when writing to the disk. This avoids mke2fs dirtying a
lot of buffer cache memory, which may impact other applications running
@@ -203,8 +212,8 @@ in earlier versions of
.BR mke2fs .
The
.B \-R
-option is still accepted for backwards compatibility. The
-following extended options are supported:
+option is still accepted for backwards compatibility, but is deprecated.
+The following extended options are supported:
.RS 1.2i
.TP
.BI mmp_update_interval= interval
@@ -237,6 +246,10 @@ parity disk, so N will be the number of disks in the array minus 1).
This allows the block allocator to prevent read-modify-write of the
parity in a RAID stripe if possible when the data is written.
.TP
+.BI offset= offset
+Create the filesystem at an offset from the beginning of the device or
+file. This can be useful when creating disk images for virtual machines.
+.TP
.BI resize= max-online-resize
Reserve enough space so that the block group descriptor table can grow
to support a filesystem that has
@@ -261,6 +274,31 @@ small risk if the system crashes before the journal has been overwritten
entirely one time. If the option value is omitted, it defaults to 1 to
enable lazy journal inode zeroing.
.TP
+.BI num_backup_sb= <0|1|2>
+If the
+.B sparse_super2
+file system feature is enabled this option controls whether there will
+be 0, 1, or 2 backup superblocks created in the file system.
+.TP
+.B packed_meta_blocks\fR[\fB= \fI<0 to disable, 1 to enable>\fR]
+Place the allocation bitmaps and the inode table at the beginning of the
+disk. This option requires that the flex_bg file system feature to be
+enabled in order for it to have effect, and will also create the journal
+at the beginning of the file system. This option is useful for flash
+devices that use SLC flash at the beginning of the disk.
+It also maximizes the range of contiguous data blocks, which
+can be useful for certain specialized use cases, such as supported
+Shingled Drives.
+.TP
+.BI root_owner [=uid:gid]
+Specify the numeric user and group ID of the root directory. If no UID:GID
+is specified, use the user and group ID of the user running \fBmke2fs\fR.
+In \fBmke2fs\fR 1.42 and earlier the UID and GID of the root directory were
+set by default to the UID and GID of the user running the mke2fs command.
+The \fBroot_owner=\fR option allows explicitly specifying these values,
+and avoid side-effects for users that do not expect the contents of the
+filesystem to change based on the user running \fBmke2fs\fR.
+.TP
.B test_fs
Set a flag in the filesystem superblock indicating that it may be
mounted using experimental kernel code, such as the ext4dev filesystem.
@@ -275,13 +313,13 @@ as default.
.TP
.BI nodiscard
Do not attempt to discard blocks at mkfs time.
-.TP
-.BI quotatype
-Specify which quota type ('usr' or 'grp') is to be initialized. This
-option has any effect only if
-.B quota
-feature is set. Without this extended option, the default behavior is to
-initialize both user and group quotas.
+@QUOTA_MAN_COMMENT@.TP
+@QUOTA_MAN_COMMENT@.BI quotatype
+@QUOTA_MAN_COMMENT@Specify which quota type ('usr' or 'grp') is to be
+@QUOTA_MAN_COMMENT@initialized. This option has effect only if the
+@QUOTA_MAN_COMMENT@.B quota
+@QUOTA_MAN_COMMENT@feature is set. Without this extended option, the default
+@QUOTA_MAN_COMMENT@behavior is to initialize both user and group quotas.
.RE
.TP
.BI \-f " fragment-size"
@@ -309,6 +347,10 @@ RAID parameter as part of the
option rather than manipulating the number of blocks per group.)
This option is generally used by developers who
are developing test cases.
+.IP
+If the bigalloc feature is enabled, the
+.B \-g
+option will specify the number of clusters in a block group.
.TP
.BI \-G " number-of-groups"
Specify the number of block groups that will be packed together to
@@ -329,26 +371,36 @@ bytes of space on the disk. The larger the
ratio, the fewer inodes will be created. This value generally shouldn't
be smaller than the blocksize of the filesystem, since in that case more
inodes would be made than can ever be used. Be warned that it is not
-possible to expand the number
-of inodes on a filesystem after it is created, so be careful deciding the
-correct value for this parameter.
+possible to change this ratio on a filesystem after it is created, so be
+careful deciding the correct value for this parameter. Note that resizing
+a filesystem changes the numer of inodes to maintain this ratio.
.TP
.BI \-I " inode-size"
Specify the size of each inode in bytes.
-.B mke2fs
-creates 256-byte inodes by default. In kernels after 2.6.10 and some
-earlier vendor kernels it is possible to utilize inodes larger than
-128 bytes to store
-extended attributes for improved performance. The
+The
.I inode-size
value must be a power of 2 larger or equal to 128. The larger the
.I inode-size
the more space the inode table will consume, and this reduces the usable
space in the filesystem and can also negatively impact performance.
+It is not
+possible to change this value after the filesystem is created.
+.IP
+In kernels after 2.6.10 and some
+earlier vendor kernels it is possible to utilize inodes larger than
+128 bytes to store
+extended attributes for improved performance.
Extended attributes
stored in large inodes are not visible with older kernels, and such
-filesystems will not be mountable with 2.4 kernels at all. It is not
-possible to change this value after the filesystem is created.
+filesystems will not be mountable with 2.4 kernels at all.
+.IP
+The default inode size is controlled by the
+.BR mke2fs.conf (5)
+file. In the
+.B mke2fs.conf
+file shipped with e2fsprogs, the default inode size is 256 bytes for
+most file systems, except for small file systems where the inode size
+will be 128 bytes.
.TP
.B \-j
Create the filesystem with an ext3 journal. If the
@@ -373,6 +425,13 @@ The size of the journal must be at least 1024 filesystem blocks
(i.e., 1MB if using 1k blocks, 4MB if using 4k blocks, etc.)
and may be no more than 10,240,000 filesystem blocks or half the total
file system size (whichever is smaller)
+.TP
+.BI location =journal-location
+Specify the location of the journal. The argument
+.I journal-location
+can either be specified as a block number, or if the number has a units
+suffix (e.g., 'M', 'G', etc.) interpret it as the offset from the
+beginning of the file system.
@JDEV@.TP
@JDEV@.BI device= external-journal
@JDEV@Attach the filesystem to the journal block device located on
@@ -476,7 +535,7 @@ filesystem. The creator field is set by default to the name of the OS the
.B mke2fs
executable was compiled for.
.TP
-.B "\-O \fIfeature\fR[,...]"
+.B "\-O \fR[^]\fIfeature\fR[,...]"
Create a filesystem with the given features (filesystem options),
overriding the default filesystem options. The features that are
enabled by default are specified by the
@@ -512,80 +571,13 @@ section of the configuration file.
.sp
The filesystem feature set is comprised of a list of features, separated
by commas, that are to be enabled. To disable a feature, simply
-prefix the feature name with a caret ('^') character. The
-pseudo-filesystem feature "none" will clear all filesystem features.
-.RS 1.2i
-.TP
-.B dir_index
-Use hashed b-trees to speed up lookups in large directories.
-.TP
-.B extent
-Instead of using the indirect block scheme for storing the location of
-data blocks in an inode, use extents instead. This is a much more
-efficient encoding which speeds up filesystem access, especially for
-large files.
-.TP
-.B filetype
-Store file type information in directory entries.
+prefix the feature name with a caret ('^') character.
+Features with dependencies will not be removed successfully.
+The pseudo-filesystem feature "none" will clear all filesystem features.
.TP
-.B flex_bg
-Allow the per-block group metadata (allocation bitmaps and inode tables)
-to be placed anywhere on the storage media. In addition,
-.B mke2fs
-will place the per-block group metadata together starting at the first
-block group of each "flex_bg group". The size of the flex_bg group
-can be specified using the
-.B \-G
-option.
-.TP
-.B has_journal
-Create an ext3 journal (as if using the
-.B \-j
-option).
-@JDEV@.TP
-@JDEV@.B journal_dev
-@JDEV@Create an external ext3 journal on the given device
-@JDEV@instead of a regular ext2 filesystem.
-@JDEV@Note that
-@JDEV@.I external-journal
-@JDEV@must be created with the same
-@JDEV@block size as the filesystems that will be using it.
-.TP
-.B large_file
-Filesystem can contain files that are greater than 2GB. (Modern kernels
-set this feature automatically when a file > 2GB is created.)
-.TP
-.B quota
-Create quota inodes (inode# 3 for userquota and inode# 4 for group quota) and
-set them in the superblock. With this feature, the quotas will be enabled
-automatically when the filesystem is mounted.
-.TP
-.B resize_inode
-Reserve space so the block group descriptor table may grow in the future.
-Useful for online resizing using
-.BR resize2fs .
-By default
-.B mke2fs
-will attempt to reserve enough space so that the
-filesystem may grow to 1024 times its initial size. This can be changed
-using the
-.B resize
-extended option.
-.TP
-.B sparse_super
-Create a filesystem with fewer superblock backup copies
-(saves space on large filesystems).
-.TP
-.B uninit_bg
-Create a filesystem without initializing all of the block groups. This
-feature also enables checksums and highest-inode-used statistics in each
-blockgroup. This feature can
-speed up filesystem creation time noticeably (if lazy_itable_init is
-enabled), and can also reduce
-.BR e2fsck
-time dramatically. It is only supported by the ext4 filesystem in
-recent Linux kernels.
-.RE
+For more information about the features which can be set, please see
+the manual page
+.BR ext4 (5).
.TP
.B \-q
Quiet execution. Useful if
@@ -616,18 +608,19 @@ or there is no chance of recovery.
.\" using the specified test.
.TP
.BI \-t " fs-type"
-Specify the filesystem type (i.e., ext2, ext3, ext4, etc.) that is to be created.
+Specify the filesystem type (i.e., ext2, ext3, ext4, etc.) that is
+to be created.
If this option is not specified,
.B mke2fs
will pick a default either via how
the command was run (for example, using a name of the form mkfs.ext2,
mkfs.ext3, etc.) or via a default as defined by the
-.BR /etc/mke2fs.conf (5)
+.B /etc/mke2fs.conf
file. This option controls which filesystem options are used by
default, based on the
.B fstypes
configuration stanza in
-.BR /etc/mke2fs.conf (5).
+.BR /etc/mke2fs.conf .
.sp
If the
.B \-O
@@ -646,7 +639,7 @@ Specify how the filesystem is going to be used, so that
.B mke2fs
can choose optimal filesystem parameters for that use. The usage
types that are supported are defined in the configuration file
-.BR /etc/mke2fs.conf (5).
+.BR /etc/mke2fs.conf .
The user may specify one or more usage types
using a comma separated list.
.sp
@@ -730,4 +723,5 @@ http://e2fsprogs.sourceforge.net.
.BR badblocks (8),
.BR dumpe2fs (8),
.BR e2fsck (8),
-.BR tune2fs (8)
+.BR tune2fs (8),
+.BR ext4 (5)