Whamcloud - gitweb
iscan: fix the test program iscan so it builds again
[tools/e2fsprogs.git] / misc / mke2fs.conf.5.in
index 06592f2..08bb948 100644 (file)
@@ -1,26 +1,26 @@
 .\" -*- nroff -*-
 .\" Copyright 2006 by Theodore Ts'o.  All Rights Reserved.
 .\" This file may be copied under the terms of the GNU Public License.
-.\" 
+.\"
 .TH mke2fs.conf 5 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
 .SH NAME
 mke2fs.conf \- Configuration file for mke2fs
 .SH DESCRIPTION
 .I mke2fs.conf
-is the configuration file for 
-.BR mke2fs (8).  
-It controls the default parameters used by 
+is the configuration file for
+.BR mke2fs (8).
+It controls the default parameters used by
 .BR mke2fs (8)
-when it is creating ext2 or ext3 filesystems.
+when it is creating ext2, ext3, or ext4 filesystems.
 .PP
 The
 .I mke2fs.conf
-file uses an INI-style format.  Stanzas, or top-level sections, are 
-delimited by square braces: [ ].  Within each section, each line 
+file uses an INI-style format.  Stanzas, or top-level sections, are
+delimited by square braces: [ ].  Within each section, each line
 defines a relation, which assigns tags to values, or to a subsection,
-which contains further relations or subsections.   
+which contains further relations or subsections.
 .\" Tags can be assigned multiple values
-An example of the INI-style format used by this configuration file 
+An example of the INI-style format used by this configuration file
 follows below:
 .P
        [section1]
@@ -49,70 +49,74 @@ follows below:
 .br
        }
 .P
-Comments are delimited by a semicolon (';') or a hash ('#') character 
-at the beginning of the comment, and are terminated by the end of 
+Comments are delimited by a semicolon (';') or a hash ('#') character
+at the beginning of the comment, and are terminated by the end of
 line character.
 .P
 Tags and values must be quoted using double quotes if they contain
-spaces.  Within a quoted string, the standard backslash interpretations 
-apply: "\en" (for the newline character), 
-"\et" (for the tab character), "\eb" (for the backspace character), 
+spaces.  Within a quoted string, the standard backslash interpretations
+apply: "\en" (for the newline character),
+"\et" (for the tab character), "\eb" (for the backspace character),
 and "\e\e" (for the backslash character).
 .P
-The following stanzas are used in the 
+Some relations expect a boolean value.  The parser is quite liberal on
+recognizing ``yes'', '`y'', ``true'', ``t'', ``1'', ``on'', etc. as a
+boolean true value, and ``no'', ``n'', ``false'', ``nil'', ``0'',
+``off'' as a boolean false value.
+.P
+The following stanzas are used in the
 .I mke2fs.conf
 file.  They will be described in more detail in future sections of this
 document.
-.TP 
+.TP
+.I [options]
+Contains relations which influence how mke2fs behaves.
+.TP
 .I [defaults]
-Contains relations which define the default parameters 
+Contains relations which define the default parameters
 used by
 .BR mke2fs (8).
 In general, these defaults may be overridden by a definition in the
 .B fs_types
-stanza, or by an command-line option provided by the user.
-.TP 
+stanza, or by a command-line option provided by the user.
+.TP
 .I [fs_types]
 Contains relations which define defaults that should be used for specific
-filesystem types.  The filesystem type can be specified explicitly using
-the 
-.B -T
-option to
-.BR mke2fs (8).
-.SH THE [defaults] STANZA
-The following relations are defined in the 
-.I [defaults]
-stanza.
-.TP
-.I base_features
-This relation specifies the filesystems features which are enabled in
-newly created filesystems.  It may be overridden by the
-.I base_features
-relation found in the filesystem or usage type subsection of
+file system and usage types.  The file system type and usage type can be
+specified explicitly using
 the
-.I [fs_types] 
+.BR \-t and \-T
+options to
+.BR mke2fs (8),
+respectively.
+.TP
+.I [devices]
+Contains relations which define defaults for specific devices.
+.SH THE [options] STANZA
+The following relations are defined in the
+.I [options]
 stanza.
 .TP
-.I default_features
-This relation specifies a set of features that should be added or
-removed to the features listed in the
-.I base_features
-relation.  It may be overridden by the filesystem-specific 
-.I default_features
-in the filesystem or usage type subsection of
-.IR [fs_types] ,
-and by the 
-.B -O
-command-line option
-to 
-.BR mke2fs (8).
+.I proceed_delay
+If this relation is set to a positive integer, then mke2fs will
+wait
+.I proceed_delay
+seconds after asking the user for permission to proceed and
+then continue, even if the
+user has not answered the question.  Defaults to 0, which means to wait
+until the user answers the question one way or another.
 .TP
