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 The following stanzas are used in the
64 file. They will be described in more detail in future sections of this
68 Contains relations which define the default parameters
71 In general, these defaults may be overridden by a definition in the
73 stanza, or by an command-line option provided by the user.
76 Contains relations which define defaults that should be used for specific
77 filesystem types. The filesystem type can be specified explicitly using
82 .SH THE [defaults] STANZA
83 The following relations are defined in the
88 This relation specifies the filesystems features which are enabled in
89 newly created filesystems. It may be overridden by the
91 relation found in the filesystem or usage type subsection of
97 This relation specifies a set of features that should be added or
98 removed to the features listed in the
100 relation. It may be overridden by the filesystem-specific
102 in the filesystem or usage type subsection of
111 This relation, if set to a boolean value of true, forces
113 to always try to create an undo file, even if the undo file might be
114 huge and it might extend the time to create the filesystem image
115 because the inode table isn't being initialized lazily.
118 This relation specifies the default filesystem type if the user does not
123 is not started using a program name of the form
124 .BI mkfs. fs-type\fR.
125 If both the user and the
127 file does not specify a default filesystem type, mke2fs will use a
128 default filesystem type of
130 if a journal was requested via a command-line option, or
135 This relation specifies the default blocksize if the user does not
136 specify a blocksize on the command line, and the filesystem-type
137 specific section of the configuration file does not specify a blocksize.
140 This relation specifies the default hash algorithm used for the
141 new filesystems with hashed b-tree directories. Valid algorithms
149 This relation specifies the default inode ratio if the user does not
150 specify one on the command line, and the filesystem-type
151 specific section of the configuration file does not specify a default
155 This relation specifies the default inode size if the user does not
156 specify one on the command line, and the filesystem-type
157 specific section of the configuration file does not specify a default
161 This relation specifies the directory where the undo file should be
162 stored. It can be overridden via the
163 .B E2FSPROGS_UNDO_DIR
164 environment variable. If the directory location is set to the value
167 will not create an undo file.
168 .SH THE [fs_types] STANZA
171 stanza names a filesystem type or usage type which can be specified via the
181 program constructs a list of fs_types by concatenating the filesystem
182 type (i.e., ext2, ext3, etc.) with the usage type list. For most
183 configuration options,
185 will look for a subsection in the
187 stanza corresponding with each entry in the constructed list, with later
188 entries overriding earlier filesystem or usage types.
190 example, consider the following
196 base_features = sparse_super,filetype,resize_inode,dir_index
210 features = has_journal
216 features = extents,flex_bg
232 features = ^resize_inode
240 If mke2fs started with a program name of
242 then the filesystem type of ext4 will be used. If the filesystem is
243 smaller than 3 megabytes, and no usage type is specified, then
248 This results in an fs_types list of "ext4, floppy". Both the ext4
249 subsection and the floppy subsection define an
251 relation, but since the later entries in the fs_types list supersede
252 earlier ones, the configuration parameter for fs_types.floppy.inode_size
253 will be used, so the filesystem will have an inode size of 128.
255 The exception to this resolution is the
257 tag, which is specifies a set of changes to the features used by the
258 filesystem, and which is cumulative. So in the above example, first
259 the configuration relation defaults.base_features would enable an
260 initial feature set with the sparse_super, filetype, resize_inode, and
261 dir_index features enabled. Then configuration relation
262 fs_types.ext4.features would enable the extents and flex_bg
263 features, and finally the configuration relation
264 fs_types.floppy.features would remove
265 the resize_inode feature, resulting in a filesystem feature set
266 consisting of the sparse_super, filetype, resize_inode, dir_index,
267 extents_and flex_bg features.
269 For each filesystem type, the following tags may be used in that
270 fs_type's subsection:
273 This relation specifies the features which are initially enabled for this
274 filesystem type. Only one
276 will be used, so if there are multiple entries in the fs_types list
277 whose subsections define the
279 relation, only the last will be used by
283 This relation specifies a comma-separated list of features edit
284 requests which modify the feature set
285 used by the newly constructed filesystem. The syntax is the same as the
287 command-line option to
289 that is, a feature can be prefixed by a caret ('^') symbol to disable
290 a named feature. Each
292 relation specified in the fs_types list will be applied in the order
293 found in the fs_types list.
296 This relation specifies set of features which should be enabled or
297 disabled after applying the features listed in the
301 relations. It may be overridden by the
303 command-line option to
306 .I auto_64-bit_support
307 This relation is a boolean which specifies whether
309 should automatically add the 64bit feature if the number of blocks for
310 the file system requires this feature to be enabled. The resize_inode
311 feature is also automatically disabled since it doesn't support 64-bit
315 This relation specifies the default blocksize if the user does not
316 specify a blocksize on the command line.
319 This relation is a boolean which specifies whether the inode table should
320 be lazily initialized. It only has meaning if the uninit_bg feature is
321 enabled. If lazy_itable_init is true and the uninit_bg feature is
322 enabled, the inode table will
323 not fully initialized by
325 This speeds up filesystem
326 initialization noticeably, but it requires the kernel to finish
327 initializing the filesystem in the background when the filesystem is
331 This relation specifies the default inode ratio if the user does not
332 specify one on the command line.
335 This relation specifies the default inode size if the user does not
336 specify one on the command line.
339 This relation specifies the default hash algorithm used for the
340 new filesystems with hashed b-tree directories. Valid algorithms
348 This relation specifies the number of block goups that will be packed
349 together to create one large virtual block group on an ext4 filesystem.
350 This improves meta-data locality and performance on meta-data heavy
351 workloads. The number of goups must be a power of 2 and may only be
352 specified if the flex_bg filesystem feature is enabled.
354 This relation specifies additional extended options which should be
357 as if they were prepended to the argument of the
359 option. This can be used to configure the default extended options used
362 on a per-filesystem type basis.
365 This relation is a boolean which specifies whether the
367 should attempt to discard device prior to filesystem creation.
371 The configuration file for