~daniel-mehrmann/e2fsprogs/master

« back to all changes in this revision

Viewing changes to misc/ext4.5.in

  • Committer: Package Import Robot
  • Author(s): Michael Vogt
  • Date: 2014-10-27 09:44:27 UTC
  • mfrom: (8.4.29 sid)
  • Revision ID: package-import@ubuntu.com-20141027094427-g56dce6sg7pasdgm
Tags: 1.42.12-1ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - debian/rules:
      Block pkg-create-dbgsym from operating on this package.
      Build without dietlibc-dev, which is in universe 
      Use the autotools-dev dh addon to update config.guess/config.sub for new
      ports.
  - debian/control:
      Regenerate with ./debian/rules debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
251
251
.BR mke2fs (8)
252
252
to create the file system.
253
253
.RE
 
254
.SH MOUNT OPTIONS
 
255
This section describes mount options which are specific to ext2, ext3,
 
256
and ext4.  Other generic mount options may be used as well; see
 
257
.BR mount (8)
 
258
for details.
 
259
.SH "Mount options for ext2"
 
260
The `ext2' filesystem is the standard Linux filesystem.
 
261
Since Linux 2.5.46, for most mount options the default
 
262
is determined by the filesystem superblock. Set them with
 
263
.BR tune2fs (8).
 
264
.TP
 
265
.BR acl | noacl
 
266
Support POSIX Access Control Lists (or not).
 
267
.TP
 
268
.BR bsddf | minixdf
 
269
Set the behavior for the
 
270
.I statfs
 
271
system call. The
 
272
.B minixdf
 
273
behavior is to return in the
 
274
.I f_blocks
 
275
field the total number of blocks of the filesystem, while the
 
276
.B bsddf
 
277
behavior (which is the default) is to subtract the overhead blocks
 
278
used by the ext2 filesystem and not available for file storage. Thus
 
279
.sp 1
 
280
% mount /k \-o minixdf; df /k; umount /k
 
281
.TS
 
282
tab(#);
 
283
l2 l2 r2 l2 l2 l
 
284
l c r c c l.
 
285
Filesystem#1024-blocks#Used#Available#Capacity#Mounted on
 
286
/dev/sda6#2630655#86954#2412169#3%#/k
 
287
.TE
 
288
.sp 1
 
289
% mount /k \-o bsddf; df /k; umount /k
 
290
.TS
 
291
tab(#);
 
292
l2 l2 r2 l2 l2 l
 
293
l c r c c l.
 
294
Filesystem#1024-blocks#Used#Available#Capacity#Mounted on
 
295
/dev/sda6#2543714#13#2412169#0%#/k
 
296
.TE
 
297
.sp 1
 
298
(Note that this example shows that one can add command line options
 
299
to the options given in
 
300
.IR /etc/fstab .)
 
301
.TP
 
302
.BR check=none " or " nocheck
 
303
No checking is done at mount time. This is the default. This is fast.
 
304
It is wise to invoke
 
305
.BR e2fsck (8)
 
306
every now and then, e.g.\& at boot time. The non-default behavior is unsupported
 
307
(check=normal and check=strict options have been removed). Note that these mount options
 
308
don't have to be supported if ext4 kernel driver is used for ext2 and ext3 filesystems.
 
309
.TP
 
310
.B debug
 
311
Print debugging info upon each (re)mount.
 
312
.TP
 
313
.BR errors= { continue | remount-ro | panic }
 
314
Define the behavior when an error is encountered.
 
315
(Either ignore errors and just mark the filesystem erroneous and continue,
 
316
or remount the filesystem read-only, or panic and halt the system.)
 
317
The default is set in the filesystem superblock, and can be
 
318
changed using
 
319
.BR tune2fs (8).
 
320
.TP
 
321
.BR grpid | bsdgroups " and " nogrpid | sysvgroups
 
322
These options define what group id a newly created file gets.
 
323
When
 
324
.B grpid
 
325
is set, it takes the group id of the directory in which it is created;
 
326
otherwise (the default) it takes the fsgid of the current process, unless
 
327
the directory has the setgid bit set, in which case it takes the gid
 
328
from the parent directory, and also gets the setgid bit set
 
329
if it is a directory itself.
 
330
.TP
 
331
.BR grpquota | noquota | quota | usrquota
 
332
The usrquota (same as quota) mount option enables user quota support on the
 
333
filesystem. grpquota enables group quotas support. You need the quota utilities
 
334
to actually enable and manage the quota system.
 
335
.TP
 
336
.B nouid32
 
337
Disables 32-bit UIDs and GIDs.  This is for interoperability with older
 
338
kernels which only store and expect 16-bit values.
 
339
.TP
 
340
.BR oldalloc " or " orlov
 
341
Use old allocator or Orlov allocator for new inodes. Orlov is default.
 
342
.TP
 
343
\fBresgid=\fP\,\fIn\fP and \fBresuid=\fP\,\fIn\fP
 
344
The ext2 filesystem reserves a certain percentage of the available
 
345
space (by default 5%, see
 
346
.BR mke2fs (8)
 
347
and
 
348
.BR tune2fs (8)).
 
349
These options determine who can use the reserved blocks.
 
350
(Roughly: whoever has the specified uid, or belongs to the specified group.)
 
351
.TP
 
352
.BI sb= n
 
353
Instead of block 1, use block
 
354
.I n
 
355
as superblock. This could be useful when the filesystem has been damaged.
 
356
(Earlier, copies of the superblock would be made every 8192 blocks: in
 
357
block 1, 8193, 16385, \&...\& (and one got thousands of copies on
 
358
a big filesystem). Since version 1.08,
 
359
.B mke2fs
 
360
has a \-s (sparse superblock) option to reduce the number of backup
 
361
superblocks, and since version 1.15 this is the default. Note
 
362
that this may mean that ext2 filesystems created by a recent
 
363
.B mke2fs
 
364
cannot be mounted r/w under Linux 2.0.*.)
 
365
The block number here uses 1\ k units. Thus, if you want to use logical
 
366
block 32768 on a filesystem with 4\ k blocks, use "sb=131072".
 
367
.TP
 
368
.BR user_xattr | nouser_xattr
 
369
Support "user." extended attributes (or not).
 
370
 
 
371
 
 
372
.SH "Mount options for ext3"
 
373
The ext3 filesystem is a version of the ext2 filesystem which has been
 
374
enhanced with journaling.  It supports the same options as ext2 as
 
375
well as the following additions:
 
376
.TP
 
377
.B journal=update
 
378
Update the ext3 filesystem's journal to the current format.
 
379
.TP
 
380
.B journal=inum
 
381
When a journal already exists, this option is ignored. Otherwise, it
 
382
specifies the number of the inode which will represent the ext3 filesystem's
 
383
journal file; ext3 will create a new journal, overwriting the old contents
 
384
of the file whose inode number is
 
385
.IR inum .
 
386
.TP
 
387
.BR journal_dev=devnum / journal_path=path
 
388
When the external journal device's major/minor numbers
 
389
have changed, these options allow the user to specify
 
390
the new journal location.  The journal device is
 
391
identified either through its new major/minor numbers encoded
 
392
in devnum, or via a path to the device.
 
393
.TP
 
394
.BR norecovery / noload
 
395
Don't load the journal on mounting.  Note that
 
396
if the filesystem was not unmounted cleanly,
 
397
skipping the journal replay will lead to the
 
398
filesystem containing inconsistencies that can
 
399
lead to any number of problems.
 
400
.TP
 
401
.BR data= { journal | ordered | writeback }
 
402
Specifies the journaling mode for file data.  Metadata is always journaled.
 
403
To use modes other than
 
404
.B ordered
 
405
on the root filesystem, pass the mode to the kernel as boot parameter, e.g.\&
 
406
.IR rootflags=data=journal .
 
407
.RS
 
408
.TP
 
409
.B journal
 
410
All data is committed into the journal prior to being written into the
 
411
main filesystem.
 
412
.TP
 
413
.B ordered
 
414
This is the default mode.  All data is forced directly out to the main file
 
415
system prior to its metadata being committed to the journal.
 
416
.TP
 
417
.B writeback
 
418
Data ordering is not preserved \(en data may be written into the main
 
419
filesystem after its metadata has been committed to the journal.
 
420
This is rumoured to be the highest-throughput option.  It guarantees
 
421
internal filesystem integrity, however it can allow old data to appear
 
422
in files after a crash and journal recovery.
 
423
.RE
 
424
.TP
 
425
.B data_err=ignore
 
426
Just print an error message if an error occurs in a file data buffer in
 
427
ordered mode.
 
428
.TP
 
429
.B data_err=abort
 
430
Abort the journal if an error occurs in a file data buffer in ordered mode.
 
431
.TP
 
432
.BR barrier=0 " / " barrier=1 "
 
433
This disables / enables the use of write barriers in the jbd code.  barrier=0
 
434
disables, barrier=1 enables (default). This also requires an IO stack which can
 
435
support barriers, and if jbd gets an error on a barrier write, it will disable
 
436
barriers again with a warning.  Write barriers enforce proper on-disk ordering
 
437
of journal commits, making volatile disk write caches safe to use, at some
 
438
performance penalty.  If your disks are battery-backed in one way or another,
 
439
disabling barriers may safely improve performance.
 
440
.TP
 
441
.BI commit= nrsec
 
442
Sync all data and metadata every
 
443
.I nrsec
 
444
seconds. The default value is 5 seconds. Zero means default.
 
445
.TP
 
446
.B user_xattr
 
447
Enable Extended User Attributes. See the
 
448
.BR attr (5)
 
449
manual page.
 
450
.TP
 
451
.B acl
 
452
Enable POSIX Access Control Lists. See the
 
453
.BR acl (5)
 
454
manual page.
 
455
.TP
 
456
.BR usrjquota=aquota.user | grpjquota=aquota.group | jqfmt=vfsv0
 
457
Apart from the old quota system (as in ext2, jqfmt=vfsold aka version 1 quota)
 
458
ext3 also supports journaled quotas (version 2 quota). jqfmt=vfsv0
 
459
enables journaled quotas. For journaled quotas the mount options
 
460
usrjquota=aquota.user and grpjquota=aquota.group are required to tell the
 
461
quota system which quota database files to use. Journaled quotas have the
 
462
advantage that even after a crash no quota check is required.
 
463
 
 
464
.SH "Mount options for ext4"
 
465
The ext4 filesystem is an advanced level of the ext3 filesystem which
 
466
incorporates scalability and reliability enhancements for supporting large
 
467
filesystem.
 
468
 
 
469
The options
 
470
.B journal_dev, norecovery, noload, data, commit, orlov, oldalloc, [no]user_xattr
 
471
.B [no]acl, bsddf, minixdf, debug, errors, data_err, grpid, bsdgroups, nogrpid
 
472
.B sysvgroups, resgid, resuid, sb, quota, noquota, grpquota, usrquota
 
473
.B usrjquota, grpjquota and jqfmt
 
474
are backwardly compatible with ext3 or ext2.
 
475
.TP
 
476
.B journal_checksum
 
477
Enable checksumming of the journal transactions.  This will allow the recovery
 
478
code in e2fsck and the kernel to detect corruption in the kernel.  It is a
 
479
compatible change and will be ignored by older kernels.
 
480
.TP
 
481
.B journal_async_commit
 
482
Commit block can be written to disk without waiting for descriptor blocks. If
 
483
enabled older kernels cannot mount the device.
 
484
This will enable 'journal_checksum' internally.
 
485
.TP
 
486
.BR barrier=0 " / " barrier=1 " / " barrier " / " nobarrier
 
487
These mount options have the same effect as in ext3.  The mount options
 
488
"barrier" and "nobarrier" are added for consistency with other ext4 mount
 
489
options.
 
490
 
 
491
The ext4 filesystem enables write barriers by default.
 
492
.TP
 
493
.BI inode_readahead_blks= n
 
494
This tuning parameter controls the maximum number of inode table blocks that
 
495
ext4's inode table readahead algorithm will pre-read into the buffer cache.
 
496
The value must be a power of 2. The default value is 32 blocks.
 
497
.TP
 
498
.BI stripe= n
 
499
Number of filesystem blocks that mballoc will try to use for allocation size
 
500
and alignment. For RAID5/6 systems this should be the number of data disks *
 
501
RAID chunk size in filesystem blocks.
 
502
.TP
 
503
.B delalloc
 
504
Deferring block allocation until write-out time.
 
505
.TP
 
506
.B nodelalloc
 
507
Disable delayed allocation. Blocks are allocated when data is copied from user
 
508
to page cache.
 
509
.TP
 
510
.BI max_batch_time= usec
 
511
Maximum amount of time ext4 should wait for additional filesystem operations to
 
512
be batch together with a synchronous write operation. Since a synchronous
 
513
write operation is going to force a commit and then a wait for the I/O
 
514
complete, it doesn't cost much, and can be a huge throughput win, we wait for a
 
515
small amount of time to see if any other transactions can piggyback on the
 
516
synchronous write. The algorithm used is designed to automatically tune for
 
517
the speed of the disk, by measuring the amount of time (on average) that it
 
518
takes to finish committing a transaction. Call this time the "commit time".
 
519
If the time that the transaction has been running is less than the commit time,
 
520
ext4 will try sleeping for the commit time to see if other operations will join
 
521
the transaction. The commit time is capped by the max_batch_time, which
 
522
defaults to 15000\ \[mc]s (15\ ms). This optimization can be turned off entirely by
 
523
setting max_batch_time to 0.
 
524
.TP
 
525
.BI min_batch_time= usec
 
526
This parameter sets the commit time (as described above) to be at least
 
527
min_batch_time. It defaults to zero microseconds. Increasing this parameter
 
528
may improve the throughput of multi-threaded, synchronous workloads on very
 
529
fast disks, at the cost of increasing latency.
 
530
.TP
 
531
.BI journal_ioprio= prio
 
532
The I/O priority (from 0 to 7, where 0 is the highest priority) which should be
 
533
used for I/O operations submitted by kjournald2 during a commit operation.
 
534
This defaults to 3, which is a slightly higher priority than the default I/O
 
535
priority.
 
536
.TP
 
537
.B abort
 
538
Simulate the effects of calling ext4_abort() for
 
539
debugging purposes.  This is normally used while
 
540
remounting a filesystem which is already mounted.
 
541
.TP
 
542
.BR auto_da_alloc | noauto_da_alloc
 
543
Many broken applications don't use fsync() when
 
544
replacing existing files via patterns such as
 
545
 
 
546
fd = open("foo.new")/write(fd,...)/close(fd)/ rename("foo.new", "foo")
 
547
 
 
548
or worse yet
 
549
 
 
550
fd = open("foo", O_TRUNC)/write(fd,...)/close(fd).
 
551
 
 
552
If auto_da_alloc is enabled, ext4 will detect the replace-via-rename and
 
553
replace-via-truncate patterns and force that any delayed allocation blocks are
 
554
allocated such that at the next journal commit, in the default data=ordered
 
555
mode, the data blocks of the new file are forced to disk before the rename()
 
556
operation is committed.  This provides roughly the same level of guarantees as
 
557
ext3, and avoids the "zero-length" problem that can happen when a system
 
558
crashes before the delayed allocation blocks are forced to disk.
 
559
.TP
 
560
.B noinit_itable
 
561
Do not initialize any uninitialized inode table blocks in the background. This
 
562
feature may be used by installation CD's so that the install process can
 
563
complete as quickly as possible; the inode table initialization process would
 
564
then be deferred until the next time the filesystem is mounted.
 
565
.TP
 
566
.B init_itable=n
 
567
The lazy itable init code will wait n times the number of milliseconds it took
 
568
to zero out the previous block group's inode table. This minimizes the impact on
 
569
system performance while the filesystem's inode table is being initialized.
 
570
.TP
 
571
.BR discard / nodiscard
 
572
Controls whether ext4 should issue discard/TRIM commands to the underlying
 
573
block device when blocks are freed.  This is useful for SSD devices and
 
574
sparse/thinly-provisioned LUNs, but it is off by default until sufficient
 
575
testing has been done.
 
576
.TP
 
577
.B nouid32
 
578
Disables 32-bit UIDs and GIDs.  This is for
 
579
interoperability  with  older kernels which only
 
580
store and expect 16-bit values.
 
581
.TP
 
582
.BR block_validity / noblock_validity
 
583
This options allows to enables/disables the in-kernel facility for tracking
 
584
filesystem metadata blocks within internal data structures. This allows multi-\c
 
585
block allocator and other routines to quickly locate extents which might
 
586
overlap with filesystem metadata blocks. This option is intended for debugging
 
587
purposes and since it negatively affects the performance, it is off by default.
 
588
.TP
 
589
.BR dioread_lock / dioread_nolock
 
590
Controls whether or not ext4 should use the DIO read locking. If the
 
591
dioread_nolock option is specified ext4 will allocate uninitialized extent
 
592
before buffer write and convert the extent to initialized after IO completes.
 
593
This approach allows ext4 code to avoid using inode mutex, which improves
 
594
scalability on high speed storages. However this does not work with data
 
595
journaling and dioread_nolock option will be ignored with kernel warning.
 
596
Note that dioread_nolock code path is only used for extent-based files.
 
597
Because of the restrictions this options comprises it is off by default
 
598
(e.g.\& dioread_lock).
 
599
.TP
 
600
.B max_dir_size_kb=n
 
601
This limits the size of the directories so that any attempt to expand them
 
602
beyond the specified limit in kilobytes will cause an ENOSPC error. This is
 
603
useful in memory-constrained environments, where a very large directory can
 
604
cause severe performance problems or even provoke the Out Of Memory killer. (For
 
605
example, if there is only 512\ MB memory available, a 176\ MB directory may
 
606
seriously cramp the system's style.)
 
607
.TP
 
608
.B i_version
 
609
Enable 64-bit inode version support. This option is off by default.
 
610
 
 
611
.SH FILE ATTRIBUTES
 
612
The ext2, ext3, and ext4 filesystems support setting the following file
 
613
attributes on Linux systems using the
 
614
.BR chattr (1)
 
615
utility:
 
616
.sp
 
617
.BR a " - append only"
 
618
.sp
 
619
.BR A " - no atime updates"
 
620
.sp
 
621
.BR d " - no dump"
 
622
.sp
 
623
.BR D " - synchronous directory updates"
 
624
.sp
 
625
.BR i " - immutable"
 
626
.sp
 
627
.BR S " - synchronous updates"
 
628
.sp
 
629
.BR u " - undeletable"
 
630
.sp
 
631
In addition, the ext3 and ext4 filesystems support the following flag:
 
632
.sp
 
633
.BR j " - data journaling"
 
634
.sp
 
635
Finally, the ext4 filesystem also supports the following flag:
 
636
.sp
 
637
.BR e " - extents format"
 
638
.sp
 
639
For descriptions of these attribute flags, please refer to the
 
640
.BR chattr (1)
 
641
man page.
254
642
.SH SEE ALSO
255
643
.BR mke2fs (8),
256
644
.BR mke2fs.conf (5),
257
645
.BR e2fsck (8),
258
646
.BR dumpe2fs (8),
259
647
.BR tune2fs (8),
260
 
.BR debugfs (8)
 
648
.BR debugfs (8),
 
649
.BR mount (8),
 
650
.BR chattr (1)