Blame misc/ext4.5.in

Packit a62e42
.\" -*- nroff -*-
Packit a62e42
.\" Copyright 1993, 1994, 1995 by Theodore Ts'o.  All Rights Reserved.
Packit a62e42
.\" This file may be copied under the terms of the GNU Public License.
Packit a62e42
.\"
Packit a62e42
.TH EXT4 5 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
Packit a62e42
.SH NAME
Packit a62e42
ext2 \- the second extended file system
Packit a62e42
.br
Packit a62e42
ext3 \- the third extended file system
Packit a62e42
.br
Packit a62e42
ext4 \- the fourth extended file system
Packit a62e42
.SH DESCRIPTION
Packit a62e42
The second, third, and fourth extended file systems, or ext2, ext3, and
Packit a62e42
ext4 as they are commonly known, are Linux file systems that have
Packit a62e42
historically been the default file system for many Linux distributions.
Packit a62e42
They are general purpose file systems that have been designed for
Packit a62e42
extensibility and backwards compatibility.  In particular, file systems
Packit a62e42
previously intended for use with the ext2 and ext3 file systems can be
Packit a62e42
mounted using the ext4 file system driver, and indeed in many modern
Packit a62e42
Linux distributions, the ext4 file system driver has been configured
Packit a62e42
to handle mount requests for ext2 and ext3 file systems.
Packit 5e3edd
.SH RED HAT ENTERPRISE LINUX 8
Packit 5e3edd
The Ext4 file system is fully supported by Red Hat when using default
Packit 5e3edd
mke2fs and mount options. In addition, the following non-default mke2fs
Packit 5e3edd
features and mount options are also fully supported.
Packit 5e3edd
.SH "Non-default features:"
Packit 5e3edd
project
Packit 5e3edd
.br
Packit 5e3edd
quota
Packit 5e3edd
.br
Packit 5e3edd
mmp
Packit 5e3edd
.br
Packit 5e3edd
.SH "Non-default mount options:"
Packit 5e3edd
bsddf|minixdf
Packit 5e3edd
.br
Packit 5e3edd
grpid|bsdgroups and nogrpid|sysvgroups
Packit 5e3edd
.br
Packit 5e3edd
resgid=n and resuid=n
Packit 5e3edd
.br
Packit 5e3edd
errors={continue|remount-ro|panic}
Packit 5e3edd
.br
Packit 5e3edd
commit=nrsec
Packit 5e3edd
.br
Packit 5e3edd
max_batch_time=usec
Packit 5e3edd
.br
Packit 5e3edd
min_batch_time=usec
Packit 5e3edd
.br
Packit 5e3edd
grpquota|noquota|quota|usrquota
Packit 5e3edd
.br
Packit 5e3edd
prjquota
Packit 5e3edd
.br
Packit 5e3edd
dax
Packit 5e3edd
.br
Packit 5e3edd
lazytime|nolazytime
Packit 5e3edd
.br
Packit 5e3edd
discard|nodiscard
Packit 5e3edd
.br
Packit 5e3edd
init_itable|noinit_itable
Packit 5e3edd
.br
Packit 5e3edd
jqfmt={vfsold|vfsv0|vfsv1}
Packit 5e3edd
.br
Packit 5e3edd
usrjquota=aquota.user|grpjquota=aquota.group
Packit 5e3edd
.PP
Packit 5e3edd
For more information on features and mount options, see the
Packit 5e3edd
.BR ext4
Packit 5e3edd
man page. Ext4 features and mount options not listed above may not be
Packit 5e3edd
fully supported by Red Hat.  If your workload requires a feature or mount
Packit 5e3edd
option that is not fully in this Red Hat release, contact Red Hat support
Packit 5e3edd
to evaluate it for inclusion in our supported list.
Packit a62e42
.SH FILE SYSTEM FEATURES
Packit a62e42
A file system formatted for ext2, ext3, or ext4 can have some
Packit a62e42
collection of the following file system feature flags enabled.  Some of
Packit a62e42
these features are not supported by all implementations of the ext2,
Packit a62e42
ext3, and ext4 file system drivers, depending on Linux kernel version in
Packit a62e42
use.  On other operating systems, such as the GNU/HURD or FreeBSD, only
Packit a62e42
a very restrictive set of file system features may be supported in their
Packit a62e42
implementations of ext2.
Packit a62e42
.TP
Packit a62e42
.B 64bit
Packit a62e42
.br
Packit a62e42
Enables the file system to be larger than 2^32 blocks.  This feature is set
Packit a62e42
automatically, as needed, but it can be useful to specify this feature
Packit a62e42
explicitly if the file system might need to be resized larger than 2^32
Packit a62e42
blocks, even if it was smaller than that threshold when it was
Packit a62e42
originally created.  Note that some older kernels and older versions
Packit a62e42
of e2fsprogs will not support file systems with this ext4 feature enabled.
Packit a62e42
.TP
Packit a62e42
.B bigalloc
Packit a62e42
.br
Packit a62e42
This ext4 feature enables clustered block allocation, so that the unit of
Packit a62e42
allocation is a power of two number of blocks.  That is, each bit in the
Packit a62e42
what had traditionally been known as the block allocation bitmap now
Packit a62e42
indicates whether a cluster is in use or not, where a cluster is by
Packit a62e42
default composed of 16 blocks.  This feature can decrease the time
Packit a62e42
spent on doing block allocation and brings smaller fragmentation, especially
Packit a62e42
for large files.  The size can be specified using the
Packit a62e42
.B mke2fs \-C
Packit a62e42
option.
Packit a62e42
.IP
Packit a62e42
.B Warning:
Packit a62e42
The bigalloc feature is still under development, and may not be fully
Packit a62e42
supported with your kernel or may have various bugs.  Please see the web
Packit a62e42
page http://ext4.wiki.kernel.org/index.php/Bigalloc for details.
Packit a62e42
May clash with delayed allocation (see
Packit a62e42
.B nodelalloc
Packit a62e42
mount option).
Packit a62e42
.IP
Packit a62e42
This feature requires that the
Packit a62e42
.B extent
Packit a62e42
feature be enabled.
Packit a62e42
.TP
Packit a62e42
.B casefold
Packit a62e42
.br
Packit a62e42
This ext4 feature provides file system level character encoding support
Packit a62e42
for directories with the casefold (+F) flag enabled.  This feature is
Packit a62e42
name-preserving on the disk, but it allows applications to lookup for a
Packit a62e42
file in the file system using an encoding equivalent version of the file
Packit a62e42
name.
Packit a62e42
.TP
Packit a62e42
.B dir_index
Packit a62e42
.br
Packit a62e42
Use hashed b-trees to speed up name lookups in large directories.  This
Packit a62e42
feature is supported by ext3 and ext4 file systems, and is ignored by
Packit a62e42
ext2 file systems.
Packit a62e42
.TP
Packit a62e42
.B dir_nlink
Packit a62e42
.br
Packit a62e42
Normally, ext4 allows an inode to have no more than 65,000 hard links.
Packit a62e42
This applies to regular files as well as directories, which means that
Packit a62e42
there can be no more than 64,998 subdirectories in a directory (because
Packit a62e42
each of the '.' and '..' entries, as well as the directory entry for the
Packit a62e42
directory in its parent directory counts as a hard link).  This feature
Packit a62e42
lifts this limit by causing ext4 to use a link count of 1 to indicate
Packit a62e42
that the number of hard links to a directory is not known when the link
Packit a62e42
count might exceed the maximum count limit.
Packit a62e42
.TP
Packit a62e42
.B ea_inode
Packit a62e42
.br
Packit a62e42
Normally, a file's extended attributes and associated metadata must fit within
Packit a62e42
the inode or the inode's associated extended attribute block. This feature
Packit a62e42
allows the value of each extended attribute to be placed in the data blocks of a
Packit a62e42
separate inode if necessary, increasing the limit on the size and number of
Packit a62e42
extended attributes per file.
Packit a62e42
.TP
Packit a62e42
.B encrypt
Packit a62e42
.br
Packit a62e42
Enables support for file-system level encryption of data blocks and file
Packit a62e42
names.  The inode metadata (timestamps, file size, user/group ownership,
Packit a62e42
etc.) is
Packit a62e42
.I not
Packit a62e42
encrypted.
Packit a62e42
.IP
Packit a62e42
This feature is most useful on file systems with multiple users, or
Packit a62e42
where not all files should be encrypted.  In many use cases, especially
Packit a62e42
on single-user systems, encryption at the block device layer using
Packit a62e42
dm-crypt may provide much better security.
Packit a62e42
.TP
Packit a62e42
.B ext_attr
Packit a62e42
.br
Packit a62e42
This feature enables the use of extended attributes.  This feature is
Packit a62e42
supported by ext2, ext3, and ext4.
Packit a62e42
.TP
Packit a62e42
.B extent
Packit a62e42
.br
Packit a62e42
This ext4 feature allows the mapping of logical block numbers for a
Packit a62e42
particular inode to physical blocks on the storage device to be stored
Packit a62e42
using an extent tree, which is a more efficient data structure than the
Packit a62e42
traditional indirect block scheme used by the ext2 and ext3 file
Packit a62e42
systems.  The use of the extent tree decreases metadata block overhead,
Packit a62e42
improves file system performance, and decreases the needed to run
Packit a62e42
.BR e2fsck (8)
Packit a62e42
on the file system.
Packit a62e42
(Note: both
Packit a62e42
.B extent
Packit a62e42
and
Packit a62e42
.B extents
Packit a62e42
are accepted as valid names for this feature for
Packit a62e42
historical/backwards compatibility reasons.)
Packit a62e42
.TP
Packit a62e42
.B extra_isize
Packit a62e42
.br
Packit a62e42
This ext4 feature reserves a specific amount of space in each inode for
Packit a62e42
extended metadata such as nanosecond timestamps and file creation time,
Packit a62e42
even if the current kernel does not currently need to reserve this much
Packit a62e42
space.  Without this feature, the kernel will reserve the amount of
Packit a62e42
space for features it currently needs, and the rest may be
Packit a62e42
consumed by extended attributes.
Packit a62e42
Packit a62e42
For this feature to be useful the inode size must be 256 bytes in size
Packit a62e42
or larger.
Packit a62e42
.TP
Packit a62e42
.B filetype
Packit a62e42
.br
Packit a62e42
This feature enables the storage of file type information in directory
Packit a62e42
entries.  This feature is supported by ext2, ext3, and ext4.
Packit a62e42
.TP
Packit a62e42
.B flex_bg
Packit a62e42
.br
Packit a62e42
This ext4 feature allows the per-block group metadata (allocation
Packit a62e42
bitmaps
Packit a62e42
and inode tables)
Packit a62e42
to be placed anywhere on the storage media.  In addition,
Packit a62e42
.B mke2fs
Packit a62e42
will place the per-block group metadata together starting at the first
Packit a62e42
block group of each "flex_bg group".   The size of the flex_bg group
Packit a62e42
can be specified using the
Packit a62e42
.B \-G
Packit a62e42
option.
Packit a62e42
.TP
Packit a62e42
.B has_journal
Packit a62e42
.br
Packit a62e42
Create a journal to ensure filesystem consistency even across unclean
Packit a62e42
shutdowns.  Setting the filesystem feature is equivalent to using the
Packit a62e42
.B \-j
Packit a62e42
option with
Packit a62e42
.BR mke2fs " or " tune2fs.
Packit a62e42
This feature is supported by ext3 and ext4, and ignored by the
Packit a62e42
ext2 file system driver.
Packit a62e42
.TP
Packit a62e42
.B huge_file
Packit a62e42
.br
Packit a62e42
This ext4 feature allows files to be larger than 2 terabytes in size.
Packit a62e42
.TP
Packit a62e42
.B inline_data
Packit a62e42
Allow data to be stored in the inode and extended attribute area.
Packit a62e42
.TP
Packit a62e42
.B journal_dev
Packit a62e42
.br
Packit a62e42
This feature is enabled on the superblock found on an external journal
Packit a62e42
device.  The block size for the external journal must be the same as the
Packit a62e42
file system which uses it.
Packit a62e42
.IP
Packit a62e42
The external journal device can be used by a file system by specifying
Packit a62e42
the
Packit a62e42
.B \-J
Packit a62e42
.BR device= <external-device>
Packit a62e42
option to
Packit a62e42
.BR mke2fs (8)
Packit a62e42
or
Packit a62e42
.BR tune2fs(8) .
Packit a62e42
.TP
Packit a62e42
.B large_dir
Packit a62e42
.br
Packit a62e42
This feature increases the limit on the number of files per directory by
Packit a62e42
raising the maximum size of directories and, for hashed b-tree directories (see
Packit a62e42
.BR dir_index ),
Packit a62e42
the maximum height of the hashed b-tree used to store the directory entries.
Packit a62e42
.TP
Packit a62e42
.B large_file
Packit a62e42
.br
Packit a62e42
This feature flag is set automatically by modern kernels when a file
Packit a62e42
larger than 2 gigabytes is created.  Very old kernels could not
Packit a62e42
handle large files, so this feature flag was used to prohibit those
Packit a62e42
kernels from mounting file systems that they could not understand.
Packit a62e42
.TP
Packit a62e42
.B metadata_csum
Packit a62e42
.br
Packit a62e42
This ext4 feature enables metadata checksumming.  This feature stores
Packit a62e42
checksums for all of the filesystem metadata (superblock, group
Packit a62e42
descriptor blocks, inode and block bitmaps, directories, and
Packit a62e42
extent tree blocks).  The checksum algorithm used for the metadata
Packit a62e42
blocks is different than the one used for group descriptors with the
Packit a62e42
.B uninit_bg
Packit a62e42
feature.  These two features are incompatible and
Packit a62e42
.B metadata_csum
Packit a62e42
will be used preferentially instead of
Packit a62e42
.BR uninit_bg .
Packit a62e42
.TP
Packit a62e42
.B metadata_csum_seed
Packit a62e42
.br
Packit a62e42
This feature allows the filesystem to store the metadata checksum seed in the
Packit a62e42
superblock, which allows the administrator to change the UUID of a filesystem
Packit a62e42
using the
Packit a62e42
.B metadata_csum
Packit a62e42
feature while it is mounted.
Packit a62e42
.TP
Packit a62e42
.B meta_bg
Packit a62e42
.br
Packit a62e42
This ext4 feature allows file systems to be resized on-line without explicitly
Packit a62e42
needing to reserve space for growth in the size of the block group
Packit a62e42
descriptors.  This scheme is also used to resize file systems which are
Packit a62e42
larger than 2^32 blocks.  It is not recommended that this feature be set
Packit a62e42
when a file system is created, since this alternate method of storing
Packit a62e42
the block group descriptors will slow down the time needed to mount the
Packit a62e42
file system, and newer kernels can automatically set this feature as
Packit a62e42
necessary when doing an online resize and no more reserved space is
Packit a62e42
available in the resize inode.
Packit a62e42
.TP
Packit a62e42
.B mmp
Packit a62e42
.br
Packit a62e42
This ext4 feature provides multiple mount protection (MMP).  MMP helps to
Packit a62e42
protect the filesystem from being multiply mounted and is useful in
Packit a62e42
shared storage environments.
Packit a62e42
.TP
Packit a62e42
.B project
Packit a62e42
.br
Packit a62e42
This ext4 feature provides project quota support. With this feature,
Packit a62e42
the project ID of inode will be managed when the filesystem is mounted.
Packit a62e42
.TP
Packit a62e42
.B quota
Packit a62e42
.br
Packit a62e42
Create quota inodes (inode #3 for userquota and inode
Packit a62e42
#4 for group quota) and set them in the superblock.
Packit a62e42
With this feature, the quotas will be enabled
Packit a62e42
automatically when the filesystem is mounted.
Packit a62e42
.IP
Packit a62e42
Causes the quota files (i.e., user.quota and
Packit a62e42
group.quota which existed
Packit a62e42
in the older quota design) to be hidden inodes.
Packit a62e42
.TP
Packit a62e42
.B resize_inode
Packit a62e42
.br
Packit a62e42
This file system feature indicates that space has been reserved so that
Packit a62e42
the block group descriptor table can be extended while resizing a mounted
Packit a62e42
file system.  The online resize operation
Packit a62e42
is carried out by the kernel, triggered by
Packit a62e42
.BR resize2fs (8).
Packit a62e42
By default
Packit a62e42
.B mke2fs
Packit a62e42
will attempt to reserve enough space so that the
Packit a62e42
filesystem may grow to 1024 times its initial size.  This can be changed
Packit a62e42
using the
Packit a62e42
.B resize
Packit a62e42
extended option.
Packit a62e42
.IP
Packit a62e42
This feature requires that the
Packit a62e42
.B sparse_super
Packit a62e42
or
Packit a62e42
.B sparse_super2
Packit a62e42
feature be enabled.
Packit a62e42
.TP
Packit a62e42
.B sparse_super
Packit a62e42
.br
Packit a62e42
This file system feature is set on all modern ext2, ext3, and ext4 file
Packit a62e42
systems.  It indicates that backup copies of the superblock and block
Packit a62e42
group descriptors are present only in a few block groups, not all of
Packit a62e42
them.
Packit a62e42
.TP
Packit a62e42
.B sparse_super2
Packit a62e42
.br
Packit a62e42
This feature indicates that there will only be at most two backup
Packit a62e42
superblocks and block group descriptors.  The block groups used to store
Packit a62e42
the backup superblock(s) and blockgroup descriptor(s) are stored in the
Packit a62e42
superblock, but typically, one will be located at the beginning of block
Packit a62e42
group #1, and one in the last block group in the file system.  This
Packit a62e42
feature is essentially a more extreme version of sparse_super and is
Packit a62e42
designed to allow a much larger percentage of the disk to have
Packit a62e42
contiguous blocks available for data files.
Packit a62e42
.TP
Packit a62e42
.B uninit_bg
Packit a62e42
.br
Packit a62e42
This ext4 file system feature indicates that the block group descriptors
Packit a62e42
will be protected using checksums, making it safe for
Packit a62e42
.BR mke2fs (8)
Packit a62e42
to create a file system without initializing all of the block groups.
Packit a62e42
The kernel will keep a high watermark of unused inodes, and initialize
Packit a62e42
inode tables and blocks lazily.  This feature speeds up the time to check
Packit a62e42
the file system using
Packit a62e42
.BR e2fsck (8),
Packit a62e42
and it also speeds up the time required for
Packit a62e42
.BR mke2fs (8)
Packit a62e42
to create the file system.
Packit a62e42
.TP
Packit a62e42
.B verity
Packit a62e42
.br
Packit a62e42
Enables support for verity protected files.  Verity files are readonly,
Packit a62e42
and their data is transparently verified against a Merkle tree hidden
Packit a62e42
past the end of the file.  Using the Merkle tree's root hash, a verity
Packit a62e42
file can be efficiently authenticated, independent of the file's size.
Packit a62e42
.IP
Packit a62e42
This feature is most useful for authenticating important read-only files
Packit a62e42
on read-write file systems.  If the file system itself is read-only,
Packit a62e42
then using dm-verity to authenticate the entire block device may provide
Packit a62e42
much better security.
Packit a62e42
.SH MOUNT OPTIONS
Packit a62e42
This section describes mount options which are specific to ext2, ext3,
Packit a62e42
and ext4.  Other generic mount options may be used as well; see
Packit a62e42
.BR mount (8)
Packit a62e42
for details.
Packit a62e42
.SH "Mount options for ext2"
Packit a62e42
The `ext2' filesystem is the standard Linux filesystem.
Packit a62e42
Since Linux 2.5.46, for most mount options the default
Packit a62e42
is determined by the filesystem superblock. Set them with
Packit a62e42
.BR tune2fs (8).
Packit a62e42
.TP
Packit a62e42
.BR acl | noacl
Packit a62e42
Support POSIX Access Control Lists (or not).  See the
Packit a62e42
.BR acl (5)
Packit a62e42
manual page.
Packit a62e42
.TP
Packit a62e42
.BR bsddf | minixdf
Packit a62e42
Set the behavior for the
Packit a62e42
.I statfs
Packit a62e42
system call. The
Packit a62e42
.B minixdf
Packit a62e42
behavior is to return in the
Packit a62e42
.I f_blocks
Packit a62e42
field the total number of blocks of the filesystem, while the
Packit a62e42
.B bsddf
Packit a62e42
behavior (which is the default) is to subtract the overhead blocks
Packit a62e42
used by the ext2 filesystem and not available for file storage. Thus
Packit a62e42
.sp 1
Packit a62e42
% mount /k \-o minixdf; df /k; umount /k
Packit a62e42
.TS
Packit a62e42
tab(#);
Packit a62e42
l2 l2 r2 l2 l2 l
Packit a62e42
l c r c c l.
Packit a62e42
Filesystem#1024-blocks#Used#Available#Capacity#Mounted on
Packit a62e42
/dev/sda6#2630655#86954#2412169#3%#/k
Packit a62e42
.TE
Packit a62e42
.sp 1
Packit a62e42
% mount /k \-o bsddf; df /k; umount /k
Packit a62e42
.TS
Packit a62e42
tab(#);
Packit a62e42
l2 l2 r2 l2 l2 l
Packit a62e42
l c r c c l.
Packit a62e42
Filesystem#1024-blocks#Used#Available#Capacity#Mounted on
Packit a62e42
/dev/sda6#2543714#13#2412169#0%#/k
Packit a62e42
.TE
Packit a62e42
.sp 1
Packit a62e42
(Note that this example shows that one can add command line options
Packit a62e42
to the options given in
Packit a62e42
.IR /etc/fstab .)
Packit a62e42
.TP
Packit a62e42
.BR check=none " or " nocheck
Packit a62e42
No checking is done at mount time. This is the default. This is fast.
Packit a62e42
It is wise to invoke
Packit a62e42
.BR e2fsck (8)
Packit a62e42
every now and then, e.g.\& at boot time. The non-default behavior is unsupported
Packit a62e42
(check=normal and check=strict options have been removed). Note that these mount options
Packit a62e42
don't have to be supported if ext4 kernel driver is used for ext2 and ext3 filesystems.
Packit a62e42
.TP
Packit a62e42
.B debug
Packit a62e42
Print debugging info upon each (re)mount.
Packit a62e42
.TP
Packit a62e42
.BR errors= { continue | remount-ro | panic }
Packit a62e42
Define the behavior when an error is encountered.
Packit a62e42
(Either ignore errors and just mark the filesystem erroneous and continue,
Packit a62e42
or remount the filesystem read-only, or panic and halt the system.)
Packit a62e42
The default is set in the filesystem superblock, and can be
Packit a62e42
changed using
Packit a62e42
.BR tune2fs (8).
Packit a62e42
.TP
Packit a62e42
.BR grpid | bsdgroups " and " nogrpid | sysvgroups
Packit a62e42
These options define what group id a newly created file gets.
Packit a62e42
When
Packit a62e42
.B grpid
Packit a62e42
is set, it takes the group id of the directory in which it is created;
Packit a62e42
otherwise (the default) it takes the fsgid of the current process, unless
Packit a62e42
the directory has the setgid bit set, in which case it takes the gid
Packit a62e42
from the parent directory, and also gets the setgid bit set
Packit a62e42
if it is a directory itself.
Packit a62e42
.TP
Packit a62e42
.BR grpquota | noquota | quota | usrquota
Packit a62e42
The usrquota (same as quota) mount option enables user quota support on the
Packit a62e42
filesystem. grpquota enables group quotas support. You need the quota utilities
Packit a62e42
to actually enable and manage the quota system.
Packit a62e42
.TP
Packit a62e42
.B nouid32
Packit a62e42
Disables 32-bit UIDs and GIDs.  This is for interoperability with older
Packit a62e42
kernels which only store and expect 16-bit values.
Packit a62e42
.TP
Packit a62e42
.BR oldalloc " or " orlov
Packit a62e42
Use old allocator or Orlov allocator for new inodes. Orlov is default.
Packit a62e42
.TP
Packit a62e42
\fBresgid=\fP\,\fIn\fP and \fBresuid=\fP\,\fIn\fP
Packit a62e42
The ext2 filesystem reserves a certain percentage of the available
Packit a62e42
space (by default 5%, see
Packit a62e42
.BR mke2fs (8)
Packit a62e42
and
Packit a62e42
.BR tune2fs (8)).
Packit a62e42
These options determine who can use the reserved blocks.
Packit a62e42
(Roughly: whoever has the specified uid, or belongs to the specified group.)
Packit a62e42
.TP
Packit a62e42
.BI sb= n
Packit a62e42
Instead of using the normal superblock, use an alternative superblock
Packit a62e42
specified by
Packit a62e42
.IR n .
Packit a62e42
This option is normally used when the primary superblock has been
Packit a62e42
corrupted.  The location of backup superblocks is dependent on the
Packit a62e42
filesystem's blocksize, the number of blocks per group, and features
Packit a62e42
such as
Packit a62e42
.BR sparse_super .
Packit a62e42
.IP
Packit a62e42
Additional backup superblocks can be determined by using the
Packit a62e42
.B mke2fs
Packit a62e42
program using the
Packit a62e42
.B \-n
Packit a62e42
option to print out where the superblocks exist, supposing
Packit a62e42
.B mke2fs
Packit a62e42
is supplied with arguments that are consistent with the filesystem's layout
Packit a62e42
(e.g. blocksize, blocks per group,
Packit a62e42
.BR sparse_super ,
Packit a62e42
etc.).
Packit a62e42
.IP
Packit a62e42
The block number here uses 1\ k units. Thus, if you want to use logical
Packit a62e42
block 32768 on a filesystem with 4\ k blocks, use "sb=131072".
Packit a62e42
.TP
Packit a62e42
.BR user_xattr | nouser_xattr
Packit a62e42
Support "user." extended attributes (or not).
Packit a62e42
Packit a62e42
Packit a62e42
.SH "Mount options for ext3"
Packit a62e42
The ext3 filesystem is a version of the ext2 filesystem which has been
Packit a62e42
enhanced with journaling.  It supports the same options as ext2 as
Packit a62e42
well as the following additions:
Packit a62e42
.TP
Packit a62e42
.BR journal_dev=devnum / journal_path=path
Packit a62e42
When the external journal device's major/minor numbers
Packit a62e42
have changed, these options allow the user to specify
Packit a62e42
the new journal location.  The journal device is
Packit a62e42
identified either through its new major/minor numbers encoded
Packit a62e42
in devnum, or via a path to the device.
Packit a62e42
.TP
Packit a62e42
.BR norecovery / noload
Packit a62e42
Don't load the journal on mounting.  Note that
Packit a62e42
if the filesystem was not unmounted cleanly,
Packit a62e42
skipping the journal replay will lead to the
Packit a62e42
filesystem containing inconsistencies that can
Packit a62e42
lead to any number of problems.
Packit a62e42
.TP
Packit a62e42
.BR data= { journal | ordered | writeback }
Packit a62e42
Specifies the journaling mode for file data.  Metadata is always journaled.
Packit a62e42
To use modes other than
Packit a62e42
.B ordered
Packit a62e42
on the root filesystem, pass the mode to the kernel as boot parameter, e.g.\&
Packit a62e42
.IR rootflags=data=journal .
Packit a62e42
.RS
Packit a62e42
.TP
Packit a62e42
.B journal
Packit a62e42
All data is committed into the journal prior to being written into the
Packit a62e42
main filesystem.
Packit a62e42
.TP
Packit a62e42
.B ordered
Packit a62e42
This is the default mode.  All data is forced directly out to the main file
Packit a62e42
system prior to its metadata being committed to the journal.
Packit a62e42
.TP
Packit a62e42
.B writeback
Packit a62e42
Data ordering is not preserved \(en data may be written into the main
Packit a62e42
filesystem after its metadata has been committed to the journal.
Packit a62e42
This is rumoured to be the highest-throughput option.  It guarantees
Packit a62e42
internal filesystem integrity, however it can allow old data to appear
Packit a62e42
in files after a crash and journal recovery.
Packit a62e42
.RE
Packit a62e42
.TP
Packit a62e42
.B data_err=ignore
Packit a62e42
Just print an error message if an error occurs in a file data buffer in
Packit a62e42
ordered mode.
Packit a62e42
.TP
Packit a62e42
.B data_err=abort
Packit a62e42
Abort the journal if an error occurs in a file data buffer in ordered mode.
Packit a62e42
.TP
Packit a62e42
.BR barrier=0 " / " barrier=1 "
Packit a62e42
This disables / enables the use of write barriers in the jbd code.  barrier=0
Packit a62e42
disables, barrier=1 enables (default). This also requires an IO stack which can
Packit a62e42
support barriers, and if jbd gets an error on a barrier write, it will disable
Packit a62e42
barriers again with a warning.  Write barriers enforce proper on-disk ordering
Packit a62e42
of journal commits, making volatile disk write caches safe to use, at some
Packit a62e42
performance penalty.  If your disks are battery-backed in one way or another,
Packit a62e42
disabling barriers may safely improve performance.
Packit a62e42
.TP
Packit a62e42
.BI commit= nrsec
Packit a62e42
Start a journal commit every
Packit a62e42
.I nrsec
Packit a62e42
seconds.  The default value is 5 seconds.  Zero means default.
Packit a62e42
.TP
Packit a62e42
.B user_xattr
Packit a62e42
Enable Extended User Attributes. See the
Packit a62e42
.BR attr (5)
Packit a62e42
manual page.
Packit a62e42
.TP
Packit a62e42
.BR jqfmt= { vfsold | vfsv0 | vfsv1 }
Packit a62e42
Apart from the old quota system (as in ext2, jqfmt=vfsold aka version 1 quota)
Packit a62e42
ext3 also supports journaled quotas (version 2 quota). jqfmt=vfsv0 or
Packit a62e42
jqfmt=vfsv1 enables journaled quotas. Journaled quotas have the advantage that
Packit a62e42
even after a crash no quota check is required. When the
Packit a62e42
.B quota
Packit a62e42
filesystem feature is enabled, journaled quotas are used automatically, and
Packit a62e42
this mount option is ignored.
Packit a62e42
.TP
Packit a62e42
.BR usrjquota=aquota.user | grpjquota=aquota.group
Packit a62e42
For journaled quotas (jqfmt=vfsv0 or jqfmt=vfsv1), the mount options
Packit a62e42
usrjquota=aquota.user and grpjquota=aquota.group are required to tell the
Packit a62e42
quota system which quota database files to use. When the
Packit a62e42
.B quota
Packit a62e42
filesystem feature is enabled, journaled quotas are used automatically, and
Packit a62e42
this mount option is ignored.
Packit a62e42
Packit a62e42
.SH "Mount options for ext4"
Packit a62e42
The ext4 filesystem is an advanced level of the ext3 filesystem which
Packit a62e42
incorporates scalability and reliability enhancements for supporting large
Packit a62e42
filesystem.
Packit a62e42
Packit a62e42
The options
Packit a62e42
.B journal_dev, journal_path, norecovery, noload, data, commit, orlov,
Packit a62e42
.B oldalloc, [no]user_xattr, [no]acl, bsddf, minixdf, debug, errors,
Packit a62e42
.B data_err, grpid, bsdgroups, nogrpid, sysvgroups, resgid, resuid, sb,
Packit a62e42
.B quota, noquota, nouid32, grpquota, usrquota, usrjquota, grpjquota,
Packit a62e42
.B and jqfmt are backwardly compatible with ext3 or ext2.
Packit a62e42
.TP
Packit a62e42
.B journal_checksum | nojournal_checksum
Packit a62e42
The journal_checksum option enables checksumming of the journal transactions.
Packit a62e42
This will allow the recovery code in e2fsck and the kernel to detect corruption
Packit a62e42
in the kernel. It is a compatible change and will be ignored by older kernels.
Packit a62e42
.TP
Packit a62e42
.B journal_async_commit
Packit a62e42
Commit block can be written to disk without waiting for descriptor blocks. If
Packit a62e42
enabled older kernels cannot mount the device.
Packit a62e42
This will enable 'journal_checksum' internally.
Packit a62e42
.TP
Packit a62e42
.BR barrier=0 " / " barrier=1 " / " barrier " / " nobarrier
Packit a62e42
These mount options have the same effect as in ext3.  The mount options
Packit a62e42
"barrier" and "nobarrier" are added for consistency with other ext4 mount
Packit a62e42
options.
Packit a62e42
Packit a62e42
The ext4 filesystem enables write barriers by default.
Packit a62e42
.TP
Packit a62e42
.BI inode_readahead_blks= n
Packit a62e42
This tuning parameter controls the maximum number of inode table blocks that
Packit a62e42
ext4's inode table readahead algorithm will pre-read into the buffer cache.
Packit a62e42
The value must be a power of 2. The default value is 32 blocks.
Packit a62e42
.TP
Packit a62e42
.BI stripe= n
Packit a62e42
Number of filesystem blocks that mballoc will try to use for allocation size
Packit a62e42
and alignment. For RAID5/6 systems this should be the number of data disks *
Packit a62e42
RAID chunk size in filesystem blocks.
Packit a62e42
.TP
Packit a62e42
.B delalloc
Packit a62e42
Deferring block allocation until write-out time.
Packit a62e42
.TP
Packit a62e42
.B nodelalloc
Packit a62e42
Disable delayed allocation. Blocks are allocated when data is copied from user
Packit a62e42
to page cache.
Packit a62e42
.TP
Packit a62e42
.BI max_batch_time= usec
Packit a62e42
Maximum amount of time ext4 should wait for additional filesystem operations to
Packit a62e42
be batch together with a synchronous write operation. Since a synchronous
Packit a62e42
write operation is going to force a commit and then a wait for the I/O
Packit a62e42
complete, it doesn't cost much, and can be a huge throughput win, we wait for a
Packit a62e42
small amount of time to see if any other transactions can piggyback on the
Packit a62e42
synchronous write. The algorithm used is designed to automatically tune for
Packit a62e42
the speed of the disk, by measuring the amount of time (on average) that it
Packit a62e42
takes to finish committing a transaction. Call this time the "commit time".
Packit a62e42
If the time that the transaction has been running is less than the commit time,
Packit a62e42
ext4 will try sleeping for the commit time to see if other operations will join
Packit a62e42
the transaction. The commit time is capped by the max_batch_time, which
Packit a62e42
defaults to 15000\ \[mc]s (15\ ms). This optimization can be turned off entirely by
Packit a62e42
setting max_batch_time to 0.
Packit a62e42
.TP
Packit a62e42
.BI min_batch_time= usec
Packit a62e42
This parameter sets the commit time (as described above) to be at least
Packit a62e42
min_batch_time. It defaults to zero microseconds. Increasing this parameter
Packit a62e42
may improve the throughput of multi-threaded, synchronous workloads on very
Packit a62e42
fast disks, at the cost of increasing latency.
Packit a62e42
.TP
Packit a62e42
.BI journal_ioprio= prio
Packit a62e42
The I/O priority (from 0 to 7, where 0 is the highest priority) which should be
Packit a62e42
used for I/O operations submitted by kjournald2 during a commit operation.
Packit a62e42
This defaults to 3, which is a slightly higher priority than the default I/O
Packit a62e42
priority.
Packit a62e42
.TP
Packit a62e42
.B abort
Packit a62e42
Simulate the effects of calling ext4_abort() for
Packit a62e42
debugging purposes.  This is normally used while
Packit a62e42
remounting a filesystem which is already mounted.
Packit a62e42
.TP
Packit a62e42
.BR auto_da_alloc | noauto_da_alloc
Packit a62e42
Many broken applications don't use fsync() when
Packit a62e42
replacing existing files via patterns such as
Packit a62e42
Packit a62e42
fd = open("foo.new")/write(fd,...)/close(fd)/ rename("foo.new", "foo")
Packit a62e42
Packit a62e42
or worse yet
Packit a62e42
Packit a62e42
fd = open("foo", O_TRUNC)/write(fd,...)/close(fd).
Packit a62e42
Packit a62e42
If auto_da_alloc is enabled, ext4 will detect the replace-via-rename and
Packit a62e42
replace-via-truncate patterns and force that any delayed allocation blocks are
Packit a62e42
allocated such that at the next journal commit, in the default data=ordered
Packit a62e42
mode, the data blocks of the new file are forced to disk before the rename()
Packit a62e42
operation is committed.  This provides roughly the same level of guarantees as
Packit a62e42
ext3, and avoids the "zero-length" problem that can happen when a system
Packit a62e42
crashes before the delayed allocation blocks are forced to disk.
Packit a62e42
.TP
Packit a62e42
.B noinit_itable
Packit a62e42
Do not initialize any uninitialized inode table blocks in the background. This
Packit a62e42
feature may be used by installation CD's so that the install process can
Packit a62e42
complete as quickly as possible; the inode table initialization process would
Packit a62e42
then be deferred until the next time the filesystem is mounted.
Packit a62e42
.TP
Packit a62e42
.B init_itable=n
Packit a62e42
The lazy itable init code will wait n times the number of milliseconds it took
Packit a62e42
to zero out the previous block group's inode table. This minimizes the impact on
Packit a62e42
system performance while the filesystem's inode table is being initialized.
Packit a62e42
.TP
Packit a62e42
.BR discard / nodiscard
Packit a62e42
Controls whether ext4 should issue discard/TRIM commands to the underlying
Packit a62e42
block device when blocks are freed.  This is useful for SSD devices and
Packit a62e42
sparse/thinly-provisioned LUNs, but it is off by default until sufficient
Packit a62e42
testing has been done.
Packit a62e42
.TP
Packit a62e42
.BR block_validity / noblock_validity
Packit a62e42
This option enables/disables the in-kernel facility for tracking
Packit a62e42
filesystem metadata blocks within internal data structures. This allows multi-\c
Packit a62e42
block allocator and other routines to quickly locate extents which might
Packit a62e42
overlap with filesystem metadata blocks. This option is intended for debugging
Packit a62e42
purposes and since it negatively affects the performance, it is off by default.
Packit a62e42
.TP
Packit a62e42
.BR dioread_lock / dioread_nolock
Packit a62e42
Controls whether or not ext4 should use the DIO read locking. If the
Packit a62e42
dioread_nolock option is specified ext4 will allocate uninitialized extent
Packit a62e42
before buffer write and convert the extent to initialized after IO completes.
Packit a62e42
This approach allows ext4 code to avoid using inode mutex, which improves
Packit a62e42
scalability on high speed storages. However this does not work with data
Packit a62e42
journaling and dioread_nolock option will be ignored with kernel warning.
Packit a62e42
Note that dioread_nolock code path is only used for extent-based files.
Packit a62e42
Because of the restrictions this options comprises it is off by default
Packit a62e42
(e.g.\& dioread_lock).
Packit a62e42
.TP
Packit a62e42
.B max_dir_size_kb=n
Packit a62e42
This limits the size of the directories so that any attempt to expand them
Packit a62e42
beyond the specified limit in kilobytes will cause an ENOSPC error. This is
Packit a62e42
useful in memory-constrained environments, where a very large directory can
Packit a62e42
cause severe performance problems or even provoke the Out Of Memory killer. (For
Packit a62e42
example, if there is only 512\ MB memory available, a 176\ MB directory may
Packit a62e42
seriously cramp the system's style.)
Packit a62e42
.TP
Packit a62e42
.B i_version
Packit a62e42
Enable 64-bit inode version support. This option is off by default.
Packit a62e42
.TP
Packit a62e42
.B nombcache
Packit a62e42
This option disables use of mbcache for extended attribute deduplication. On
Packit a62e42
systems where extended attributes are rarely or never shared between files,
Packit a62e42
use of mbcache for deduplication adds unnecessary computational overhead.
Packit a62e42
.TP
Packit a62e42
.B prjquota
Packit a62e42
The prjquota mount option enables project quota support on the filesystem.
Packit a62e42
You need the quota utilities to actually enable and manage the quota system.
Packit a62e42
This mount option requires the
Packit a62e42
.B project
Packit a62e42
filesystem feature.
Packit a62e42
Packit a62e42
.SH FILE ATTRIBUTES
Packit a62e42
The ext2, ext3, and ext4 filesystems support setting the following file
Packit a62e42
attributes on Linux systems using the
Packit a62e42
.BR chattr (1)
Packit a62e42
utility:
Packit a62e42
.sp
Packit a62e42
.BR a " - append only"
Packit a62e42
.sp
Packit a62e42
.BR A " - no atime updates"
Packit a62e42
.sp
Packit a62e42
.BR d " - no dump"
Packit a62e42
.sp
Packit a62e42
.BR D " - synchronous directory updates"
Packit a62e42
.sp
Packit a62e42
.BR i " - immutable"
Packit a62e42
.sp
Packit a62e42
.BR S " - synchronous updates"
Packit a62e42
.sp
Packit a62e42
.BR u " - undeletable"
Packit a62e42
.sp
Packit a62e42
In addition, the ext3 and ext4 filesystems support the following flag:
Packit a62e42
.sp
Packit a62e42
.BR j " - data journaling"
Packit a62e42
.sp
Packit a62e42
Finally, the ext4 filesystem also supports the following flag:
Packit a62e42
.sp
Packit a62e42
.BR e " - extents format"
Packit a62e42
.sp
Packit a62e42
For descriptions of these attribute flags, please refer to the
Packit a62e42
.BR chattr (1)
Packit a62e42
man page.
Packit a62e42
.SH KERNEL SUPPORT
Packit a62e42
This section lists the file system driver (e.g., ext2, ext3, ext4) and
Packit a62e42
upstream kernel version where a particular file system feature was
Packit a62e42
supported.  Note that in some cases the feature was present in earlier
Packit a62e42
kernel versions, but there were known, serious bugs.  In other cases the
Packit a62e42
feature may still be considered in an experimental state.  Finally, note
Packit a62e42
that some distributions may have backported features into older kernels;
Packit a62e42
in particular the kernel versions in certain "enterprise distributions"
Packit a62e42
can be extremely misleading.
Packit a62e42
.IP "\fBfiletype\fR" 2in
Packit a62e42
ext2, 2.2.0
Packit a62e42
.IP "\fBsparse_super\fR" 2in
Packit a62e42
ext2, 2.2.0
Packit a62e42
.IP "\fBlarge_file\fR" 2in
Packit a62e42
ext2, 2.2.0
Packit a62e42
.IP "\fBhas_journal\fR" 2in
Packit a62e42
ext3, 2.4.15
Packit a62e42
.IP "\fBext_attr\fR" 2in
Packit a62e42
ext2/ext3, 2.6.0
Packit a62e42
.IP "\fBdir_index\fR" 2in
Packit a62e42
ext3, 2.6.0
Packit a62e42
.IP "\fBresize_inode\fR" 2in
Packit a62e42
ext3, 2.6.10 (online resizing)
Packit a62e42
.IP "\fB64bit\fR" 2in
Packit a62e42
ext4, 2.6.28
Packit a62e42
.IP "\fBdir_nlink\fR" 2in
Packit a62e42
ext4, 2.6.28
Packit a62e42
.IP "\fBextent\fR" 2in
Packit a62e42
ext4, 2.6.28
Packit a62e42
.IP "\fBextra_isize\fR" 2in
Packit a62e42
ext4, 2.6.28
Packit a62e42
.IP "\fBflex_bg\fR" 2in
Packit a62e42
ext4, 2.6.28
Packit a62e42
.IP "\fBhuge_file\fR" 2in
Packit a62e42
ext4, 2.6.28
Packit a62e42
.IP "\fBmeta_bg\fR" 2in
Packit a62e42
ext4, 2.6.28
Packit a62e42
.IP "\fBuninit_bg\fR" 2in
Packit a62e42
ext4, 2.6.28
Packit a62e42
.IP "\fBmmp\fR" 2in
Packit a62e42
ext4, 3.0
Packit a62e42
.IP "\fBbigalloc\fR" 2in
Packit a62e42
ext4, 3.2
Packit a62e42
.IP "\fBquota\fR" 2in
Packit a62e42
ext4, 3.6
Packit a62e42
.IP "\fBinline_data\fR" 2in
Packit a62e42
ext4, 3.8
Packit a62e42
.IP "\fBsparse_super2\fR" 2in
Packit a62e42
ext4, 3.16
Packit a62e42
.IP "\fBmetadata_csum\fR" 2in
Packit a62e42
ext4, 3.18
Packit a62e42
.IP "\fBencrypt\fR" 2in
Packit a62e42
ext4, 4.1
Packit a62e42
.IP "\fBmetadata_csum_seed\fR" 2i
Packit a62e42
ext4, 4.4
Packit a62e42
.IP "\fBproject\fR" 2i
Packit a62e42
ext4, 4.5
Packit a62e42
.IP "\fBea_inode\fR" 2i
Packit a62e42
ext4, 4.13
Packit a62e42
.IP "\fBlarge_dir\fR" 2i
Packit a62e42
ext4, 4.13
Packit a62e42
.IP "\fBcasefold\fR" 2i
Packit a62e42
ext4, 5.2
Packit a62e42
.IP "\fBverity\fR" 2i
Packit a62e42
ext4, 5.4
Packit a62e42
.SH SEE ALSO
Packit a62e42
.BR mke2fs (8),
Packit a62e42
.BR mke2fs.conf (5),
Packit a62e42
.BR e2fsck (8),
Packit a62e42
.BR dumpe2fs (8),
Packit a62e42
.BR tune2fs (8),
Packit a62e42
.BR debugfs (8),
Packit a62e42
.BR mount (8),
Packit a62e42
.BR chattr (1)