~csurbhi/ubuntu/maverick/e2fsprogs/e2fsprogs.fix-505719

« back to all changes in this revision

Viewing changes to misc/mke2fs.conf.5.in

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2008-08-08 20:32:11 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20080808203211-w72lpsd9q7o3bw6x
Tags: 1.41.0-3ubuntu1
* Merge from Debian unstable (LP: #254152, #246461), remaining changes:
  - Do not build-depend on dietlibc-dev, which is in universe.

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
.B -T
80
80
option to
81
81
.BR mke2fs (8).
82
 
If no filesystem type is specified, 
83
 
.BR mke2fs (8)
84
 
will use the filesystem type 
85
 
.I floppy
86
 
if the filesystem size is less than or equal to 3 megabytes.  
87
 
If the filesystem size is greater than 3 but less than or equal to 
88
 
512 megabytes, 
89
 
.BR mke2fs (8)
90
 
will use the filesystem
91
 
.IR small .
92
 
Otherwise, 
93
 
.BR mke2fs (8)
94
 
will use the default filesystem type
95
 
.IR default .
96
82
.SH THE [defaults] STANZA
97
83
The following relations are defined in the 
98
84
.I [defaults]
102
88
This relation specifies the filesystems features which are enabled in
103
89
newly created filesystems.  It may be overridden by the
104
90
.I base_features
105
 
relation found in the filesystem-type-specific subsection of
 
91
relation found in the filesystem or usage type subsection of
106
92
the
107
93
.I [fs_types] 
108
94
stanza.
113
99
.I base_features
114
100
relation.  It may be overridden by the filesystem-specific 
115
101
.I default_features
116
 
in the filesystem-type subsection of
 
102
in the filesystem or usage type subsection of
117
103
.IR [fs_types] ,
118
104
and by the 
119
105
.B -O
121
107
to 
122
108
.BR mke2fs (8).
123
109
.TP
 
110
.I force_undo
 
111
This relation, if set to a boolean value of true, forces
 
112
.B mke2fs
 
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.
 
116
.TP
 
117
.I fs_type
 
118
This relation specifies the default filesystem type if the user does not
 
119
specify it via the
 
120
.B \-t
 
121
option, or if
 
122
.B mke2fs
 
123
is not started using a program name of the form
 
124
.BI mkfs. fs-type\fR.
 
125
If both the user and the
 
126
.B mke2fs.conf
 
127
file does not specify a default filesystem type, mke2fs will use a
 
128
default filesystem type of
 
129
.IR ext3
 
130
if a journal was requested via a command-line option, or
 
131
.I ext2
 
132
if not.
 
133
.TP
124
134
.I blocksize
125
135
This relation specifies the default blocksize if the user does not
126
136
specify a blocksize on the command line, and the filesystem-type
137
147
specify one on the command line, and the filesystem-type
138
148
specific section of the configuration file does not specify a default
139
149
inode size.
 
150
.TP
 
151
.I undo_dir
 
152
This relation specifies the directory where the undo file should be
 
153
stored.  It can be overriden via the
 
154
.B E2FSPROGS_UNDO_DIR
 
155
environemnt variable.  If the directory location is set to the value
 
156
.IR none ,
 
157
.B mke2fs
 
158
will not create an undo file.
140
159
.SH THE [fs_types] STANZA
141
160
Each tag in the
142
161
.I [fs_types] 
143
 
stanza names a filesystem type which can be specified via the 
144
 
.B -T
145
 
option to
146
 
.BR mke2fs (8).
147
 
The value of the tag is a subsection where the relations in that
148
 
subsection define the defaults for that filesystem type. For
149
 
example:
150
 
.P
 
162
stanza names a filesystem type or usage type which can be specified via the
 
163
.B \-t
 
164
or
 
165
.B \-T
 
166
options to
 
167
.BR mke2fs (8),
 
168
respectively.
 
169
.P
 
170
The
 
171
.B mke2fs
 
172
program constructs a list of fs_types by concatenating the filesystem
 
173
type (i.e., ext2, ext3, etc.) with the usage type list.  For most
 
174
configuration options,
 
175
.B mke2fs
 
176
will look for a subsection in the
 
177
.I [fs_types]
 
178
stanza corresponding with each entry in the constructed list, with later
 
179
entries overriding earlier filesystem or usage types.
 
180
For
 
181
example, consider the following
 
182
.B mke2fs.conf
 
183
fragment:
 
184
.P
 
185
[defaults]
 
186
.br
 
187
        base_features = sparse_super,filetype,resize_inode,dir_index
 
188
.br
 
189
        blocksize = 4096
 
190
.br
 
191
        inode_size = 256
 
192
.br
 
193
        inode_ratio = 16384
 
194
.br
 
195
 
 
196
.br
151
197
[fs_types]
152
198
.br
 
199
        ext3 = {
 
200
.br
 
201
                features = has_journal
 
202
.br
 
203
        }
 
204
.br
 
205
        ext4 = {
 
206
.br
 
207
                features = extents,flex_bg
 
208
.br
 
209
                inode_size = 256
 
210
.br
 
211
        }
 
212
.br
153
213
        small = {
154
214
.br
155
215
                blocksize = 1024
160
220
.br
161
221
        floppy = {
162
222
.br
 
223
                features = ^resize_inode
 
224
.br
163
225
                blocksize = 1024
164
226
.br
 
227
                inode_size = 128
 
228
.br
165
229
        }
166
230
.P
 
231
If mke2fs started with a program name of
 
232
.BR mke2fs.ext4 ,
 
233
then the filesystem type of ext4 will be used.  If the filesystem is
 
234
smaller than 3 megabytes, and no usage type is specified, then
 
235
.B mke2fs
 
236
will use a default
 
237
usage type of
 
238
.IR floppy .
 
239
This results in an fs_types list of "ext4, floppy".   Both the ext4
 
240
subsection and the floppy subsection define an
 
241
.I inode_size
 
242
relation, but since the later entries in the fs_types list supercede
 
243
earlier ones, the configuration parameter for fs_types.floppy.inode_size
 
244
will be used, so the filesystem  will have an inode size of 128.
 
245
.P
 
246
The exception to this resolution is the
 
247
.I features
 
248
tag, which is specifies a set of changes to the features used by the
 
249
filesystem, and which is cumulative.  So in the above example, first
 
250
the configuration relation defaults.base_features would enable an
 
251
initial feature set with the sparse_super, filetype, resize_inode, and
 
252
dir_index features enabled.  Then configuration relation
 
253
fs_types.ext4.features would enable the extents and flex_bg
 
254
features, and finally the configuration relation
 
255
fs_types.floppy.features would remove
 
256
the resize_inode feature, resulting in a filesystem feature set
 
257
consisting of the sparse_super, filetype, resize_inode, dir_index,
 
258
extents_and flex_bg features.
 
259
.P
167
260
For each filesystem type, the following tags may be used in that 
168
261
fs_type's subsection:
169
262
.TP
170
263
.I base_features
171
 
This relation specifies the features which are enabled for this
172
 
filesystem type.
 
264
This relation specifies the features which are initially enabled for this
 
265
filesystem type.  Only one
 
266
.I base_features
 
267
will be used, so if there are multiple entries in the fs_types list
 
268
whose subsections define the
 
269
.I base_features
 
270
relation, only the last will be used by
 
271
.BR mke2fs (8).
 
272
.TP
 
273
.I features
 
274
This relation specifies a comma-separated list of features edit
 
275
requests which modify the feature set
 
276
used by the newly constructed filesystem.  The syntax is the same as the
 
277
.B -O
 
278
command-line option to
 
279
.BR mke2fs (8);
 
280
that is, a feature can be prefixed by a caret ('^') symbol to disable
 
281
a named feature.  Each
 
282
.I feature
 
283
relation specified in the fs_types list will be applied in the order
 
284
found in the fs_types list.
173
285
.TP
174
286
.I default_features
175
287
This relation specifies set of features which should be enabled or 
176
 
disabled to the features listed in the
 
288
disabled after applying the features listed in the
177
289
.I base_features
178
 
relation.  It may be overridden by the 
 
290
and
 
291
.I features
 
292
relations.  It may be overridden by the
179
293
.B -O
180
294
command-line option to
181
295
.BR mke2fs (8).
184
298
This relation specifies the default blocksize if the user does not
185
299
specify a blocksize on the command line.
186
300
.TP
 
301
.I lazy_itable_init
 
302
This relation is a boolean which specifies whether the inode table should 
 
303
be lazily initialized.  It only has meaning if the uninit_bg feature is
 
304
enabled.  If lazy_itable_init is true and the uninit_bg feature is
 
305
enabled,  the inode table will
 
306
not fully initialized by 
 
307
.BR mke2fs (8).
 
308
This speeds up filesystem
 
309
initialization noitceably, but it requires the kernel to finish
 
310
initializing the filesystem in the background when the filesystem is
 
311
first mounted.
 
312
.TP
187
313
.I inode_ratio
188
314
This relation specifies the default inode ratio if the user does not
189
315
specify one on the command line.
191
317
.I inode_size
192
318
This relation specifies the default inode size if the user does not
193
319
specify one on the command line.
 
320
.TP
 
321
.I flex_bg_size
 
322
This relation specifies the number of block goups that will be packed
 
323
together to create one large virtual block group on an ext4 filesystem.
 
324
This improves meta-data locality and performance on meta-data heavy
 
325
workloads.  The number of goups must be a power of 2 and may only be
 
326
specified if the flex_bg filesystem feature is enabled.
 
327
.I options
 
328
This relation specifies additional extended options which should be
 
329
treated by
 
330
.BR mke2fs (8)
 
331
as if they were prepended to the argument of the
 
332
.B -E
 
333
option.  This can be used to configure the default extended options used
 
334
by
 
335
.BR mke2fs (8)
 
336
on a per-filesystem type basis.
194
337
.SH FILES
195
338
.TP
196
339
.I /etc/mke2fs.conf