the number of mounts after which the filesystem will be checked by e2fsck(8). |
If max-mount-counts is 0 or -1, the
number of times the filesystem is mounted will be disregarded
Staggering the mount-counts at which filesystems are forcibly checked will avoid all filesystems being checked at one time
when using journaled filesystems.
consequences of disabling mount-count-dependent checking entirely.
journaling filesystem will never be marked dirty, so it will not normally be checked.
A filesystem error detected by the kernel will still force an fsck on the next reboot, too late to prevent data loss
See also the -i option for time-dependent checking.
number of times the filesystem has been mounted. If greater than |
-c parameter e2fsck will check the filesystem at the next reboot.
time the filesystem was last checked using e2fsck. The time is interpreted using the current (local) timezone.
This can be useful in scripts which use a Logical Volume Manager to make a consistent snapshot of a filesystem, and then
check the filesystem during off hours to make sure it hasn't been corrupted due to hardware problems, etc. If the
filesystem was clean, then this option can be used to last checked time on the original filesystem. The format of
time-last-checked is the international date format, with an optional time specifier, i.e. YYYYMMDD[HH[MM[SS]]]. The
keyword now is also accepted, in which case the last checked time will be set to the current time.
| behavior when errors are detected. filesystem error will cause e2fsck(8) to
check the filesystem on the next boot.
| Continue normal execution.
|Remount filesystem read-only.
| Cause a kernel panic.
multiple mount protection |
Set MMP block to the clean state. Use only if the device is not currently mounted or being fscked
initial MMP update interval to interval seconds. |
0 : use the default interval. less than 300 seconds. Requires
mmp be enabled.
Configure the filesystem for a RAID array with |
stride-size filesystem blocks.
the number of blocks
read or written to disk before moving to next disk. This mostly affects placement of filesystem metadata like
bitmaps at mke2fs(2) time to avoid placing them on a single disk, which can hurt the performance. It may also
be used by block allocator.
Configure the filesystem for a RAID array with stripe-width filesystem blocks per stripe. This is typically be
stride-size * N, where N is the number of data disks in the RAID (e.g. RAID 5 N+1, RAID 6 N+2). This allows
the block allocator to prevent read-modify-write of the parity in a RAID stripe if possible when the data is
default hash algorithm used for filesystems with hashed b-tree directories.
Set a set of default mount options which will be used when the file system is mounted. |
Unlike the bitmask based default mount options which can be specified with the
-o option, mount_option_string is an arbitrary
string with a maximum length of 63 bytes, which is stored in the superblock.
ext4 first apples bitmask-based default options, and then
mount_opts, before parsing the mount options passed from the
| may(not) be mounted using experimental code, such as the ext4dev filesystem.
| Force the tune2fs operation to complete even in the face of errors. This option is useful when removing the has_journal
filesystem feature from a filesystem which has an external journal (or is corrupted such that it appears to have an external journal), but that external journal is not available. If the filesystem appears to require journal replay, the -f
flag must be specified twice to proceed.
WARNING: Removing an external journal from a filesystem which was not cleanly unmounted without first replaying the exter-
nal journal can result in severe data loss and filesystem corruption.
Adjust the maximal time between two filesystem checks. No suffix or d will interpret the number interval-between-checks
as days, m as months, and w as weeks. A value of zero will disable the time-dependent checking.
It is strongly recommended that either -c (mount-count-dependent) or -i (time-dependent) checking be enabled to force
periodic full e2fsck(8) checking of the filesystem. Failure to do so may lead to filesystem corruption (due to bad disks,
cables, memory, or kernel bugs) going unnoticed, ultimately resulting in data loss or corruption.
| inode size requires rewriting the inode table, the file
system is checked for consistency first using e2fsck(8). |
takes a long time and the file system can be
corrupted and data lost if it is interrupted while in the middle of converting the file system.
| Add ext3 journal |
If the -J option is not specified, the default journal parameters will be used to
create an appropriately sized journal (given the size of the filesystem) stored within the filesystem. Note that you must
be using a kernel which has ext3 support in order to actually make use of the journal.
If this option is used to create a journal on a mounted filesystem, an immutable file, .journal, will be created in the
top-level directory of the filesystem, as it is the only safe way to create the journal inode while the filesystem is
mounted. While the ext3 journal is visible, it is not safe to delete it, or modify it while the filesystem is mounted;
for this reason the file is marked immutable. While checking unmounted filesystems, e2fsck(8) will automatically move
.journal files to the invisible, reserved journal inode. For all filesystems except for the root filesystem, this should
happen automatically and naturally during the next reboot cycle. Since the root filesystem is mounted read-only,
e2fsck(8) must be run from a rescue floppy in order to effect this transition.
On some distributions, such as Debian, if an initial ramdisk is used, the initrd scripts will automatically convert an
ext2 root filesystem to ext3 if the /etc/fstab file specifies the ext3 filesystem for the root filesystem in order to
avoid requiring the use of a rescue floppy to add an ext3 journal to the root filesystem.
Override the default ext3 journal parameters. Journal options are comma separated, and may take an argument using the
equals ('=') sign. options
Only one of the size or device options can be given for a filesystem.
Create a journal stored in the filesystem . at
least 1024 filesystem blocks (i.e., 1MB if using 1k blocks, 4MB if using 4k blocks, etc.) and no more
than 10,240,000 filesystem blocks. There must be enough free space in the filesystem to create a journal of
location of the journal. The |
location<.var> either a block number,
or if the number has a units suffix (e.g., 'M', 'G', etc.) as the offset from the beginning of
the file system.
Attach the filesystem to the journal block device located on external-journal. The external journal must have
been already created using :|
mke2fs -O journal_dev external-journal
that external-journal must be formatted with the same block size as filesystems which will be using it.
In addition, while there is support for attaching multiple filesystems to a single external journal, the Linux
kernel and e2fsck(8) do not currently support shared external journals .
Instead of specifying a device name directly, external-journal can also be specified by either LABEL=label or
UUID=UUID to locate the external journal by either the volume label or UUID stored in the ext2 superblock at
the start of the journal. Use dumpe2fs(8) to display a journal device's volume label and UUID. See also the
-L option of tune2fs(8).
| list the contents of the filesystem superblock, including the current values of the parameters that can be set via this
volume label of the filesystem. Ext2 filesystem labels can be at most 16 characters long; if volume-label is
longer than 16 characters, tune2fs will truncate it and print a warning. The volume label can be used by mount(8),
fsck(8), and /etc/fstab(5) (and possibly others) by specifying LABEL=volume-label instead of a block special device name
percentage of the filesystem which may only be allocated by privileged processes. Reserving some number of
filesystem blocks for use by privileged processes is done to avoid filesystem fragmentation, and to allow system daemons,
such as syslogd(8), to continue to function correctly after non-privileged processes are prevented from writing to the
filesystem. Normally, the default percentage of reserved blocks is 5%.
last-mounted directory for the filesystem.
Set or clear the indicated default mount options in the filesystem. Default mount options can be overridden by mount
options specified either in /etc/fstab(5) or on the command line arguments to mount(8). Older kernels may not support
this feature; in particular, kernels which predate 2.4.20 will almost certainly ignore the default mount options field in
More than one mount option can be cleared or set by separating features with commas. Mount options prefixed with a caret
character ('^') will be cleared in the filesystem's superblock; mount options without a prefix character or prefixed with
a plus character ('+') will be added to the filesystem.
The following mount options can be set or cleared using tune2fs:
| Enable debugging code for this filesystem.
Emulate BSD behavior when creating new files: they will take the group-id of the directory in which they were
created. The standard System V behavior is the default, where newly created files take on the fsgid of the
current process, unless the directory has the setgid bit set, in which case it takes the gid from the parent
directory, and also gets the setgid bit set if it is a directory itself.
| Enable user-specified extended attributes.
| Enable Posix Access Control Lists.
|Disables 32-bit UIDs and GIDs. This is for interoperability with older kernels which only store and expect
When the filesystem is mounted with journalling enabled, all data (not just metadata) is committed into the
journal prior to being written into the main filesystem.
When the filesystem is mounted with journalling enabled, all data is forced directly out to the main file sys-
tem prior to its metadata being committed to the journal.
When the filesystem is mounted with journalling enabled, data may be written into the main filesystem after
its metadata has been committed to the journal. This may increase throughput, however, it may allow old data
to appear in files after a crash and journal recovery.
The file system will be mounted with barrier operations in the journal disabled. (This option is currently
only supported by the ext4 file system driver in 2.6.35+ kernels.)
The file system will be mounted with the block_validity option enabled, which causes extra checks to be per-
formed after reading or writing from the file system. This prevents corrupted metadata blocks from causing
file system damage by overwriting parts of the inode table or block group descriptors. This comes at the cost
of increased memory and CPU overhead, so it is enabled only for debugging purposes. (This option is currently
only supported by the ext4 file system driver in 2.6.35+ kernels.)
The file system will be mounted with the discard mount option. This will cause the file system driver to
attempt to use the trim/discard feature of some storage devices (such as SSD's and thin-provisioned drives
available in some enterprise storage arrays) to inform the storage device that blocks belonging to deleted
files can be reused for other purposes. (This option is currently only supported by the ext4 file system
driver in 2.6.35+ kernels.)
The file system will be mounted with the nodelalloc mount option. This will disable the delayed allocation
feature. (This option is currently only supported by the ext4 file system driver in 2.6.35+ kernels.)
Set or clear the indicated features :|
prefixed with a caret ('^') will be cleared ;
features without a prefix character or prefixed with a plus character
('+') will be added
For a detailed description of the file system features, please ext4(5).
After setting or clearing sparse_super, uninit_bg, filetype, or resize_inode filesystem features, the file system may
require being checked using e2fsck(8) to return the filesystem to a consistent state. Tune2fs will print a message
requesting that the system administrator run e2fsck(8) if necessary. After setting the dir_index feature, e2fsck -D can
be run to convert existing directories to the hashed B-tree format. Enabling certain filesystem features may prevent the
filesystem from being mounted by kernels which do not support those features. In particular, the uninit_bg and flex_bg
features are only supported by the ext4 filesystem.
| Use hashed b-trees to speed up lookups for large directories.
| Allow more than 65000 subdirectories per directory.
| Enable file system level encryption. Can only be set.
| Enable the use of extent trees to store the location of data blocks in inodes. Can only be set
| Enable the extended inode fields used by ext4.
| Store file type information in directory entries.
Allow bitmaps and inode tables for a block group to be placed anywhere on the storage media. Tune2fs will not
reorganize the location of the inode tables and allocation bitmaps, as mke2fs(8) will do when it creates a
freshly formatted file system with flex_bg enabled.
Use a journal to ensure consistency across unclean shutdowns. equivalent to |
| Support files larger than 2 terabytes
| files can be are greater than 2GB.
| Store a checksum to protect the contents in each metadata block.
| Enable or disable multiple mount protection (MMP) feature.
| Enable project ID tracking. for project quota tracking.
| Enable internal file system quota inodes.
| Force mount read-only.
Reserve space so the block group descriptor table may grow in the future. Can only be cleared
| Limit the number of backup superblocks to save space on large filesystems.
Allow the kernel to initialize bitmaps and inode tables lazily, and to keep a high watermark for the unused
inodes in a filesystem, to reduce e2fsck(8) time. The first e2fsck run after enabling this feature will take
the full time, but subsequent e2fsck runs will take only a fraction of the original time, depending on how
full the file system is.
| MMP check default. 5
| number of reserved filesystem blocks.
| Sets/clears user quota
| Sets/clears group quota
| Sets/clears project quota
| who can use the reserved blocks. numerical uid or name.
| group which can use the reserved blocks. numerical or name.
universally unique identifier (UUID) of the filesystem. The format is a series of hex digits
separated by hyphens, For example: "c1b9d5a2-f162-11cf-9ece-0020afc76f16". |
The parameter may also be :
used by mount(8), fsck(8), and /etc/fstab(5) by specifying
| clear the filesystem
|generate new randomly-generated UUID
| generate new time-based UUID
UUID=uuid instead of a block special device
Before overwriting a file system block, write the old contents of the block to an undo file for use
with e2undo(8) to restore the old contents of the file system should something go wrong.|
Cannot be used to recover from a power fail or system crash.