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 or ext3 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 define the default parameters
76 In general, these defaults may be overridden by a definition in the
78 stanza, or by an command-line option provided by the user.
81 Contains relations which define defaults that should be used for specific
82 filesystem types. The filesystem type can be specified explicitly using
87 .SH THE [defaults] STANZA
88 The following relations are defined in the
93 This relation specifies the filesystems features which are enabled in
94 newly created filesystems. It may be overridden by the
96 relation found in the filesystem or usage type subsection of
102 This relation specifies a set of features that should be added or
103 removed to the features listed in the
105 relation. It may be overridden by the filesystem-specific
107 in the filesystem or usage type subsection of
115 .I enable_periodic_fsck
116 This boolean relation specifies whether periodic filesystem checks should be
117 enforced at boot time. If set to true, checks will be forced every
118 180 days, or after a random number of mounts. These values may
119 be changed later via the
123 command-line options to
127 This boolean relation, if set to a value of true, forces
129 to always try to create an undo file, even if the undo file might be
130 huge and it might extend the time to create the filesystem image
131 because the inode table isn't being initialized lazily.
134 This relation specifies the default filesystem type if the user does not
139 is not started using a program name of the form
140 .BI mkfs. fs-type\fR.
141 If both the user and the
143 file does not specify a default filesystem type, mke2fs will use a
144 default filesystem type of
146 if a journal was requested via a command-line option, or
151 This relation specifies the default blocksize if the user does not
152 specify a blocksize on the command line, and the filesystem-type
153 specific section of the configuration file does not specify a blocksize.
156 This relation specifies the default hash algorithm used for the
157 new filesystems with hashed b-tree directories. Valid algorithms
165 This relation specifies the default inode ratio if the user does not
166 specify one on the command line, and the filesystem-type
167 specific section of the configuration file does not specify a default
171 This relation specifies the default inode size if the user does not
172 specify one on the command line, and the filesystem-type
173 specific section of the configuration file does not specify a default
177 This relation specifies the default percentage of filesystem blocks
178 reserved for the super-user, if the user does not
179 specify one on the command line, and the filesystem-type
180 specific section of the configuration file does not specify a default
181 reserved ratio. This value can be a floating point number.
184 This relation specifies the directory where the undo file should be
185 stored. It can be overridden via the
186 .B E2FSPROGS_UNDO_DIR
187 environment variable. If the directory location is set to the value
190 will not create an undo file.
191 .SH THE [fs_types] STANZA
194 stanza names a filesystem type or usage type which can be specified via the
204 program constructs a list of fs_types by concatenating the filesystem
205 type (i.e., ext2, ext3, etc.) with the usage type list. For most
206 configuration options,
208 will look for a subsection in the
210 stanza corresponding with each entry in the constructed list, with later
211 entries overriding earlier filesystem or usage types.
213 example, consider the following
219 base_features = sparse_super,filetype,resize_inode,dir_index
233 features = has_journal
239 features = extents,flex_bg
255 features = ^resize_inode
263 If mke2fs started with a program name of
265 then the filesystem type of ext4 will be used. If the filesystem is
266 smaller than 3 megabytes, and no usage type is specified, then
271 This results in an fs_types list of "ext4, floppy". Both the ext4
272 subsection and the floppy subsection define an
274 relation, but since the later entries in the fs_types list supersede
275 earlier ones, the configuration parameter for fs_types.floppy.inode_size
276 will be used, so the filesystem will have an inode size of 128.
278 The exception to this resolution is the
280 tag, which is specifies a set of changes to the features used by the
281 filesystem, and which is cumulative. So in the above example, first
282 the configuration relation defaults.base_features would enable an
283 initial feature set with the sparse_super, filetype, resize_inode, and
284 dir_index features enabled. Then configuration relation
285 fs_types.ext4.features would enable the extents and flex_bg
286 features, and finally the configuration relation
287 fs_types.floppy.features would remove
288 the resize_inode feature, resulting in a filesystem feature set
289 consisting of the sparse_super, filetype, resize_inode, dir_index,
290 extents_and flex_bg features.
292 For each filesystem type, the following tags may be used in that
293 fs_type's subsection:
296 This relation specifies the features which are initially enabled for this
297 filesystem type. Only one
299 will be used, so if there are multiple entries in the fs_types list
300 whose subsections define the
302 relation, only the last will be used by
306 This relation specifies a comma-separated list of features edit
307 requests which modify the feature set
308 used by the newly constructed filesystem. The syntax is the same as the
310 command-line option to
312 that is, a feature can be prefixed by a caret ('^') symbol to disable
313 a named feature. Each
315 relation specified in the fs_types list will be applied in the order
316 found in the fs_types list.
319 This relation specifies set of features which should be enabled or
320 disabled after applying the features listed in the
324 relations. It may be overridden by the
326 command-line option to
329 .I auto_64-bit_support
330 This relation is a boolean which specifies whether
332 should automatically add the 64bit feature if the number of blocks for
333 the file system requires this feature to be enabled. The resize_inode
334 feature is also automatically disabled since it doesn't support 64-bit
338 This relation specifies the set of mount options which should be enabled
339 by default. These may be changed at a later time with the
341 command-line option to
345 This relation specifies the default blocksize if the user does not
346 specify a blocksize on the command line.
349 This boolean relation specifies whether the inode table should
350 be lazily initialized. It only has meaning if the uninit_bg feature is
351 enabled. If lazy_itable_init is true and the uninit_bg feature is
352 enabled, the inode table will
353 not fully initialized by
355 This speeds up filesystem
356 initialization noticeably, but it requires the kernel to finish
357 initializing the filesystem in the background when the filesystem is
361 This relation specifies the default inode ratio if the user does not
362 specify one on the command line.
365 This relation specifies the default inode size if the user does not
366 specify one on the command line.
369 This relation specifies the default percentage of filesystem blocks
370 reserved for the super-user, if the user does not specify one on the command
374 This relation specifies the default hash algorithm used for the
375 new filesystems with hashed b-tree directories. Valid algorithms
383 This relation specifies the number of block groups that will be packed
384 together to create one large virtual block group on an ext4 filesystem.
385 This improves meta-data locality and performance on meta-data heavy
386 workloads. The number of groups must be a power of 2 and may only be
387 specified if the flex_bg filesystem feature is enabled.
390 This relation specifies additional extended options which should be
393 as if they were prepended to the argument of the
395 option. This can be used to configure the default extended options used
398 on a per-filesystem type basis.
401 This boolean relation specifies whether the
403 should attempt to discard device prior to filesystem creation.
406 This relation specifies the default cluster size if the bigalloc file
407 system feature is enabled. It can be overridden via the
409 command line option to
411 .SH THE [devices] STANZA
414 stanza names device name so that per-device defaults can be specified.
417 This relation specifies the default parameter for the
419 option, if this option isn't specified on the command line.
422 This relation specifies the default parameter for the
424 option, if this option isn't specified on the command line.
428 The configuration file for