-.I force_undo
-This relation, if set to a boolean value of true, forces
-.B mke2fs
-to always try to create an undo file, even if the undo file might be
-huge and it might extend the time to create the filesystem image
-because the inode table isn't being initialized lazily.
+.I sync_kludge
+If this relation is set to a positive integer, then while writing the
+inode table, mke2fs will request the operating system flush out pending
+writes to initialize the inode table every
+.I sync_kludge
+block groups.   This is needed to work around buggy kernels that don't
+handle writeback throttling correctly.
+.SH THE [defaults] STANZA
+The following relations are defined in the
+.I [defaults]
+stanza.
 .TP
 .I fs_type
 This relation specifies the default filesystem type if the user does not
@@ -124,41 +128,37 @@ is not started using a program name of the form
 .BI mkfs. fs-type\fR.
 If both the user and the
 .B mke2fs.conf
-file does not specify a default filesystem type, mke2fs will use a
+file do not specify a default filesystem type, mke2fs will use a
 default filesystem type of
-.IR ext3
+.I ext3
 if a journal was requested via a command-line option, or
 .I ext2
 if not.
 .TP
-.I blocksize
-This relation specifies the default blocksize if the user does not
-specify a blocksize on the command line, and the filesystem-type
-specific section of the configuration file does not specify a blocksize.
-.TP
-.I inode_ratio
-This relation specifies the default inode ratio if the user does not
-specify one on the command line, and the filesystem-type
-specific section of the configuration file does not specify a default
-inode ratio.
-.TP
-.I inode_size
-This relation specifies the default inode size if the user does not
-specify one on the command line, and the filesystem-type
-specific section of the configuration file does not specify a default
-inode size.
-.TP
 .I undo_dir
 This relation specifies the directory where the undo file should be
-stored.  It can be overriden via the
+stored.  It can be overridden via the
 .B E2FSPROGS_UNDO_DIR
-environemnt variable.  If the directory location is set to the value
+environment variable.  If the directory location is set to the value
 .IR none ,
 .B mke2fs
 will not create an undo file.
+.PP
+In addition, any tags that can be specified in a per-file system tags
+subsection as defined below (e.g.,
+.IR blocksize ,
+.IR hash_alg ,
+.IR inode_ratio ,
+.IR inode_size ,
+.IR reserved_ratio ,
+etc.) can also be specified in the
+.I defaults
+stanza to specify the default value to be used if the user does not
+specify one on the command line, and the filesystem-type
+specific section of the configuration file does not specify a default value.
 .SH THE [fs_types] STANZA
 Each tag in the
-.I [fs_types] 
+.I [fs_types]
 stanza names a filesystem type or usage type which can be specified via the
 .B \-t
 or
@@ -239,13 +239,13 @@ usage type of
 This results in an fs_types list of "ext4, floppy".   Both the ext4
 subsection and the floppy subsection define an
 .I inode_size
-relation, but since the later entries in the fs_types list supercede
+relation, but since the later entries in the fs_types list supersede
 earlier ones, the configuration parameter for fs_types.floppy.inode_size
 will be used, so the filesystem  will have an inode size of 128.
 .P
 The exception to this resolution is the
 .I features
-tag, which is specifies a set of changes to the features used by the
+tag, which specifies a set of changes to the features used by the
 filesystem, and which is cumulative.  So in the above example, first
 the configuration relation defaults.base_features would enable an
 initial feature set with the sparse_super, filetype, resize_inode, and
@@ -254,11 +254,13 @@ fs_types.ext4.features would enable the extents and flex_bg
 features, and finally the configuration relation
 fs_types.floppy.features would remove
 the resize_inode feature, resulting in a filesystem feature set
-consisting of the sparse_super, filetype, resize_inode, dir_index,
+consisting of the sparse_super, filetype, dir_index,
 extents_and flex_bg features.
 .P
-For each filesystem type, the following tags may be used in that 
-fs_type's subsection:
+For each filesystem type, the following tags may be used in that
+fs_type's subsection.   These tags may also be used in the
+.I default
+section:
 .TP
 .I base_features
 This relation specifies the features which are initially enabled for this
@@ -270,6 +272,36 @@ whose subsections define the
 relation, only the last will be used by
 .BR mke2fs (8).
 .TP
