1mke2fs.conf(5)                File Formats Manual               mke2fs.conf(5)
2
3
4

NAME

6       mke2fs.conf - Configuration file for mke2fs
7

DESCRIPTION

9       mke2fs.conf  is  the configuration file for mke2fs(8).  It controls the
10       default parameters used by mke2fs(8) when it is creating ext2  or  ext3
11       filesystems.
12
13       The  mke2fs.conf  file uses an INI-style format.  Stanzas, or top-level
14       sections, are delimited by square braces: [ ].   Within  each  section,
15       each  line  defines  a  relation, which assigns tags to values, or to a
16       subsection, which contains further relations or subsections.  An  exam‐
17       ple  of  the  INI-style  format used by this configuration file follows
18       below:
19
20            [section1]
21                 tag1 = value_a
22                 tag1 = value_b
23                 tag2 = value_c
24
25            [section 2]
26                 tag3 = {
27                      subtag1 = subtag_value_a
28                      subtag1 = subtag_value_b
29                      subtag2 = subtag_value_c
30                 }
31                 tag1 = value_d
32                 tag2 = value_e
33            }
34
35       Comments are delimited by a semicolon (';') or a hash  ('#')  character
36       at  the beginning of the comment, and are terminated by the end of line
37       character.
38
39       Tags and values must be quoted using double quotes if they contain spa‐
40       ces.   Within  a  quoted string, the standard backslash interpretations
41       apply: "\n" (for the newline character), "\t" (for the tab  character),
42       "\b" (for the backspace character), and "\\" (for the backslash charac‐
43       ter).
44
45       The following stanzas are used in the mke2fs.conf file.  They  will  be
46       described in more detail in future sections of this document.
47
48       [defaults]
49              Contains  relations  which define the default parameters used by
50              mke2fs(8).  In general, these defaults may be  overridden  by  a
51              definition  in the fs_types stanza, or by an command-line option
52              provided by the user.
53
54       [fs_types]
55              Contains relations which define defaults that should be used for
56              specific filesystem types.  The filesystem type can be specified
57              explicitly using the -T option to mke2fs(8).
58

THE [defaults] STANZA

60       The following relations are defined in the [defaults] stanza.
61
62       base_features
63              This relation  specifies  the  filesystems  features  which  are
64              enabled  in  newly created filesystems.  It may be overridden by
65              the base_features relation found in the filesystem or usage type
66              subsection of the [fs_types] stanza.
67
68       default_features
69              This  relation  specifies a set of features that should be added
70              or removed to the features listed in the base_features relation.
71              It may be overridden by the filesystem-specific default_features
72              in the filesystem or usage type subsection of [fs_types], and by
73              the -O command-line option to mke2fs(8).
74
75       enable_periodic_fsck
76              This  relation  specifies  whether  periodic  filesystem  checks
77              should be enforced at boot time.  If  enabled,  checks  will  be
78              forced  every  180  days,  or  after  a random number of mounts.
79              These values may be changed later via the -i and -c command-line
80              options to tune2fs(8).
81
82       force_undo
83              This  relation, if set to a boolean value of true, forces mke2fs
84              to always try to create an undo file,  even  if  the  undo  file
85              might  be  huge  and  it  might  extend  the  time to create the
86              filesystem image because the inode table isn't being initialized
87              lazily.
88
89       fs_type
90              This  relation specifies the default filesystem type if the user
91              does not specify it via the -t  option,  or  if  mke2fs  is  not
92              started  using a program name of the form mkfs.fs-type.  If both
93              the user and the mke2fs.conf file does  not  specify  a  default
94              filesystem  type,  mke2fs  will use a default filesystem type of
95              ext3 if a journal was requested via a  command-line  option,  or
96              ext2 if not.
97
98       blocksize
99              This  relation  specifies the default blocksize if the user does
100              not specify a blocksize on the command line, and the filesystem-
101              type specific section of the configuration file does not specify
102              a blocksize.
103
104       hash_alg
105              This relation specifies the default hash algorithm used for  the
106              new  filesystems  with  hashed  b-tree directories.  Valid algo‐
107              rithms accepted are: legacy, half_md4, and tea.
108
109       inode_ratio
110              This relation specifies the default inode ratio if the user does
111              not  specify  one  on  the command line, and the filesystem-type
112              specific section of the configuration file does  not  specify  a
113              default inode ratio.
114
115       inode_size
116              This  relation specifies the default inode size if the user does
117              not specify one on the command  line,  and  the  filesystem-type
118              specific  section  of  the configuration file does not specify a
119              default inode size.
120
121       undo_dir
122              This relation specifies the directory where the undo file should
123              be  stored.   It  can  be  overridden via the E2FSPROGS_UNDO_DIR
124              environment variable.  If the directory location is set  to  the
125              value none, mke2fs will not create an undo file.
126

THE [fs_types] STANZA

