| 1 |
'\" t |
| 2 |
.\" -*- nroff -*- |
| 3 |
.\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved. |
| 4 |
.\" This file may be copied under the terms of the GNU Public License. |
| 5 |
.\" |
| 6 |
.TH EXT4 5 "March 2025" "E2fsprogs version 1.47.4" |
| 7 |
.SH NAME |
| 8 |
ext2 \- the second extended file system |
| 9 |
.br |
| 10 |
ext3 \- the third extended file system |
| 11 |
.br |
| 12 |
ext4 \- the fourth extended file system |
| 13 |
.SH DESCRIPTION |
| 14 |
The second, third, and fourth extended file systems, or ext2, ext3, and |
| 15 |
ext4 as they are commonly known, are Linux file systems that have |
| 16 |
historically been the default file system for many Linux distributions. |
| 17 |
They are general purpose file systems that have been designed for |
| 18 |
extensibility and backwards compatibility. In particular, file systems |
| 19 |
previously intended for use with the ext2 and ext3 file systems can be |
| 20 |
mounted using the ext4 file system driver, and indeed in many modern |
| 21 |
Linux distributions, the ext4 file system driver has been configured |
| 22 |
to handle mount requests for ext2 and ext3 file systems. |
| 23 |
.SH FILE SYSTEM FEATURES |
| 24 |
A file system formatted for ext2, ext3, or ext4 can have some |
| 25 |
collection of the following file system feature flags enabled. Some of |
| 26 |
these features are not supported by all implementations of the ext2, |
| 27 |
ext3, and ext4 file system drivers, depending on Linux kernel version in |
| 28 |
use. On other operating systems, such as the GNU/HURD or FreeBSD, only |
| 29 |
a very restrictive set of file system features may be supported in their |
| 30 |
implementations of ext2. |
| 31 |
.TP |
| 32 |
.B 64bit |
| 33 |
.br |
| 34 |
Enables the file system to be larger than 2^32 blocks. This feature is set |
| 35 |
automatically, as needed, but it can be useful to specify this feature |
| 36 |
explicitly if the file system might need to be resized larger than 2^32 |
| 37 |
blocks, even if it was smaller than that threshold when it was |
| 38 |
originally created. Note that some older kernels and older versions |
| 39 |
of e2fsprogs will not support file systems with this ext4 feature enabled. |
| 40 |
.TP |
| 41 |
.B bigalloc |
| 42 |
.br |
| 43 |
This ext4 feature enables clustered block allocation, so that the unit of |
| 44 |
allocation is a power of two number of blocks. That is, each bit in the |
| 45 |
what had traditionally been known as the block allocation bitmap now |
| 46 |
indicates whether a cluster is in use or not, where a cluster is by |
| 47 |
default composed of 16 blocks. This feature can decrease the time |
| 48 |
spent on doing block allocation and brings smaller fragmentation, especially |
| 49 |
for large files. The size can be specified using the \fBmke2fs \-C\fR option. |
| 50 |
.IP |
| 51 |
.B WARNING: |
| 52 |
The \fBbigalloc\fR feature is still under development, and may not be fully |
| 53 |
supported with your kernel or may have various bugs. Please see the web |
| 54 |
page http://ext4.wiki.kernel.org/index.php/Bigalloc for details. |
| 55 |
May clash with delayed allocation (see |
| 56 |
.B nodelalloc |
| 57 |
mount option). |
| 58 |
.IP |
| 59 |
This feature requires that the |
| 60 |
.B extent |
| 61 |
feature be enabled. |
| 62 |
.TP |
| 63 |
.B casefold |
| 64 |
.br |
| 65 |
This ext4 feature provides file system level character encoding support |
| 66 |
for directories with the casefold (+F) flag enabled. This feature is |
| 67 |
name-preserving on the disk, but it allows applications to lookup for a |
| 68 |
file in the file system using an encoding equivalent version of the file |
| 69 |
name. |
| 70 |
.TP |
| 71 |
.B dir_index |
| 72 |
.br |
| 73 |
Use hashed b-trees to speed up name lookups in large directories. This |
| 74 |
feature is supported by ext3 and ext4 file systems, and is ignored by |
| 75 |
ext2 file systems. |
| 76 |
.TP |
| 77 |
.B dir_nlink |
| 78 |
.br |
| 79 |
Normally, ext4 allows an inode to have no more than 65,000 hard links. |
| 80 |
This applies to regular files as well as directories, which means that |
| 81 |
there can be no more than 64,998 subdirectories in a directory (because |
| 82 |
each of the '.' and '..' entries, as well as the directory entry for the |
| 83 |
directory in its parent directory counts as a hard link). This feature |
| 84 |
lifts this limit by causing ext4 to use a link count of 1 to indicate |
| 85 |
that the number of hard links to a directory is not known when the link |
| 86 |
count might exceed the maximum count limit. |
| 87 |
.TP |
| 88 |
.B ea_inode |
| 89 |
.br |
| 90 |
Normally, a file's extended attributes and associated metadata must fit within |
| 91 |
the inode or the inode's associated extended attribute block. This feature |
| 92 |
allows the value of each extended attribute to be placed in the data blocks of a |
| 93 |
separate inode if necessary, increasing the limit on the size and number of |
| 94 |
extended attributes per file. |
| 95 |
.TP |
| 96 |
.B encrypt |
| 97 |
.br |
| 98 |
Enables support for file-system level encryption of data blocks and file |
| 99 |
names. The inode metadata (timestamps, file size, user/group ownership, |
| 100 |
etc.) is |
| 101 |
.I not |
| 102 |
encrypted. |
| 103 |
.IP |
| 104 |
This feature is most useful on file systems with multiple users, or |
| 105 |
where not all files should be encrypted. In many use cases, especially |
| 106 |
on single-user systems, encryption at the block device layer using |
| 107 |
dm-crypt may provide much better security. |
| 108 |
.TP |
| 109 |
.B ext_attr |
| 110 |
.br |
| 111 |
This feature enables the use of extended attributes. This feature is |
| 112 |
supported by ext2, ext3, and ext4. |
| 113 |
.TP |
| 114 |
.B extent |
| 115 |
.br |
| 116 |
This ext4 feature allows the mapping of logical block numbers for a |
| 117 |
particular inode to physical blocks on the storage device to be stored |
| 118 |
using an extent tree, which is a more efficient data structure than the |
| 119 |
traditional indirect block scheme used by the ext2 and ext3 file |
| 120 |
systems. The use of the extent tree decreases metadata block overhead, |
| 121 |
improves file system performance, and decreases the needed to run |
| 122 |
.BR e2fsck (8) |
| 123 |
on the file system. |
| 124 |
(Note: both |
| 125 |
.B extent |
| 126 |
and |
| 127 |
.B extents |
| 128 |
are accepted as valid names for this feature for |
| 129 |
historical/backwards compatibility reasons.) |
| 130 |
.TP |
| 131 |
.B extra_isize |
| 132 |
.br |
| 133 |
This ext4 feature reserves a specific amount of space in each inode for |
| 134 |
extended metadata such as nanosecond timestamps and file creation time, |
| 135 |
even if the current kernel does not currently need to reserve this much |
| 136 |
space. Without this feature, the kernel will reserve the amount of |
| 137 |
space for features it currently needs, and the rest may be |
| 138 |
consumed by extended attributes. |
| 139 |
|
| 140 |
For this feature to be useful the inode size must be 256 bytes in size |
| 141 |
or larger. |
| 142 |
.TP |
| 143 |
.B filetype |
| 144 |
.br |
| 145 |
This feature enables the storage of file type information in directory |
| 146 |
entries. This feature is supported by ext2, ext3, and ext4. |
| 147 |
.TP |
| 148 |
.B flex_bg |
| 149 |
.br |
| 150 |
This ext4 feature allows the per-block group metadata (allocation |
| 151 |
bitmaps |
| 152 |
and inode tables) |
| 153 |
to be placed anywhere on the storage media. In addition, \fBmke2fs\fR(8) |
| 154 |
will place the per-block group metadata together starting at the first |
| 155 |
block group of each "flex_bg group". The size of the flex_bg group |
| 156 |
can be specified using the |
| 157 |
.B \-G |
| 158 |
option. |
| 159 |
.TP |
| 160 |
.B has_journal |
| 161 |
.br |
| 162 |
Create a journal to ensure file system consistency even across unclean |
| 163 |
shutdowns. Setting the file system feature is equivalent to using the |
| 164 |
\fB\-j\fR option with \fBmke2fs\fR(8) or \fBtune2fs\fR(8). |
| 165 |
This feature is supported by ext3 and ext4, and ignored by the |
| 166 |
ext2 file system driver. |
| 167 |
.TP |
| 168 |
.B huge_file |
| 169 |
.br |
| 170 |
This ext4 feature allows files to be larger than 2 terabytes in size. |
| 171 |
.TP |
| 172 |
.B inline_data |
| 173 |
Allow data to be stored in the inode and extended attribute area. |
| 174 |
.TP |
| 175 |
.B journal_dev |
| 176 |
.br |
| 177 |
This feature is enabled on the superblock found on an external journal |
| 178 |
device. The block size for the external journal must be the same as the |
| 179 |
file system which uses it. |
| 180 |
.IP |
| 181 |
The external journal device can be used by a file system by specifying |
| 182 |
the \fB\-J device=\fR<\fIexternal-device\fR> option to |
| 183 |
\fBmke2fs\fR(8) or \fBtune2fs\fR(8). |
| 184 |
.TP |
| 185 |
.B large_dir |
| 186 |
.br |
| 187 |
This feature increases the limit on the number of files per directory by |
| 188 |
raising the maximum size of directories and, for hashed b-tree directories (see |
| 189 |
.BR dir_index ), |
| 190 |
the maximum height of the hashed b-tree used to store the directory entries. |
| 191 |
.TP |
| 192 |
.B large_file |
| 193 |
.br |
| 194 |
This feature flag is set automatically by modern kernels when a file |
| 195 |
larger than 2 gigabytes is created. Very old kernels could not |
| 196 |
handle large files, so this feature flag was used to prohibit those |
| 197 |
kernels from mounting file systems that they could not understand. |
| 198 |
.TP |
| 199 |
.B metadata_csum |
| 200 |
.br |
| 201 |
This ext4 feature enables metadata checksumming. This feature stores |
| 202 |
checksums for all of the file system metadata (superblock, group |
| 203 |
descriptor blocks, inode and block bitmaps, directories, and |
| 204 |
extent tree blocks). The checksum algorithm used for the metadata |
| 205 |
blocks is different than the one used for group descriptors with the |
| 206 |
.B uninit_bg |
| 207 |
feature. These two features are incompatible and |
| 208 |
.B metadata_csum |
| 209 |
will be used preferentially instead of |
| 210 |
.BR uninit_bg . |
| 211 |
.TP |
| 212 |
.B metadata_csum_seed |
| 213 |
.br |
| 214 |
This feature allows the file system to store the metadata checksum seed in the |
| 215 |
superblock, which allows the administrator to change the UUID of a file system |
| 216 |
using the |
| 217 |
.B metadata_csum |
| 218 |
feature while it is mounted. |
| 219 |
.TP |
| 220 |
.B meta_bg |
| 221 |
.br |
| 222 |
This ext4 feature allows file systems to be resized on-line without explicitly |
| 223 |
needing to reserve space for growth in the size of the block group |
| 224 |
descriptors. This scheme is also used to resize file systems which are |
| 225 |
larger than 2^32 blocks. It is not recommended that this feature be set |
| 226 |
when a file system is created, since this alternate method of storing |
| 227 |
the block group descriptors will slow down the time needed to mount the |
| 228 |
file system, and newer kernels can automatically set this feature as |
| 229 |
necessary when doing an online resize and no more reserved space is |
| 230 |
available in the resize inode. |
| 231 |
.TP |
| 232 |
.B mmp |
| 233 |
.br |
| 234 |
This ext4 feature provides multiple mount protection (MMP). MMP helps to |
| 235 |
protect the file system from being multiply mounted and is useful in |
| 236 |
shared storage environments. |
| 237 |
.TP |
| 238 |
.B orphan_file |
| 239 |
.br |
| 240 |
This ext4 feature fixes a potential scalability bottleneck for workloads |
| 241 |
that are doing a large number of truncate or file extensions in |
| 242 |
parallel. It is supported by Linux kernels starting version 5.15, and |
| 243 |
by e2fsprogs starting with version 1.47.0. |
| 244 |
.TP |
| 245 |
.B project |
| 246 |
.br |
| 247 |
This ext4 feature provides project quota support. With this feature, |
| 248 |
the project ID of inode will be managed when the file system is mounted. |
| 249 |
.TP |
| 250 |
.B quota |
| 251 |
.br |
| 252 |
Create quota inodes (inode #3 for userquota and inode |
| 253 |
#4 for group quota) and set them in the superblock. |
| 254 |
With this feature, the quotas will be enabled |
| 255 |
automatically when the file system is mounted. |
| 256 |
.IP |
| 257 |
Causes the quota files (i.e., user.quota and |
| 258 |
group.quota which existed |
| 259 |
in the older quota design) to be hidden inodes. |
| 260 |
.TP |
| 261 |
.B resize_inode |
| 262 |
.br |
| 263 |
This file system feature indicates that space has been reserved so that |
| 264 |
the block group descriptor table can be extended while resizing a mounted |
| 265 |
file system. The online resize operation |
| 266 |
is carried out by the kernel, triggered by \fBresize2fs\fR(8). By default |
| 267 |
\fBmke2fs\fR(8) will attempt to reserve enough space so that the |
| 268 |
file system may grow to 1024 times its initial size. This can be changed |
| 269 |
using the \fBresize\fR extended option. |
| 270 |
.IP |
| 271 |
This feature requires that the \fBsparse_super\fR or \fBsparse_super2\fR |
| 272 |
feature be enabled. |
| 273 |
.TP |
| 274 |
.B sparse_super |
| 275 |
.br |
| 276 |
This file system feature is set on all modern ext2, ext3, and ext4 file |
| 277 |
systems. It indicates that backup copies of the superblock and block |
| 278 |
group descriptors are present only in a few block groups, not all of |
| 279 |
them. |
| 280 |
.TP |
| 281 |
.B sparse_super2 |
| 282 |
.br |
| 283 |
This feature indicates that there will only be at most two backup |
| 284 |
superblocks and block group descriptors. The block groups used to store |
| 285 |
the backup superblock(s) and blockgroup descriptor(s) are stored in the |
| 286 |
superblock, but typically, one will be located at the beginning of block |
| 287 |
group #1, and one in the last block group in the file system. This |
| 288 |
feature is essentially a more extreme version of \fBsparse_super\fR and is |
| 289 |
designed to allow a much larger percentage of the disk to have |
| 290 |
contiguous blocks available for data files. |
| 291 |
.TP |
| 292 |
.B stable_inodes |
| 293 |
.br |
| 294 |
Marks the file system's inode numbers and UUID as stable. \fBresize2fs\fR(8) |
| 295 |
will not allow shrinking a file system with this feature, nor |
| 296 |
will \fBtune2fs\fR(8) |
| 297 |
allow changing its UUID. This feature allows the use of specialized encryption |
| 298 |
settings that make use of the inode numbers and UUID. Note that the |
| 299 |
\fBencrypt\fR feature still needs to be enabled separately. \fBstable_inodes\fR |
| 300 |
is a "compat" feature, so old kernels will allow it. |
| 301 |
.TP |
| 302 |
.B uninit_bg |
| 303 |
.br |
| 304 |
This ext4 file system feature indicates that the block group descriptors |
| 305 |
will be protected using checksums, making it safe for \fBmke2fs\fR(8) |
| 306 |
to create a file system without initializing all of the block groups. |
| 307 |
The kernel will keep a high watermark of unused inodes, and initialize |
| 308 |
inode tables and blocks lazily. This feature speeds up the time to check |
| 309 |
the file system using \fBe2fsck\fR(8) and it also speeds up the time required for |
| 310 |
\fBmke2fs\fR(8) to create the file system. |
| 311 |
.TP |
| 312 |
.B verity |
| 313 |
.br |
| 314 |
Enables support for verity protected files. Verity files are readonly, |
| 315 |
and their data is transparently verified against a Merkle tree hidden |
| 316 |
past the end of the file. Using the Merkle tree's root hash, a verity |
| 317 |
file can be efficiently authenticated, independent of the file's size. |
| 318 |
.IP |
| 319 |
This feature is most useful for authenticating important read-only files |
| 320 |
on read-write file systems. If the file system itself is read-only, |
| 321 |
then using dm-verity to authenticate the entire block device may provide |
| 322 |
much better security. |
| 323 |
.SH MOUNT OPTIONS |
| 324 |
This section describes mount options which are specific to ext2, ext3, |
| 325 |
and ext4. Other generic mount options may be used as well; see |
| 326 |
.BR mount (8) |
| 327 |
for details. |
| 328 |
.SH "Mount options for ext2" |
| 329 |
The ext2 file system is the standard Linux file system. |
| 330 |
Since Linux 2.5.46, for most mount options the default |
| 331 |
is determined by the file system superblock. Set them with \fBtune2fs\fR(8). |
| 332 |
.TP |
| 333 |
.BR acl " | " noacl |
| 334 |
Support POSIX Access Control Lists (or not). See the \fBacl\fR(5) manual page. |
| 335 |
.TP |
| 336 |
.BR bsddf " | " minixdf |
| 337 |
Set the behavior for the \fIstatfs\fR system call. The \fBminixdf\fR |
| 338 |
behavior is to return in the \fIf_blocks\fR |
| 339 |
field the total number of blocks of the file system, while the \fBbsddf\fR |
| 340 |
behavior (which is the default) is to subtract the overhead blocks |
| 341 |
used by the ext2 file system and not available for file storage. Thus |
| 342 |
.sp 1 |
| 343 |
% mount /k \-o minixdf; df /k; umount /k |
| 344 |
.TS |
| 345 |
tab(#); |
| 346 |
l2 l2 r2 l2 l2 l |
| 347 |
l c r c c l. |
| 348 |
File System#1024-blocks#Used#Available#Capacity#Mounted on |
| 349 |
/dev/sda6#2630655#86954#2412169#3%#/k |
| 350 |
.TE |
| 351 |
.sp 1 |
| 352 |
% mount /k \-o bsddf; df /k; umount /k |
| 353 |
.TS |
| 354 |
tab(#); |
| 355 |
l2 l2 r2 l2 l2 l |
| 356 |
l c r c c l. |
| 357 |
File System#1024-blocks#Used#Available#Capacity#Mounted on |
| 358 |
/dev/sda6#2543714#13#2412169#0%#/k |
| 359 |
.TE |
| 360 |
.sp 1 |
| 361 |
(Note that this example shows that one can add command line options |
| 362 |
to the options given in |
| 363 |
.IR /etc/fstab .) |
| 364 |
.TP |
| 365 |
.BR check=none " | " nocheck |
| 366 |
No checking is done at mount time. This is the default. This is fast. |
| 367 |
It is wise to invoke \fBe2fsck\fR(8) every now and then, e.g.\& at boot time. |
| 368 |
The non-default behavior is unsupported (\fBcheck=normal\fR and |
| 369 |
\fBcheck=strict\fR options have been removed). Note that these mount options |
| 370 |
don't have to be supported if ext4 kernel driver is used for ext2 and ext3 file systems. |
| 371 |
.TP |
| 372 |
.B debug |
| 373 |
Print debugging info upon each (re)mount. |
| 374 |
.TP |
| 375 |
.BR errors= { continue | remount-ro | panic } |
| 376 |
Define the behavior when an error is encountered. |
| 377 |
(Either ignore errors and just mark the file system erroneous and continue, |
| 378 |
or remount the file system read-only, or panic and halt the system.) |
| 379 |
The default is set in the file system superblock, and can be |
| 380 |
changed using |
| 381 |
.BR tune2fs (8). |
| 382 |
.TP |
| 383 |
.BR grpid " | " bsdgroups " and " nogrpid " | " sysvgroups |
| 384 |
These options define what group id a newly created file gets. |
| 385 |
When \fBgrpid\fR |
| 386 |
is set, it takes the group id of the directory in which it is created; |
| 387 |
otherwise (the default) it takes the fsgid of the current process, unless |
| 388 |
the directory has the setgid bit set, in which case it takes the gid |
| 389 |
from the parent directory, and also gets the setgid bit set |
| 390 |
if it is a directory itself. |
| 391 |
.TP |
| 392 |
.BR grpquota " | " usrquota " | " quota " | " noquota |
| 393 |
The \fBusrquota\fR (same as \fBquota\fR) mount option enables user quota |
| 394 |
support on the file system. \fBgrpquota\fR enables group quotas support. |
| 395 |
You need the \fBquota\fR(1) utilities to actually enable and manage the quota |
| 396 |
system. |
| 397 |
.TP |
| 398 |
.B nouid32 |
| 399 |
Disables 32-bit UIDs and GIDs. This is for interoperability with older |
| 400 |
kernels which only store and expect 16-bit values. |
| 401 |
.TP |
| 402 |
.BR oldalloc " | " orlov |
| 403 |
Use old allocator or Orlov allocator for new inodes. Orlov is default. |
| 404 |
.TP |
| 405 |
\fBresgid=\fP\,\fIn\fP and \fBresuid=\fP\,\fIn\fP |
| 406 |
The ext2 file system reserves a certain percentage of the available |
| 407 |
space (by default 5%, see \fBmke2fs\fR(8) and \fBtune2fs\fR(8). |
| 408 |
These options determine who can use the reserved blocks. |
| 409 |
(Roughly: whoever has the specified uid, or belongs to the specified group.) |
| 410 |
.TP |
| 411 |
.BI sb= n |
| 412 |
Instead of using the normal superblock, use an alternative superblock |
| 413 |
specified by \fIn\fR. |
| 414 |
This option is normally used when the primary superblock has been |
| 415 |
corrupted. The location of backup superblocks is dependent on the |
| 416 |
file system's blocksize, the number of blocks per group, and features |
| 417 |
such as |
| 418 |
.BR sparse_super . |
| 419 |
.IP |
| 420 |
Additional backup superblocks can be determined by using the \fBmke2fs\fR(8) |
| 421 |
program using the \fB\-n\fR |
| 422 |
option to print out where the superblocks exist, supposing \fBmke2fs\fR(8) |
| 423 |
is supplied with arguments that are consistent with the file system's layout |
| 424 |
(e.g., blocksize, blocks per group, \fBsparse_super\fR, etc.). |
| 425 |
.IP |
| 426 |
The block number here uses 1\ k units. Thus, if you want to use logical |
| 427 |
block 32768 on a file system with 4\ k blocks, use "sb=131072". |
| 428 |
.TP |
| 429 |
.BR user_xattr " | " nouser_xattr |
| 430 |
Support "user." extended attributes (or not). |
| 431 |
|
| 432 |
|
| 433 |
.SH "Mount options for ext3" |
| 434 |
The ext3 file system is a version of the ext2 file system which has been |
| 435 |
enhanced with journaling. It supports the same options as ext2 as |
| 436 |
well as the following additions: |
| 437 |
.TP |
| 438 |
.B journal_dev=\fIdevnum\fR | \fBjournal_path=\fIpath\fR |
| 439 |
When the external journal device's major/minor numbers |
| 440 |
have changed, these options allow the user to specify |
| 441 |
the new journal location. The journal device is |
| 442 |
identified either through its new major/minor numbers encoded |
| 443 |
in devnum, or via a path to the device. |
| 444 |
.TP |
| 445 |
.BR norecovery " | " noload |
| 446 |
Don't load the journal on mounting. Note that |
| 447 |
if the file system was not unmounted cleanly, |
| 448 |
skipping the journal replay will lead to the |
| 449 |
file system containing inconsistencies that can |
| 450 |
lead to any number of problems. |
| 451 |
.TP |
| 452 |
.BR data= { journal | ordered | writeback } |
| 453 |
Specifies the journaling mode for file data. Metadata is always journaled. |
| 454 |
To use modes other than |
| 455 |
.B ordered |
| 456 |
on the root file system, pass the mode to the kernel as boot parameter, e.g.\& |
| 457 |
.IR rootflags=data=journal . |
| 458 |
.RS |
| 459 |
.TP |
| 460 |
.B journal |
| 461 |
All data is committed into the journal prior to being written into the |
| 462 |
main file system. |
| 463 |
.TP |
| 464 |
.B ordered |
| 465 |
This is the default mode. All data is forced directly out to the main file |
| 466 |
system prior to its metadata being committed to the journal. |
| 467 |
.TP |
| 468 |
.B writeback |
| 469 |
Data ordering is not preserved \(en data may be written into the main |
| 470 |
file system after its metadata has been committed to the journal. |
| 471 |
This is rumoured to be the highest-throughput option. It guarantees |
| 472 |
internal file system integrity, however it can allow old data to appear |
| 473 |
in files after a crash and journal recovery. |
| 474 |
.RE |
| 475 |
.TP |
| 476 |
.BR data_err= { abort | ignore } |
| 477 |
If an error occurs in a file data buffer in ordered mode: |
| 478 |
.sp |
| 479 |
When \fBdata_err=abort\fR, abort the journal. |
| 480 |
.sp |
| 481 |
When \fBdata_err=ignore\fR, just print an error message. |
| 482 |
.TP |
| 483 |
.BR barrier= { 0 | 1 } |
| 484 |
This disables / enables the use of write barriers in the jbd code. \fBbarrier=0\fR |
| 485 |
disables, \fBbarrier=1\fR enables (default). This also requires an IO stack which can |
| 486 |
support barriers, and if jbd gets an error on a barrier write, it will disable |
| 487 |
barriers again with a warning. Write barriers enforce proper on-disk ordering |
| 488 |
of journal commits, making volatile disk write caches safe to use, at some |
| 489 |
performance penalty. If your disks are battery-backed in one way or another, |
| 490 |
disabling barriers may safely improve performance. |
| 491 |
.TP |
| 492 |
.BI commit= nrsec |
| 493 |
Start a journal commit every \fInrsec\fR |
| 494 |
seconds. The default value is 5 seconds. Zero means default. |
| 495 |
.TP |
| 496 |
.B user_xattr |
| 497 |
Enable Extended User Attributes. See the \fBattr\fR(5) manual page. |
| 498 |
.TP |
| 499 |
.BR jqfmt= { vfsold | vfsv0 | vfsv1 } |
| 500 |
Apart from the old quota system (as in ext2, \fBjqfmt=vfsold\fR aka version 1 quota) |
| 501 |
ext3 also supports journaled quotas (version 2 quota). \fBjqfmt=vfsv0\fR or |
| 502 |
\fBjqfmt=vfsv1\fR enables journaled quotas. Journaled quotas have the advantage |
| 503 |
that even after a crash no quota check is required. When the \fBquota\fR |
| 504 |
file system feature is enabled, journaled quotas are used automatically, and |
| 505 |
this mount option is ignored. |
| 506 |
.TP |
| 507 |
.BR usrjquota=aquota.user " | " grpjquota=aquota.group |
| 508 |
For journaled quotas (\fBjqfmt=vfsv0\fR or \fBjqfmt=vfsv1\fR), the mount |
| 509 |
options \fBusrjquota=aquota.user\fR and \fBgrpjquota=aquota.group\fR are |
| 510 |
required to tell the quota system which quota database files to use. When the |
| 511 |
\fBquota\fR file system feature is enabled, journaled quotas are used |
| 512 |
automatically, and this mount option is ignored. |
| 513 |
|
| 514 |
.SH "Mount options for ext4" |
| 515 |
The ext4 file system is an advanced level of the ext3 file system which |
| 516 |
incorporates scalability and reliability enhancements for supporting large |
| 517 |
file system. |
| 518 |
|
| 519 |
The options |
| 520 |
.BR journal_dev , |
| 521 |
.BR journal_path , |
| 522 |
.BR norecovery , |
| 523 |
.BR noload , |
| 524 |
.BR data , |
| 525 |
.BR commit , |
| 526 |
.BR orlov , |
| 527 |
.BR oldalloc , |
| 528 |
.RB [ no ] user_xattr , |
| 529 |
.RB [ no ] acl , |
| 530 |
.BR bsddf , |
| 531 |
.BR minixdf , |
| 532 |
.BR debug , |
| 533 |
.BR errors , |
| 534 |
.BR data_err , |
| 535 |
.BR grpid , |
| 536 |
.BR bsdgroups , |
| 537 |
.BR nogrpid , |
| 538 |
.BR sysvgroups , |
| 539 |
.BR resgid , |
| 540 |
.BR resuid , |
| 541 |
.BR sb , |
| 542 |
.BR quota , |
| 543 |
.BR noquota , |
| 544 |
.BR nouid32 , |
| 545 |
.BR grpquota , |
| 546 |
.BR usrquota , |
| 547 |
.BR usrjquota , |
| 548 |
.BR grpjquota ", and" |
| 549 |
.B jqfmt |
| 550 |
are backwardly compatible with ext3 or ext2. |
| 551 |
.TP |
| 552 |
.BR journal_checksum " | " nojournal_checksum |
| 553 |
The journal_checksum option enables checksumming of the journal transactions. |
| 554 |
This will allow the recovery code in \fBe2fsck\fR(8) and the kernel to detect |
| 555 |
corruption in the kernel. It is a compatible change and will be ignored by older |
| 556 |
kernels. |
| 557 |
.TP |
| 558 |
.B journal_async_commit |
| 559 |
Commit block can be written to disk without waiting for descriptor blocks. If |
| 560 |
enabled older kernels cannot mount the device. |
| 561 |
This will enable \fBjournal_checksum\fR internally. |
| 562 |
.TP |
| 563 |
.BR barrier= { 0 | 1 "} | " barrier " | " nobarrier |
| 564 |
These mount options have the same effect as in ext3. The mount options |
| 565 |
\fBbarrier\fR and \fBnobarrier\fR are added for consistency with other |
| 566 |
ext4 mount options. |
| 567 |
|
| 568 |
The ext4 file system enables write barriers by default. |
| 569 |
.TP |
| 570 |
.BI inode_readahead_blks= n |
| 571 |
This tuning parameter controls the maximum number of inode table blocks that |
| 572 |
ext4's inode table readahead algorithm will pre-read into the buffer cache. |
| 573 |
The value must be a power of 2. The default value is 32 blocks. |
| 574 |
.TP |
| 575 |
.BI stripe= n |
| 576 |
Number of file system blocks that mballoc will try to use for allocation size |
| 577 |
and alignment. For RAID5/6 systems this should be the number of data disks * |
| 578 |
RAID chunk size in file system blocks. |
| 579 |
.TP |
| 580 |
.B delalloc |
| 581 |
Deferring block allocation until write-out time. |
| 582 |
.TP |
| 583 |
.B nodelalloc |
| 584 |
Disable delayed allocation. Blocks are allocated when data is copied from user |
| 585 |
to page cache. |
| 586 |
.TP |
| 587 |
.BI max_batch_time= max_usec |
| 588 |
Maximum amount of time ext4 should wait for additional file system operations to |
| 589 |
be batch together with a synchronous write operation. Since a synchronous |
| 590 |
write operation is going to force a commit and then a wait for the I/O |
| 591 |
complete, it doesn't cost much, and can be a huge throughput win, we wait for a |
| 592 |
small amount of time to see if any other transactions can piggyback on the |
| 593 |
synchronous write. |
| 594 |
.sp |
| 595 |
The algorithm used is designed to automatically tune for |
| 596 |
the speed of the disk, by measuring the amount of time (on average) that it |
| 597 |
takes to finish committing a transaction. Call this time the "commit time". |
| 598 |
If the time that the transaction has been running is less than the commit time, |
| 599 |
ext4 will try sleeping for the commit time to see if other operations will join |
| 600 |
the transaction. The commit time is capped at \fImax_usec\fR, which |
| 601 |
defaults to 15000\ \[mc]s (15\ ms). This optimization can be turned off entirely |
| 602 |
by setting \fBmax_batch_time=0\fR. |
| 603 |
.TP |
| 604 |
.BI min_batch_time= min_usec |
| 605 |
This parameter sets the commit time (as described above) to be at least |
| 606 |
\fImin_usec\fR. It defaults to zero microseconds. Increasing this parameter |
| 607 |
may improve the throughput of multi-threaded, synchronous workloads on very |
| 608 |
fast disks, at the cost of increasing latency. |
| 609 |
.TP |
| 610 |
.BI journal_ioprio= prio |
| 611 |
The I/O priority (from 0 to 7, where 0 is the highest priority) which should be |
| 612 |
used for I/O operations submitted by kjournald2 during a commit operation. |
| 613 |
This defaults to 3, which is a slightly higher priority than the default I/O |
| 614 |
priority. |
| 615 |
.TP |
| 616 |
.B abort |
| 617 |
Simulate the effects of calling ext4_abort() for |
| 618 |
debugging purposes. This is normally used while |
| 619 |
remounting a file system which is already mounted. |
| 620 |
.TP |
| 621 |
.BR auto_da_alloc " | " noauto_da_alloc |
| 622 |
Many broken applications don't use fsync() when |
| 623 |
replacing existing files via patterns such as |
| 624 |
|
| 625 |
fd = open("foo.new")/write(fd,...)/close(fd)/ rename("foo.new", "foo") |
| 626 |
|
| 627 |
or worse yet |
| 628 |
|
| 629 |
fd = open("foo", O_TRUNC)/write(fd,...)/close(fd). |
| 630 |
|
| 631 |
If auto_da_alloc is enabled, ext4 will detect the replace-via-rename and |
| 632 |
replace-via-truncate patterns and force that any delayed allocation blocks are |
| 633 |
allocated such that at the next journal commit, in the default data=ordered |
| 634 |
mode, the data blocks of the new file are forced to disk before the rename() |
| 635 |
operation is committed. This provides roughly the same level of guarantees as |
| 636 |
ext3, and avoids the "zero-length" problem that can happen when a system |
| 637 |
crashes before the delayed allocation blocks are forced to disk. |
| 638 |
.TP |
| 639 |
.B noinit_itable |
| 640 |
Do not initialize any uninitialized inode table blocks in the background. This |
| 641 |
feature may be used by installation CD's so that the install process can |
| 642 |
complete as quickly as possible; the inode table initialization process would |
| 643 |
then be deferred until the next time the file system is mounted. |
| 644 |
.TP |
| 645 |
.BI init_itable= n |
| 646 |
The lazy itable init code will wait n times the number of milliseconds it took |
| 647 |
to zero out the previous block group's inode table. This minimizes the impact on |
| 648 |
system performance while the file system's inode table is being initialized. |
| 649 |
.TP |
| 650 |
.BR discard " | " nodiscard |
| 651 |
Controls whether ext4 should issue discard/TRIM commands to the underlying |
| 652 |
block device when blocks are freed. This is useful for SSD devices and |
| 653 |
sparse/thinly-provisioned LUNs, but it is off by default until sufficient |
| 654 |
testing has been done. |
| 655 |
.TP |
| 656 |
.BR block_validity " | " noblock_validity |
| 657 |
This option enables/disables the in-kernel facility for tracking |
| 658 |
file system metadata blocks within internal data structures. This allows multi-\c |
| 659 |
block allocator and other routines to quickly locate extents which might |
| 660 |
overlap with file system metadata blocks. This option is intended for debugging |
| 661 |
purposes and since it negatively affects the performance, it is off by default. |
| 662 |
.TP |
| 663 |
.BR dioread_lock " | " dioread_nolock |
| 664 |
Controls whether or not ext4 should use the DIO read locking. If the |
| 665 |
\fBdioread_nolock\fR option is specified ext4 will allocate uninitialized extent |
| 666 |
before buffer write and convert the extent to initialized after IO completes. |
| 667 |
This approach allows ext4 code to avoid using inode mutex, which improves |
| 668 |
scalability on high speed storages. However this does not work with data |
| 669 |
journaling and \fBdioread_nolock\fR option will be ignored with kernel warning. |
| 670 |
Note that \fBdioread_nolock\fR code path is only used for extent-based files. |
| 671 |
Because of the restrictions this options comprises, it is off by default |
| 672 |
(e.g.\& \fBdioread_lock\fR). |
| 673 |
.TP |
| 674 |
.BI max_dir_size_kb= n |
| 675 |
This limits the size of the directories so that any attempt to expand them |
| 676 |
beyond the specified limit in kilobytes will cause an ENOSPC error. This is |
| 677 |
useful in memory-constrained environments, where a very large directory can |
| 678 |
cause severe performance problems or even provoke the Out Of Memory killer. (For |
| 679 |
example, if there is only 512\~MiB memory available, a 176\~MiB directory may |
| 680 |
seriously cramp the system's style.) |
| 681 |
.TP |
| 682 |
.B i_version |
| 683 |
Enable 64-bit inode version support. This option is off by default. |
| 684 |
.TP |
| 685 |
.B nombcache |
| 686 |
This option disables use of mbcache for extended attribute deduplication. On |
| 687 |
systems where extended attributes are rarely or never shared between files, |
| 688 |
use of mbcache for deduplication adds unnecessary computational overhead. |
| 689 |
.TP |
| 690 |
.B prjquota |
| 691 |
This option enables project quota support on the file system. You need the |
| 692 |
\fBquota\fR(1) utilities to actually enable and manage the quota system. |
| 693 |
This mount option requires the \fBproject\fR file system feature. |
| 694 |
|
| 695 |
.SH FILE ATTRIBUTES |
| 696 |
The ext2, ext3, and ext4 file systems support setting the following file |
| 697 |
attributes on Linux systems using the |
| 698 |
.BR chattr (1) |
| 699 |
utility: |
| 700 |
.IP |
| 701 |
.BR a " \- append only" |
| 702 |
.IP |
| 703 |
.BR A " \- no atime updates" |
| 704 |
.IP |
| 705 |
.BR d " \- no dump" |
| 706 |
.IP |
| 707 |
.BR D " \- synchronous directory updates" |
| 708 |
.IP |
| 709 |
.BR i " \- immutable" |
| 710 |
.IP |
| 711 |
.BR S " \- synchronous updates" |
| 712 |
.IP |
| 713 |
.BR u " \- undeletable" |
| 714 |
.P |
| 715 |
In addition, the ext3 and ext4 file systems support the following flag: |
| 716 |
.IP |
| 717 |
.BR j " \- data journaling" |
| 718 |
.P |
| 719 |
Finally, the ext4 file system also supports the following flag: |
| 720 |
.IP |
| 721 |
.BR e " \- extents format" |
| 722 |
.P |
| 723 |
For descriptions of these attribute flags, please refer to the |
| 724 |
\fBchattr\fR(1) man page. |
| 725 |
.SH KERNEL SUPPORT |
| 726 |
This section lists the file system driver (e.g., ext2, ext3, ext4) and |
| 727 |
upstream kernel version where a particular file system feature was |
| 728 |
supported. Note that in some cases the feature was present in earlier |
| 729 |
kernel versions, but there were known, serious bugs. In other cases the |
| 730 |
feature may still be considered in an experimental state. Finally, note |
| 731 |
that some distributions may have backported features into older kernels; |
| 732 |
in particular the kernel versions in certain "enterprise distributions" |
| 733 |
can be extremely misleading. |
| 734 |
.sp |
| 735 |
.TS |
| 736 |
lb l l. |
| 737 |
filetype ext2 2.2.0 |
| 738 |
sparse_super ext2 2.2.0 |
| 739 |
large_file ext2 2.2.0 |
| 740 |
has_journal ext3 2.4.15 |
| 741 |
ext_attr ext2/ext3 2.6.0 |
| 742 |
dir_index ext3 2.6.0 |
| 743 |
resize_inode ext3 2.6.10 (online resizing) |
| 744 |
64bit ext4 2.6.28 |
| 745 |
dir_nlink ext4 2.6.28 |
| 746 |
extent ext4 2.6.28 |
| 747 |
extra_isize ext4 2.6.28 |
| 748 |
flex_bg ext4 2.6.28 |
| 749 |
huge_file ext4 2.6.28 |
| 750 |
meta_bg ext4 2.6.28 |
| 751 |
uninit_bg ext4 2.6.28 |
| 752 |
mmp ext4 3.0 |
| 753 |
bigalloc ext4 3.2 |
| 754 |
quota ext4 3.6 |
| 755 |
inline_data ext4 3.8 |
| 756 |
sparse_super2 ext4 3.16 |
| 757 |
metadata_csum ext4 3.18 |
| 758 |
encrypt ext4 4.1 |
| 759 |
metadata_csum_seed ext4 4.4 |
| 760 |
project ext4 4.5 |
| 761 |
ea_inode ext4 4.13 |
| 762 |
large_dir ext4 4.13 |
| 763 |
casefold ext4 5.2 |
| 764 |
verity ext4 5.4 |
| 765 |
stable_inodes ext4 5.5 |
| 766 |
fast_commit ext4 5.10 |
| 767 |
orphan_file ext4 5.15 |
| 768 |
.TE |
| 769 |
.SH SEE ALSO |
| 770 |
.BR mke2fs (8), |
| 771 |
.BR mke2fs.conf (5), |
| 772 |
.BR e2fsck (8), |
| 773 |
.BR dumpe2fs (8), |
| 774 |
.BR tune2fs (8), |
| 775 |
.BR debugfs (8), |
| 776 |
.BR mount (8), |
| 777 |
.BR chattr (1) |