+.I enable_periodic_fsck
+This boolean relation specifies whether periodic filesystem checks should be
+enforced at boot time.  If set to true, checks will be forced every
+180 days, or after a random number of mounts.  These values may
+be changed later via the
+.B -i
+and
+.B -c
+command-line options to
+.BR tune2fs (8).
+.TP
+.I errors
+Change the behavior of the kernel code when errors are detected.
+In all cases, a filesystem error will cause
+.BR e2fsck (8)
+to check the filesystem on the next boot.
+.I errors
+can be one of the following:
+.RS 1.2i
+.TP 1.2i
+.B continue
+Continue normal execution.
+.TP
+.B remount-ro
+Remount filesystem read-only.
+.TP
+.B panic
+Cause a kernel panic.
+.RE
+.TP
 .I features
 This relation specifies a comma-separated list of features edit
 requests which modify the feature set
@@ -283,8 +315,15 @@ a named feature.  Each
 relation specified in the fs_types list will be applied in the order
 found in the fs_types list.
 .TP
+.I force_undo
+This boolean relation, if set to a value of true, forces
+.B mke2fs
+to always try to create an undo file, even if the undo file might be
+huge and it might extend the time to create the filesystem image
+because the inode table isn't being initialized lazily.
+.TP
 .I default_features
-This relation specifies set of features which should be enabled or 
+This relation specifies set of features which should be enabled or
 disabled after applying the features listed in the
 .I base_features
 and
@@ -294,22 +333,59 @@ relations.  It may be overridden by the
 command-line option to
 .BR mke2fs (8).
 .TP
+.I auto_64-bit_support
+This relation is a boolean which specifies whether
+.BR mke2fs (8)
+should automatically add the 64bit feature if the number of blocks for
+the file system requires this feature to be enabled.  The resize_inode
+feature is also automatically disabled since it doesn't support 64-bit
+block numbers.
+.TP
+.I default_mntopts
+This relation specifies the set of mount options which should be enabled
+by default.  These may be changed at a later time with the
+.B -o
+command-line option to
+.BR tune2fs (8).
+.TP
 .I blocksize
 This relation specifies the default blocksize if the user does not
 specify a blocksize on the command line.
 .TP
 .I lazy_itable_init
-This relation is a boolean which specifies whether the inode table should 
+This boolean relation specifies whether the inode table should
 be lazily initialized.  It only has meaning if the uninit_bg feature is
 enabled.  If lazy_itable_init is true and the uninit_bg feature is
 enabled,  the inode table will
-not fully initialized by 
+not be fully initialized by
 .BR mke2fs (8).
 This speeds up filesystem
-initialization noitceably, but it requires the kernel to finish
+initialization noticeably, but it requires the kernel to finish
 initializing the filesystem in the background when the filesystem is
 first mounted.
 .TP
+.I lazy_journal_init
+This boolean relation specifies whether the journal inode should be
+lazily initialized. It only has meaning if the has_journal feature is
+enabled. If lazy_journal_init is true, the journal inode will not be
+fully zeroed out by
+.BR mke2fs .
+This speeds up filesystem initialization noticeably, but carries some
+small risk if the system crashes before the journal has been overwritten
+entirely one time.
+.TP
+.I journal_location
+This relation specifies the location of the journal.
+.TP
+.I num_backup_sb
+This relation indicates whether file systems with the
+.B sparse_super2
+feature enabled should be created with 0, 1, or 2 backup superblocks.
+.TP
+.I packed_meta_blocks
+This boolean relation specifies whether the allocation bitmaps, inode
+table, and journal should be located at the beginning of the file system.
+.TP
 .I inode_ratio
 This relation specifies the default inode ratio if the user does not
 specify one on the command line.
@@ -317,10 +393,160 @@ specify one on the command line.
 .I inode_size
 This relation specifies the default inode size if the user does not
 specify one on the command line.
