2 .\" Copyright 2006 by Theodore Ts'o. All Rights Reserved.
3 .\" This file may be copied under the terms of the GNU Public License.
5 .TH mke2fs.conf 5 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
7 mke2fs.conf \- Configuration file for mke2fs
10 is the configuration file for
12 It controls the default parameters used by
14 when it is creating ext2, ext3, or ext4 filesystems.
18 file uses an INI-style format. Stanzas, or top-level sections, are
19 delimited by square braces: [ ]. Within each section, each line
20 defines a relation, which assigns tags to values, or to a subsection,
21 which contains further relations or subsections.
22 .\" Tags can be assigned multiple values
23 An example of the INI-style format used by this configuration file
38 subtag1 = subtag_value_a
40 subtag1 = subtag_value_b
42 subtag2 = subtag_value_c
52 Comments are delimited by a semicolon (';') or a hash ('#') character
53 at the beginning of the comment, and are terminated by the end of
56 Tags and values must be quoted using double quotes if they contain
57 spaces. Within a quoted string, the standard backslash interpretations
58 apply: "\en" (for the newline character),
59 "\et" (for the tab character), "\eb" (for the backspace character),
60 and "\e\e" (for the backslash character).
62 Some relations expect a boolean value. The parser is quite liberal on
63 recognizing ``yes'', '`y'', ``true'', ``t'', ``1'', ``on'', etc. as a
64 boolean true value, and ``no'', ``n'', ``false'', ``nil'', ``0'',
65 ``off'' as a boolean false value.
67 The following stanzas are used in the
69 file. They will be described in more detail in future sections of this
73 Contains relations which influence how mke2fs behaves.
76 Contains relations which define the default parameters
79 In general, these defaults may be overridden by a definition in the
81 stanza, or by an command-line option provided by the user.
84 Contains relations which define defaults that should be used for specific
85 file system and usage types. The file system type and usage type can be
86 specified explicitly using
92 .SH THE [options] STANZA
93 The following relations are defined in the
98 If this relation is set to a positive integer, then if mke2fs will
101 seconds, after asking the user for permission to proceed, even if the
102 user has not answered the question. Defaults to 0, which means to wait
103 until the user answers the question one way or another.
104 .SH THE [defaults] STANZA
105 The following relations are defined in the
110 This relation specifies the filesystems features which are enabled in
111 newly created filesystems. It may be overridden by the
113 relation found in the filesystem or usage type subsection of
119 This relation specifies a set of features that should be added or
120 removed to the features listed in the
122 relation. It may be overridden by the filesystem-specific
124 in the filesystem or usage type subsection of
132 .I enable_periodic_fsck
133 This boolean relation specifies whether periodic filesystem checks should be
134 enforced at boot time. If set to true, checks will be forced every
135 180 days, or after a random number of mounts. These values may
136 be changed later via the
140 command-line options to
144 This boolean relation, if set to a value of true, forces
146 to always try to create an undo file, even if the undo file might be
147 huge and it might extend the time to create the filesystem image
148 because the inode table isn't being initialized lazily.
151 This relation specifies the default filesystem type if the user does not
156 is not started using a program name of the form
157 .BI mkfs. fs-type\fR.
158 If both the user and the
160 file do not specify a default filesystem type, mke2fs will use a
161 default filesystem type of
163 if a journal was requested via a command-line option, or
168 This relation specifies the directory where the undo file should be
169 stored. It can be overridden via the
170 .B E2FSPROGS_UNDO_DIR
171 environment variable. If the directory location is set to the value
174 will not create an undo file.
176 In addition, any tags that can be specified in a per-file system tags
177 subsection as defined below (e.g.,
183 etc.) can also be specified in the
185 stanza to specify the default value to be used if the user does not
186 specify one on the command line, and the filesystem-type
187 specific section of the configuration file does not specify a default value.
188 .SH THE [fs_types] STANZA
191 stanza names a filesystem type or usage type which can be specified via the
201 program constructs a list of fs_types by concatenating the filesystem
202 type (i.e., ext2, ext3, etc.) with the usage type list. For most
203 configuration options,
205 will look for a subsection in the
207 stanza corresponding with each entry in the constructed list, with later
208 entries overriding earlier filesystem or usage types.
210 example, consider the following
216 base_features = sparse_super,filetype,resize_inode,dir_index
230 features = has_journal
236 features = extents,flex_bg
252 features = ^resize_inode
260 If mke2fs started with a program name of
262 then the filesystem type of ext4 will be used. If the filesystem is
263 smaller than 3 megabytes, and no usage type is specified, then
268 This results in an fs_types list of "ext4, floppy". Both the ext4
269 subsection and the floppy subsection define an
271 relation, but since the later entries in the fs_types list supersede
272 earlier ones, the configuration parameter for fs_types.floppy.inode_size
273 will be used, so the filesystem will have an inode size of 128.
275 The exception to this resolution is the
277 tag, which specifies a set of changes to the features used by the
278 filesystem, and which is cumulative. So in the above example, first
279 the configuration relation defaults.base_features would enable an
280 initial feature set with the sparse_super, filetype, resize_inode, and
281 dir_index features enabled. Then configuration relation
282 fs_types.ext4.features would enable the extents and flex_bg
283 features, and finally the configuration relation
284 fs_types.floppy.features would remove
285 the resize_inode feature, resulting in a filesystem feature set
286 consisting of the sparse_super, filetype, dir_index,
287 extents_and flex_bg features.
289 For each filesystem type, the following tags may be used in that
290 fs_type's subsection. These tags may also be used in the
295 This relation specifies the features which are initially enabled for this
296 filesystem type. Only one
298 will be used, so if there are multiple entries in the fs_types list
299 whose subsections define the
301 relation, only the last will be used by
305 Change the behavior of the kernel code when errors are detected.
306 In all cases, a filesystem error will cause
308 to check the filesystem on the next boot.
310 can be one of the following:
314 Continue normal execution.
317 Remount filesystem read-only.
320 Cause a kernel panic.
324 This relation specifies a comma-separated list of features edit
325 requests which modify the feature set
326 used by the newly constructed filesystem. The syntax is the same as the
328 command-line option to
330 that is, a feature can be prefixed by a caret ('^') symbol to disable
331 a named feature. Each
333 relation specified in the fs_types list will be applied in the order
334 found in the fs_types list.
337 This relation specifies set of features which should be enabled or
338 disabled after applying the features listed in the
342 relations. It may be overridden by the
344 command-line option to
347 .I auto_64-bit_support
348 This relation is a boolean which specifies whether
350 should automatically add the 64bit feature if the number of blocks for
351 the file system requires this feature to be enabled. The resize_inode
352 feature is also automatically disabled since it doesn't support 64-bit
356 This relation specifies the set of mount options which should be enabled
357 by default. These may be changed at a later time with the
359 command-line option to
363 This relation specifies the default blocksize if the user does not
364 specify a blocksize on the command line.
367 This boolean relation specifies whether the inode table should
368 be lazily initialized. It only has meaning if the uninit_bg feature is
369 enabled. If lazy_itable_init is true and the uninit_bg feature is
370 enabled, the inode table will
371 not be fully initialized by
373 This speeds up filesystem
374 initialization noticeably, but it requires the kernel to finish
375 initializing the filesystem in the background when the filesystem is
379 This relation specifies the location of the journal.
382 This relation indicates whether file systems with the
384 feature enabled should be created with 0, 1, or 2 backup superblocks.
386 .I packed_meta_blocks
387 This boolean relation specifes whether the allocation bitmaps, inode
388 table, and journal should be located at the beginning of the file system.
391 This relation specifies the default inode ratio if the user does not
392 specify one on the command line.
395 This relation specifies the default inode size if the user does not
396 specify one on the command line.
399 This relation specifies the default percentage of filesystem blocks
400 reserved for the super-user, if the user does not specify one on the command
404 This relation specifies the default hash algorithm used for the
405 new filesystems with hashed b-tree directories. Valid algorithms
413 This relation specifies the number of block groups that will be packed
414 together to create one large virtual block group on an ext4 filesystem.
415 This improves meta-data locality and performance on meta-data heavy
416 workloads. The number of groups must be a power of 2 and may only be
417 specified if the flex_bg filesystem feature is enabled.
420 This relation specifies additional extended options which should be
423 as if they were prepended to the argument of the
425 option. This can be used to configure the default extended options used
428 on a per-filesystem type basis.
431 This boolean relation specifies whether the
433 should attempt to discard device prior to filesystem creation.
436 This relation specifies the default cluster size if the bigalloc file
437 system feature is enabled. It can be overridden via the
439 command line option to
443 This boolean relation enables the creation of pre-allocated files as
444 part of formatting the file system.
447 This relation controls the user ownership for all of the files and
448 directories created by the
453 This relation controls the group ownership for all of the files and
454 directories created by the
459 This relation specifies the umask used when creating the files and
465 This relation specifies the number of huge files to be created. If this
466 relation is not specified, or is set to zero, and the
468 relation is non-zero, then
470 will create as many huge files as can fit to fill the entire file system.
473 This relation specifies how much space should be reserved for other
477 This relation specifies the size of the huge files. If this relation is
478 not specified, the default is to fill the entire file system.
481 This relation specifies the alignment for the start block of the huge
482 files. It also forces the size of huge files to be a multiple of the
483 requested alignment. If this relation is not specified, no alignment
484 requirement will be imposed on the huge files.
486 .I hugefiles_align_disk
487 Thie relations specifies whether the alignment should be relative to the
488 beginning of the hard drive (assuming that the starting offset of the
489 partition is available to mke2fs). The default value is false, which
490 will cause hugefile alignment to be relative to the beginning of the
494 This relation specifies the base file name for the huge files.
497 This relation specifies the (zero-padded) width of the field for the
501 This boolean relation specifies whether or not zero blocks will be
502 written to the hugefiles while
504 is creating them. By default, zero blocks will be written to the huge
505 files to avoid stale data from being made available to potentially
506 untrusted user programs, unless the device supports a discard/trim
507 operation which will take care of zeroing the device blocks. By setting
509 to false, this step will always be skipped, which can be useful if it is
510 known that the disk has been previously erased, or if the user programs
511 that will have access to the huge files are trusted to not reveal stale
513 .SH THE [devices] STANZA
516 stanza names device name so that per-device defaults can be specified.
519 This relation specifies the default parameter for the
521 option, if this option isn't specified on the command line.
524 This relation specifies the default parameter for the
526 option, if this option isn't specified on the command line.
530 The configuration file for