]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blame - misc/mke2fs.8.in
debian: add mention of the badblocks program in the package description
[thirdparty/e2fsprogs.git] / misc / mke2fs.8.in
CommitLineData
3839e657 1.\" -*- nroff -*-
a418d3ad
TT
2.\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved.
3.\" This file may be copied under the terms of the GNU Public License.
98794d0e 4.\"
74becf3c 5.TH MKE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
3839e657 6.SH NAME
4f858546 7mke2fs \- create an ext2/ext3/ext4 filesystem
3839e657
TT
8.SH SYNOPSIS
9.B mke2fs
10[
11.B \-c
98794d0e 12|
3839e657 13.B \-l
1e3472c5 14.I filename
3839e657
TT
15]
16[
17.B \-b
1e3472c5 18.I block-size
3839e657
TT
19]
20[
37c8db7b
TT
21.B \-D
22]
23[
3839e657 24.B \-f
1e3472c5 25.I fragment-size
3839e657
TT
26]
27[
5e05541a
TT
28.B \-g
29.I blocks-per-group
30]
31[
9ba40002
TT
32.B \-G
33.I number-of-groups
34]
35[
3839e657 36.B \-i
1e3472c5 37.I bytes-per-inode
3839e657
TT
38]
39[
067911ae
AD
40.B \-I
41.I inode-size
42]
43[
85ef4ae8 44.B \-j
dc2ec525
TT
45]
46[
47.B \-J
8ddaa66b 48.I journal-options
85ef4ae8
TT
49]
50[
5515e6b4
TT
51.B \-N
52.I number-of-inodes
53]
54[
a26ba650 55.B \-n
2740156b
TT
56]
57[
3839e657 58.B \-m
1e3472c5
TT
59.I reserved-blocks-percentage
60]
61[
62.B \-o
63.I creator-os
3839e657
TT
64]
65[
98794d0e 66.B \-O
896938d5
TT
67.IR feature [,...]
68]
69[
f3db3566
TT
70.B \-q
71]
72[
caf8ce4c
TT
73.B \-r
74.I fs-revision-level
a29f4d30
TT
75]
76[
c6a44136
TT
77.B \-E
78.I extended-options
521e3685
TT
79]
80[
3839e657
TT
81.B \-v
82]
f3db3566 83[
74becf3c
TT
84.B \-F
85]
86[
1e3472c5
TT
87.B \-L
88.I volume-label
89]
90[
91.B \-M
92.I last-mounted-directory
93]
94[
f3db3566
TT
95.B \-S
96]
818180cd 97[
3d43836f
TT
98.B \-t
99.I fs-type
100]
101[
50787ea2 102.B \-T
3d43836f 103.I usage-type
50787ea2
TT
104]
105[
b0afdda1
TT
106.B \-U
107.I UUID
108]
109[
818180cd
TT
110.B \-V
111]
1e3472c5 112.I device
3839e657 113[
1e3472c5 114.I blocks-count
3839e657 115]
48015ced 116@JDEV@.sp
8d641749 117@JDEV@.B "mke2fs \-O journal_dev"
48015ced
TT
118@JDEV@[
119@JDEV@.B \-b
120@JDEV@.I block-size
121@JDEV@]
8d641749 122.\" No external-journal specific journal options yet (size is ignored)
48015ced
TT
123.\" @JDEV@[
124.\" @JDEV@.B \-J
125.\" @JDEV@.I journal-options
126.\" @JDEV@]
127@JDEV@[
128@JDEV@.B \-L
129@JDEV@.I volume-label
130@JDEV@]
131@JDEV@[
132@JDEV@.B \-n
133@JDEV@]
134@JDEV@[
135@JDEV@.B \-q
136@JDEV@]
137@JDEV@[
138@JDEV@.B \-v
139@JDEV@]
8d641749 140@JDEV@.I external-journal
2d15576d
AD
141@JDEV@[
142@JDEV@.I blocks-count
143@JDEV@]
3839e657
TT
144.SH DESCRIPTION
145.B mke2fs
4f858546
TT
146is used to create an ext2, ext3, or ext4 filesystem, usually in a disk
147partition.
3839e657 148.I device
98794d0e 149is the special file corresponding to the device (e.g
caf8ce4c 150.IR /dev/hdXX ).
3839e657
TT
151.I blocks-count
152is the number of blocks on the device. If omitted,
153.B mke2fs
0072f8de
AD
154automagically figures the file system size. If called as
155.B mkfs.ext3
156a journal is created as if the
157.B \-j
158option was specified.
de7a86e2
TT
159.PP
160The defaults of the parameters for the newly created filesystem, if not
161overridden by the options listed below, are controlled by the
162.B /etc/mke2fs.conf
163configuration file. See the
164.BR mke2fs.conf (5)
165manual page for more details.
3839e657
TT
166.SH OPTIONS
167.TP
caf8ce4c 168.BI \-b " block-size"
98794d0e 169Specify the size of blocks in bytes. Valid block-size values are 1024,
06968e7e 1702048 and 4096 bytes per block. If omitted,
98794d0e 171block-size is heuristically determined by the filesystem size and
c5290fae 172the expected usage of the filesystem (see the
06968e7e 173.B \-T
98794d0e 174option). If
c5290fae 175.I block-size
eddf36ba 176is preceded by a negative sign ('-'), then
c6a44136
TT
177.B mke2fs
178will use heuristics to determine the
c5290fae 179appropriate block size, with the constraint that the block size will be
98794d0e 180at least
c5290fae
TT
181.I block-size
182bytes. This is useful for certain hardware devices which require that
183the blocksize be a multiple of 2k.
3839e657 184.TP
caf8ce4c 185.B \-c
3ed57c27 186Check the device for bad blocks before creating the file system. If
98794d0e 187this option is specified twice, then a slower read-write
3ed57c27 188test is used instead of a fast read-only test.
3839e657 189.TP
0f680ee8
ZL
190.B \-C " cluster-size"
191Specify the size of cluster in bytes for filesystems using the bigalloc
192feature. Valid cluster-size values are from 2048 to 256M bytes per
9518b297
TT
193cluster. This can only be specified if the bigalloc feature is
194enabled. (See the
195.B ext4 (5)
196man page for more details about bigalloc.) The default cluster size if
197bigalloc is enabled is 16 times the block size.
0f680ee8 198.TP
37c8db7b
TT
199.B \-D
200Use direct I/O when writing to the disk. This avoids mke2fs dirtying a
201lot of buffer cache memory, which may impact other applications running
202on a busy server. This option will cause mke2fs to run much more
203slowly, however, so there is a tradeoff to using direct I/O.
204.TP
c6a44136
TT
205.BI \-E " extended-options"
206Set extended options for the filesystem. Extended options are comma
207separated, and may take an argument using the equals ('=') sign. The
a26ba650 208.B \-E
98794d0e 209option used to be
a26ba650 210.B \-R
98794d0e 211in earlier versions of
c6a44136 212.BR mke2fs .
98794d0e 213The
a26ba650 214.B \-R
b769aaec
AD
215option is still accepted for backwards compatibility, but is deprecated.
216The following extended options are supported:
c6a44136
TT
217.RS 1.2i
218.TP
0f5eba75
AD
219.BI mmp_update_interval= interval
220Adjust the initial MMP update interval to
221.I interval
222seconds. Specifying an
223.I interval
224of 0 means to use the default interval. The specified interval must
225be less than 300 seconds. Requires that the
226.B mmp
227feature be enabled.
228.TP
0c17cb25 229.BI stride= stride-size
c6a44136 230Configure the filesystem for a RAID array with
0c17cb25
TT
231.I stride-size
232filesystem blocks. This is the number of blocks read or written to disk
98794d0e 233before moving to the next disk, which is sometimes referred to as the
2ac7f066
TT
234.I chunk size.
235This mostly affects placement of filesystem metadata like bitmaps at
a4396e9d 236.B mke2fs
98794d0e
BS
237time to avoid placing them on a single disk, which can hurt performance.
238It may also be used by the block allocator.
0c17cb25 239.TP
d4c0d8e5 240.BI stripe_width= stripe-width
0c17cb25
TT
241Configure the filesystem for a RAID array with
242.I stripe-width
98794d0e 243filesystem blocks per stripe. This is typically stride-size * N, where
2ac7f066 244N is the number of data-bearing disks in the RAID (e.g. for RAID 5 there is one
98794d0e 245parity disk, so N will be the number of disks in the array minus 1).
0c17cb25
TT
246This allows the block allocator to prevent read-modify-write of the
247parity in a RAID stripe if possible when the data is written.
c6a44136 248.TP
88ee023b
TT
249.BI offset= offset
250Create the filesystem at an offset from the beginning of the device or
251file. This can be useful when creating disk images for virtual machines.
252.TP
c6a44136
TT
253.BI resize= max-online-resize
254Reserve enough space so that the block group descriptor table can grow
98794d0e
BS
255to support a filesystem that has
256.I max-online-resize
257blocks.
6cb27404 258.TP
3b4a66cf 259.B lazy_itable_init\fR[\fB= \fI<0 to disable, 1 to enable>\fR]
a4396e9d 260If enabled and the uninit_bg feature is enabled, the inode table will
98794d0e 261not be fully initialized by
a4396e9d
TT
262.BR mke2fs .
263This speeds up filesystem
98794d0e 264initialization noticeably, but it requires the kernel to finish
a4396e9d 265initializing the filesystem in the background when the filesystem is
43781b94 266first mounted. If the option value is omitted, it defaults to 1 to
6c54689f
AD
267enable lazy inode table zeroing.
268.TP
269.B lazy_journal_init\fR[\fB= \fI<0 to disable, 1 to enable>\fR]
270If enabled, the journal inode will not be fully zeroed out by
271.BR mke2fs .
272This speeds up filesystem initialization noticeably, but carries some
273small risk if the system crashes before the journal has been overwritten
274entirely one time. If the option value is omitted, it defaults to 1 to
275enable lazy journal inode zeroing.
a4396e9d 276.TP
dc9cc700
AD
277.BI root_owner [=uid:gid]
278Specify the numeric user and group ID of the root directory. If no UID:GID
279is specified, use the user and group ID of the user running \fBmke2fs\fR.
280In \fBmke2fs\fR 1.42 and earlier the UID and GID of the root directory were
281set by default to the UID and GID of the user running the mke2fs command.
282The \fBroot_owner=\fR option allows explicitly specifying these values,
283and avoid side-effects for users that do not expect the contents of the
284filesystem to change based on the user running \fBmke2fs\fR.
285.TP
6cb27404
TT
286.B test_fs
287Set a flag in the filesystem superblock indicating that it may be
288mounted using experimental kernel code, such as the ext4dev filesystem.
0bc85dfb
LC
289.TP
290.BI discard
291Attempt to discard blocks at mkfs time (discarding blocks initially is useful
292on solid state devices and sparse / thin-provisioned storage). When the device
293advertises that discard also zeroes data (any subsequent read after the discard
294and before write returns zero), then mark all not-yet-zeroed inode tables as
295zeroed. This significantly speeds up filesystem initialization. This is set
296as default.
297.TP
298.BI nodiscard
855a77a1 299Do not attempt to discard blocks at mkfs time.
f5589f4c
ES
300@QUOTA_MAN_COMMENT@.TP
301@QUOTA_MAN_COMMENT@.BI quotatype
4727c67d 302@QUOTA_MAN_COMMENT@Specify which quota type ('usr' or 'grp') is to be
3c22bf7e 303@QUOTA_MAN_COMMENT@initialized. This option has effect only if the
f5589f4c 304@QUOTA_MAN_COMMENT@.B quota
4727c67d
UC
305@QUOTA_MAN_COMMENT@feature is set. Without this extended option, the default
306@QUOTA_MAN_COMMENT@behavior is to initialize both user and group quotas.
c6a44136
TT
307.RE
308.TP
caf8ce4c 309.BI \-f " fragment-size"
3839e657
TT
310Specify the size of fragments in bytes.
311.TP
48015ced 312.B \-F
98794d0e 313Force
48015ced 314.B mke2fs
c16e610c
AD
315to create a filesystem, even if the specified device is not a partition
316on a block special device, or if other parameters do not make sense.
98794d0e 317In order to force
c16e610c 318.B mke2fs
98794d0e 319to create a filesystem even if the filesystem appears to be in use
c16e610c
AD
320or is mounted (a truly dangerous thing to do), this option must be
321specified twice.
48015ced 322.TP
5e05541a
TT
323.BI \-g " blocks-per-group"
324Specify the number of blocks in a block group. There is generally no
98794d0e 325reason for the user to ever set this parameter, as the default is optimal
5e05541a
TT
326for the filesystem. (For administrators who are creating
327filesystems on RAID arrays, it is preferable to use the
328.I stride
329RAID parameter as part of the
e28a1bca 330.B \-E
98794d0e 331option rather than manipulating the number of blocks per group.)
5e05541a 332This option is generally used by developers who
98794d0e 333are developing test cases.
0f680ee8
ZL
334.IP
335If the bigalloc feature is enabled, the
336.B \-g
337option will specify the number of clusters in a block group.
5e05541a 338.TP
9ba40002 339.BI \-G " number-of-groups"
98794d0e 340Specify the number of block groups that will be packed together to
7a9f055f
TT
341create a larger virtual block group (or "flex_bg group") in an
342ext4 filesystem. This improves meta-data locality and performance
343on meta-data heavy workloads. The number of groups must be a power
344of 2 and may only be specified if the
345.B flex_bg
346filesystem feature is enabled.
9ba40002 347.TP
caf8ce4c 348.BI \-i " bytes-per-inode"
98794d0e 349Specify the bytes/inode ratio.
3839e657
TT
350.B mke2fs
351creates an inode for every
352.I bytes-per-inode
98794d0e 353bytes of space on the disk. The larger the
caf8ce4c 354.I bytes-per-inode
48015ced 355ratio, the fewer inodes will be created. This value generally shouldn't
98794d0e
BS
356be smaller than the blocksize of the filesystem, since in that case more
357inodes would be made than can ever be used. Be warned that it is not
e2883e27
PS
358possible to change this ratio on a filesystem after it is created, so be
359careful deciding the correct value for this parameter. Note that resizing
360a filesystem changes the numer of inodes to maintain this ratio.
067911ae
AD
361.TP
362.BI \-I " inode-size"
98794d0e 363Specify the size of each inode in bytes.
886056bd 364The
067911ae 365.I inode-size
98794d0e 366value must be a power of 2 larger or equal to 128. The larger the
067911ae
AD
367.I inode-size
368the more space the inode table will consume, and this reduces the usable
98794d0e 369space in the filesystem and can also negatively impact performance.
886056bd
TT
370It is not
371possible to change this value after the filesystem is created.
372.IP
373In kernels after 2.6.10 and some
374earlier vendor kernels it is possible to utilize inodes larger than
375128 bytes to store
376extended attributes for improved performance.
e67670c3 377Extended attributes
067911ae 378stored in large inodes are not visible with older kernels, and such
886056bd
TT
379filesystems will not be mountable with 2.4 kernels at all.
380.IP
381The default inode size is controlled by the
382.BR mke2fs.conf (5)
383file. In the
384.B mke2fs.conf
385file shipped with e2fsprogs, the default inode size is 256 bytes for
386most file systems, except for small file systems where the inode size
387will be 128 bytes.
98794d0e 388.TP
48015ced
TT
389.B \-j
390Create the filesystem with an ext3 journal. If the
dc2ec525 391.B \-J
48015ced 392option is not specified, the default journal parameters will be used to
98794d0e 393create an appropriately sized journal (given the size of the filesystem)
48015ced
TT
394stored within the filesystem. Note that you must be using a kernel
395which has ext3 support in order to actually make use of the journal.
dc2ec525 396.TP
48015ced 397.BI \-J " journal-options"
dc2ec525 398Create the ext3 journal using options specified on the command-line.
8ddaa66b
TT
399Journal options are comma
400separated, and may take an argument using the equals ('=') sign.
48015ced
TT
401The following journal options are supported:
402.RS 1.2i
dc2ec525 403.TP
48015ced 404.BI size= journal-size
f0865ce4 405Create an internal journal (i.e., stored inside the filesystem) of size
98794d0e 406.I journal-size
8d641749 407megabytes.
98794d0e
BS
408The size of the journal must be at least 1024 filesystem blocks
409(i.e., 1MB if using 1k blocks, 4MB if using 4k blocks, etc.)
57cb2716
SP
410and may be no more than 10,240,000 filesystem blocks or half the total
411file system size (whichever is smaller)
48015ced
TT
412@JDEV@.TP
413@JDEV@.BI device= external-journal
8d641749
TT
414@JDEV@Attach the filesystem to the journal block device located on
415@JDEV@.IR external-journal .
416@JDEV@The external
417@JDEV@journal must already have been created using the command
418@JDEV@.IP
2d15576d
AD
419@JDEV@.B mke2fs -O journal_dev
420@JDEV@.I external-journal
8d641749
TT
421@JDEV@.IP
422@JDEV@Note that
423@JDEV@.I external-journal
424@JDEV@must have been created with the
425@JDEV@same block size as the new filesystem.
3024d887
TT
426@JDEV@In addition, while there is support for attaching
427@JDEV@multiple filesystems to a single external journal,
98794d0e 428@JDEV@the Linux kernel and
3024d887
TT
429@JDEV@.BR e2fsck (8)
430@JDEV@do not currently support shared external journals yet.
2d15576d
AD
431@JDEV@.IP
432@JDEV@Instead of specifying a device name directly,
433@JDEV@.I external-journal
434@JDEV@can also be specified by either
435@JDEV@.BI LABEL= label
436@JDEV@or
437@JDEV@.BI UUID= UUID
438@JDEV@to locate the external journal by either the volume label or UUID
439@JDEV@stored in the ext2 superblock at the start of the journal. Use
440@JDEV@.BR dumpe2fs (8)
441@JDEV@to display a journal device's volume label and UUID. See also the
442@JDEV@.B -L
443@JDEV@option of
444@JDEV@.BR tune2fs (8).
8d641749
TT
445.RE
446@JDEV@.IP
48015ced
TT
447@JDEV@Only one of the
448@JDEV@.BR size " or " device
449@JDEV@options can be given for a filesystem.
48015ced
TT
450.TP
451.BI \-l " filename"
452Read the bad blocks list from
98794d0e 453.IR filename .
3ed57c27 454Note that the block numbers in the bad block list must be generated
98794d0e
BS
455using the same block size as used by
456.BR mke2fs .
457As a result, the
3ed57c27 458.B \-c
98794d0e 459option to
3ed57c27
TT
460.B mke2fs
461is a much simpler and less error-prone method of checking a disk for bad
98794d0e 462blocks before formatting it, as
3ed57c27
TT
463.B mke2fs
464will automatically pass the correct parameters to the
465.B badblocks
466program.
48015ced 467.TP
6a7075df
TT
468.BI \-L " new-volume-label"
469Set the volume label for the filesystem to
470.IR new-volume-label .
471The maximum length of the
472volume label is 16 bytes.
48015ced
TT
473.TP
474.BI \-m " reserved-blocks-percentage"
98794d0e 475Specify the percentage of the filesystem blocks reserved for
029de632 476the super-user. This avoids fragmentation, and allows root-owned
98794d0e 477daemons, such as
029de632 478.BR syslogd (8),
98794d0e
BS
479to continue to function correctly after non-privileged processes are
480prevented from writing to the filesystem. The default percentage
029de632 481is 5%.
dc2ec525 482.TP
98794d0e
BS
483.BI \-M " last-mounted-directory"
484Set the last mounted directory for the filesystem. This might be useful
485for the sake of utilities that key off of the last mounted directory to
bcf5aea2 486determine where the filesystem should be mounted.
85ef4ae8 487.TP
caf8ce4c 488.B \-n
98794d0e
BS
489Causes
490.B mke2fs
491to not actually create a filesystem, but display what it
1f22ce34
TT
492would do if it were to create a filesystem. This can be used to
493determine the location of the backup superblocks for a particular
98794d0e
BS
494filesystem, so long as the
495.B mke2fs
496parameters that were passed when the
1f22ce34 497filesystem was originally created are used again. (With the
98794d0e 498.B \-n
1f22ce34 499option added, of course!)
2740156b 500.TP
caf8ce4c 501.BI \-N " number-of-inodes"
98794d0e
BS
502Overrides the default calculation of the number of inodes that should be
503reserved for the filesystem (which is based on the number of blocks and
504the
caf8ce4c 505.I bytes-per-inode
98794d0e 506ratio). This allows the user to specify the number
5515e6b4
TT
507of desired inodes directly.
508.TP
48015ced 509.BI \-o " creator-os"
98794d0e
BS
510Overrides the default value of the "creator operating system" field of the
511filesystem. The creator field is set by default to the name of the OS the
583ccdc3 512.B mke2fs
98794d0e 513executable was compiled for.
1e3472c5 514.TP
8d641749 515.B "\-O \fIfeature\fR[,...]"
98794d0e
BS
516Create a filesystem with the given features (filesystem options),
517overriding the default filesystem options. The features that are
9dc6ad1e
TT
518enabled by default are specified by the
519.I base_features
520relation, either in the
98794d0e 521.I [defaults]
9dc6ad1e
TT
522section in the
523.B /etc/mke2fs.conf
3d43836f 524configuration file,
98794d0e 525or in the
9dc6ad1e 526.I [fs_types]
98794d0e 527subsections for the usage types as specified by the
a26ba650 528.B \-T
3d43836f
TT
529option, further modified by the
530.I features
531relation found in the
98794d0e
BS
532.I [fs_types]
533subsections for the filesystem and usage types. See the
3d43836f
TT
534.BR mke2fs.conf (5)
535manual page for more details.
536The filesystem type-specific configuration setting found in the
9dc6ad1e
TT
537.I [fs_types]
538section will override the global default found in
98794d0e 539.IR [defaults] .
48015ced 540.sp
98794d0e
BS
541The filesystem feature set will be further edited
542using either the feature set specified by this option,
543or if this option is not given, by the
9dc6ad1e 544.I default_features
98794d0e
BS
545relation for the filesystem type being created, or in the
546.I [defaults]
9dc6ad1e
TT
547section of the configuration file.
548.sp
549The filesystem feature set is comprised of a list of features, separated
550by commas, that are to be enabled. To disable a feature, simply
4727c67d 551prefix the feature name with a caret ('^') or a minus ('-') character.
3c22bf7e 552Features with dependencies will not be removed successfully.
4727c67d 553The pseudo-filesystem feature "none" will clear all filesystem features.
4727c67d 554.TP
3c22bf7e
TT
555For more information about the features which can be set, please see
556the manual page
557.BR ext4 (5).
1e3472c5 558.TP
8d641749 559.B \-q
98794d0e 560Quiet execution. Useful if
8d641749
TT
561.B mke2fs
562is run in a script.
563.TP
48015ced 564.BI \-r " revision"
a29f4d30 565Set the filesystem revision for the new filesystem. Note that 1.2
98794d0e 566kernels only support revision 0 filesystems. The default is to
48015ced 567create revision 1 filesystems.
a29f4d30 568.TP
caf8ce4c 569.B \-S
f3db3566
TT
570Write superblock and group descriptors only. This is useful if all of
571the superblock and backup superblocks are corrupted, and a last-ditch
98794d0e 572recovery method is desired. It causes
583ccdc3 573.B mke2fs
98794d0e 574to reinitialize the
f3db3566
TT
575superblock and group descriptors, while not touching the inode table
576and the block and inode bitmaps. The
577.B e2fsck
578program should be run immediately after this option is used, and there
48015ced
TT
579is no guarantee that any data will be salvageable. It is critical to
580specify the correct filesystem blocksize when using this option,
581or there is no chance of recovery.
8d641749
TT
582.\" .TP
583.\" .BI \-t " test"
584.\" Check the device for bad blocks before creating the file system
585.\" using the specified test.
818180cd 586.TP
3d43836f 587.BI \-t " fs-type"
4727c67d
UC
588Specify the filesystem type (i.e., ext2, ext3, ext4, etc.) that is
589to be created.
98794d0e
BS
590If this option is not specified,
591.B mke2fs
592will pick a default either via how
593the command was run (for example, using a name of the form mkfs.ext2,
3d43836f 594mkfs.ext3, etc.) or via a default as defined by the
626a2e74 595.B /etc/mke2fs.conf
08c8b1ab
TT
596file. This option controls which filesystem options are used by
597default, based on the
598.B fstypes
599configuration stanza in
626a2e74 600.BR /etc/mke2fs.conf .
08c8b1ab
TT
601.sp
602If the
603.B \-O
604option is used to explicitly add or remove filesystem options that
605should be set in the newly created filesystem, the
606resulting filesystem may not be supported by the requested
607.IR fs-type .
b7150807 608(e.g., "\fBmke2fs \-t ext3 \-O extent /dev/sdXX\fR" will create a
08c8b1ab 609filesystem that is not supported by the ext3 implementation as found in
93aa0246 610the Linux kernel; and "\fBmke2fs \-t ext3 \-O ^has_journal /dev/hdXX\fR"
08c8b1ab
TT
611will create a filesystem that does not have a journal and hence will not
612be supported by the ext3 filesystem code in the Linux kernel.)
3d43836f
TT
613.TP
614.BI \-T " usage-type[,...]"
98794d0e
BS
615Specify how the filesystem is going to be used, so that
616.B mke2fs
3d43836f
TT
617can choose optimal filesystem parameters for that use. The usage
618types that are supported are defined in the configuration file
626a2e74 619.BR /etc/mke2fs.conf .
3d43836f
TT
620The user may specify one or more usage types
621using a comma separated list.
622.sp
623If this option is is not specified,
624.B mke2fs
625will pick a single default usage type based on the size of the filesystem to
626be created. If the filesystem size is less than or equal to 3 megabytes,
a4396e9d 627.B mke2fs
3d43836f
TT
628will use the filesystem type
629.IR floppy .
630If the filesystem size is greater than 3 but less than or equal to
631512 megabytes,
632.BR mke2fs (8)
9a2767ff 633will use the filesystem type
3d43836f 634.IR small .
9a2767ff
NK
635If the filesystem size is greater than or equal to 4 terabytes but less than
63616 terabytes,
637.BR mke2fs (8)
638will use the filesystem type
639.IR big .
640If the filesystem size is greater than or equal to 16 terabytes,
641.BR mke2fs (8)
642will use the filesystem type
643.IR huge .
3d43836f
TT
644Otherwise,
645.BR mke2fs (8)
646will use the default filesystem type
647.IR default .
48015ced 648.TP
b0afdda1
TT
649.BI \-U " UUID"
650Create the filesystem with the specified UUID.
651.TP
48015ced
TT
652.B \-v
653Verbose execution.
50787ea2 654.TP
caf8ce4c 655.B \-V
98794d0e 656Print the version number of
818180cd
TT
657.B mke2fs
658and exit.
5182ad4c
NK
659.SH ENVIRONMENT
660.TP
661.BI MKE2FS_SYNC
662If set to non-zero integer value, its value is used to determine how often
663.BR sync (2)
664is called during inode table initialization.
665.TP
666.BI MKE2FS_CONFIG
667Determines the location of the configuration file (see
668.BR mke2fs.conf (5)).
669.TP
670.BI MKE2FS_FIRST_META_BG
671If set to non-zero integer value, its value is used to determine first meta
672block group. This is mostly for debugging purposes.
673.TP
674.BI MKE2FS_DEVICE_SECTSIZE
675If set to non-zero integer value, its value is used to determine physical
676sector size of the
677.IR device .
678.TP
679.BI MKE2FS_SKIP_CHECK_MSG
680If set, do not show the message of filesystem automatic check caused by
681mount count or check interval.
3839e657
TT
682.SH AUTHOR
683This version of
684.B mke2fs
a418d3ad 685has been written by Theodore Ts'o <tytso@mit.edu>.
3839e657
TT
686.SH BUGS
687.B mke2fs
caf8ce4c
TT
688accepts the
689.B \-f
690option but currently ignores it because the second
3839e657
TT
691extended file system does not support fragments yet.
692.br
48015ced 693There may be other ones. Please, report them to the author.
3839e657
TT
694.SH AVAILABILITY
695.B mke2fs
98794d0e 696is part of the e2fsprogs package and is available from
348e43dc 697http://e2fsprogs.sourceforge.net.
3839e657 698.SH SEE ALSO
9dc6ad1e 699.BR mke2fs.conf (5),
e72a9ba3 700.BR badblocks (8),
3839e657
TT
701.BR dumpe2fs (8),
702.BR e2fsck (8),
3c22bf7e
TT
703.BR tune2fs (8),
704.BR ext4 (5)