+.TP
+.I reserved_ratio
+This relation specifies the default percentage of filesystem blocks
+reserved for the super-user, if the user does not specify one on the command
+line.
+.TP
+.I hash_alg
+This relation specifies the default hash algorithm used for the
+new filesystems with hashed b-tree directories.  Valid algorithms
+accepted are:
+.IR legacy ,
+.IR half_md4 ,
+and
+.IR tea .
+.TP
+.I flex_bg_size
+This relation specifies the number of block groups that will be packed
+together to create one large virtual block group on an ext4 filesystem.
+This improves meta-data locality and performance on meta-data heavy
+workloads.  The number of groups must be a power of 2 and may only be
+specified if the flex_bg filesystem feature is enabled.
+.TP
+.I options
+This relation specifies additional extended options which should be
+treated by
+.BR mke2fs (8)
+as if they were prepended to the argument of the
+.B -E
+option.  This can be used to configure the default extended options used
+by
+.BR mke2fs (8)
+on a per-filesystem type basis.
+.TP
+.I discard
+This boolean relation specifies whether the
+.BR mke2fs (8)
+should attempt to discard device prior to filesystem creation.
+.TP
+.I cluster_size
+This relation specifies the default cluster size if the bigalloc file
+system feature is enabled.  It can be overridden via the
+.B \-C
+command line option to
+.BR mke2fs (8)
+.TP
+.I make_hugefiles
+This boolean relation enables the creation of pre-allocated files as
+part of formatting the file system.  The extent tree blocks for these
+pre-allocated files will be placed near the beginning of the file
+system, so that if all of the other metadata blocks are also configured
+to be placed near the beginning of the file system (by disabling the
+backup superblocks, using the packed_meta_blocks option, etc.), the data
+blocks of the pre-allocated files will be contiguous.
+.TP
+.I hugefiles_dir
+This relation specifies the directory where huge files are created,
+relative to the filesystem root.
+.TP
+.I hugefiles_uid
+This relation controls the user ownership for all of the files and
+directories created by the
+.I make_hugefiles
+feature.
+.TP
+.I hugefiles_gid
+This relation controls the group ownership for all of the files and
+directories created by the
+.I make_hugefiles
+feature.
+.TP
+.I hugefiles_umask
+This relation specifies the umask used when creating the files and
+directories by the
+.I make_hugefiles
+feature.
+.TP
+.I num_hugefiles
+This relation specifies the number of huge files to be created.  If this
+relation is not specified, or is set to zero, and the
+.I hugefiles_size
+relation is non-zero, then
+.I make_hugefiles
+will create as many huge files as can fit to fill the entire file system.
+.TP
+.I hugefiles_slack
+This relation specifies how much space should be reserved for other
+files.
+.TP
+.I hugefiles_size
+This relation specifies the size of the huge files.  If this relation is
+not specified, the default is to fill the entire file system.
+.TP
+.I hugefiles_align
+This relation specifies the alignment for the start block of the huge
+files.  It also forces the size of huge files to be a multiple of the
+requested alignment.  If this relation is not specified, no alignment
+requirement will be imposed on the huge files.
+.TP
+.I hugefiles_align_disk
+This relations specifies whether the alignment should be relative to the
+beginning of the hard drive (assuming that the starting offset of the
+partition is available to mke2fs).  The default value is false, which
+will cause hugefile alignment to be relative to the beginning of the
+file system.
+.TP
+.I hugefiles_name
+This relation specifies the base file name for the huge files.
+.TP
+.I hugefiles_digits
+This relation specifies the (zero-padded) width of the field for the
+huge file number.
+.TP
+.I zero_hugefiles
+This boolean relation specifies whether or not zero blocks will be
+written to the hugefiles while
+.BR mke2fs (8)
+is creating them.  By default, zero blocks will be written to the huge
+files to avoid stale data from being made available to potentially
+untrusted user programs, unless the device supports a discard/trim
+operation which will take care of zeroing the device blocks.  By setting
+.I zero_hugefiles
+to false, this step will always be skipped, which can be useful if it is
+known that the disk has been previously erased, or if the user programs
+that will have access to the huge files are trusted to not reveal stale
+data.
+.TP
+.I encoding
+This relation defines the file name encoding to be used if the casefold
+feature is enabled.   Currently the only valid encoding is utf8-12.1 or
+utf8, which requests the most recent Unicode version; since 12.1 is the only
+available Unicode version, utf8 and utf8-12.1 have the same result.
+.I encoding_flags
+This relation defines encoding-specific flags.  For utf8 encodings, the
+only available flag is strict, which will cause attempts to create file
+names containing invalid Unicode characters to be rejected by the
+kernel.  Strict mode is not enabled by default.
+.SH THE [devices] STANZA
+Each tag in the
+.I [devices]
+stanza names device name so that per-device defaults can be specified.
+.TP
+.I fs_type
+This relation specifies the default parameter for the
+.B \-t
+option, if this option isn't specified on the command line.
+.TP
+.I usage_types
+This relation specifies the default parameter for the
+.B \-T
+option, if this option isn't specified on the command line.
 .SH FILES
 .TP
 .I /etc/mke2fs.conf
-The configuration file for 
+The configuration file for
 .BR mke2fs (8).
 .SH SEE ALSO
 .BR mke2fs (8)