128       Each tag in the [fs_types] stanza names a filesystem type or usage type
129       which can be specified via the -t or -T options to  mke2fs(8),  respec‐
130       tively.
131
132       The  mke2fs  program constructs a list of fs_types by concatenating the
133       filesystem type (i.e., ext2, ext3, etc.) with the usage type list.  For
134       most  configuration  options,  mke2fs will look for a subsection in the
135       [fs_types] stanza corresponding with  each  entry  in  the  constructed
136       list,  with later entries overriding earlier filesystem or usage types.
137       For example, consider the following mke2fs.conf fragment:
138
139       [defaults]
140            base_features = sparse_super,filetype,resize_inode,dir_index
141            blocksize = 4096
142            inode_size = 256
143            inode_ratio = 16384
144
145       [fs_types]
146            ext3 = {
147                 features = has_journal
148            }
149            ext4 = {
150                 features = extents,flex_bg
151                 inode_size = 256
152            }
153            small = {
154                 blocksize = 1024
155                 inode_ratio = 4096
156            }
157            floppy = {
158                 features = ^resize_inode
159                 blocksize = 1024
160                 inode_size = 128
161            }
162
163       If mke2fs started with a program name of mke2fs.ext4, then the filesys‐
164       tem  type  of  ext4  will be used.  If the filesystem is smaller than 3
165       megabytes, and no usage type is  specified,  then  mke2fs  will  use  a
166       default  usage  type  of  floppy.   This results in an fs_types list of
167       "ext4, floppy".   Both the ext4 subsection and  the  floppy  subsection
168       define  an  inode_size  relation,  but  since  the later entries in the
169       fs_types list supersede earlier ones, the configuration  parameter  for
170       fs_types.floppy.inode_size  will  be used, so the filesystem  will have
171       an inode size of 128.
172
173       The exception to this resolution is the features tag, which  is  speci‐
174       fies a set of changes to the features used by the filesystem, and which
175       is cumulative.  So in the above example, first the configuration  rela‐
176       tion  defaults.base_features  would  enable an initial feature set with
177       the  sparse_super,  filetype,  resize_inode,  and  dir_index   features
178       enabled.   Then  configuration  relation  fs_types.ext4.features  would
179       enable the extents and flex_bg features, and finally the  configuration
180       relation  fs_types.floppy.features  would  remove the resize_inode fea‐
181       ture,  resulting  in  a  filesystem  feature  set  consisting  of   the
182       sparse_super,  filetype,  resize_inode,  dir_index, extents_and flex_bg
183       features.
184
185       For each filesystem type, the  following  tags  may  be  used  in  that
186       fs_type's subsection:
187
188       base_features
189              This relation specifies the features which are initially enabled
190              for this filesystem type.  Only one base_features will be  used,
191              so if there are multiple entries in the fs_types list whose sub‐
192              sections define the base_features relation, only the  last  will
193              be used by mke2fs(8).
194
195       features
196              This  relation specifies a comma-separated list of features edit
197              requests which modify the feature set used  by  the  newly  con‐
198              structed  filesystem.  The syntax is the same as the -O command-
199              line option to mke2fs(8); that is, a feature can be prefixed  by
200              a  caret  ('^') symbol to disable a named feature.  Each feature
201              relation specified in the fs_types list will be applied  in  the
202              order found in the fs_types list.
203
204       default_features
205              This  relation specifies set of features which should be enabled
206              or disabled after applying the features listed in the  base_fea‐
207              tures  and  features  relations.  It may be overridden by the -O
208              command-line option to mke2fs(8).
209
210       blocksize
211              This relation specifies the default blocksize if the  user  does
212              not specify a blocksize on the command line.
213
214       lazy_itable_init
215              This relation is a boolean which specifies whether the inode ta‐
216              ble should be lazily initialized.  It only has  meaning  if  the
217              uninit_bg  feature  is enabled.  If lazy_itable_init is true and
218              the uninit_bg feature is enabled,   the  inode  table  will  not
219              fully  initialized by mke2fs(8).  This speeds up filesystem ini‐
220              tialization noticeably, but it requires  the  kernel  to  finish
221              initializing  the filesystem in the background when the filesys‐
222              tem is first mounted.
223
224       inode_ratio
225              This relation specifies the default inode ratio if the user does
226              not specify one on the command line.
227
228       inode_size
229              This  relation specifies the default inode size if the user does
230              not specify one on the command line.
231
232       hash_alg
233              This relation specifies the default hash algorithm used for  the
234              new  filesystems  with  hashed  b-tree directories.  Valid algo‐
235              rithms accepted are: legacy, half_md4, and tea.
236
237       flex_bg_size
238              This relation specifies the number of block groups that will  be
239              packed  together  to  create one large virtual block group on an
240              ext4 filesystem.  This improves meta-data locality  and  perfor‐
241              mance  on  meta-data heavy workloads.  The number of groups must
242              be a power of 2  and  may  only  be  specified  if  the  flex_bg
243              filesystem  feature is enabled.  options This relation specifies
244              additional extended options which should be treated by mke2fs(8)
245              as  if  they  were  prepended  to the argument of the -E option.
246              This can be used to configure the default extended options  used
247              by mke2fs(8) on a per-filesystem type basis.
248
249       discard
250              This relation is a boolean which specifies whether the mke2fs(8)
251              should attempt to discard device prior to filesystem creation.
252

FILES

254       /etc/mke2fs.conf
255              The configuration file for mke2fs(8).
256

SEE ALSO

258       mke2fs(8)
259
260
261
262E2fsprogs version 1.41.12          May 2010                     mke2fs.conf(5)
Impressum