1997-04-26 17:21:57 +04:00
|
|
|
.\" -*- nroff -*-
|
1997-04-26 18:00:26 +04:00
|
|
|
.\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved.
|
|
|
|
.\" This file may be copied under the terms of the GNU Public License.
|
2008-07-31 02:06:36 +04:00
|
|
|
.\"
|
1997-04-26 18:37:06 +04:00
|
|
|
.TH MKE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
|
1997-04-26 17:21:57 +04:00
|
|
|
.SH NAME
|
2009-05-30 20:34:28 +04:00
|
|
|
mke2fs \- create an ext2/ext3/ext4 filesystem
|
1997-04-26 17:21:57 +04:00
|
|
|
.SH SYNOPSIS
|
|
|
|
.B mke2fs
|
|
|
|
[
|
|
|
|
.B \-c
|
2008-07-31 02:06:36 +04:00
|
|
|
|
|
1997-04-26 17:21:57 +04:00
|
|
|
.B \-l
|
1997-04-29 18:53:37 +04:00
|
|
|
.I filename
|
1997-04-26 17:21:57 +04:00
|
|
|
]
|
|
|
|
[
|
|
|
|
.B \-b
|
1997-04-29 18:53:37 +04:00
|
|
|
.I block-size
|
1997-04-26 17:21:57 +04:00
|
|
|
]
|
|
|
|
[
|
2012-03-23 00:00:49 +04:00
|
|
|
.B \-D
|
|
|
|
]
|
|
|
|
[
|
1997-04-26 17:21:57 +04:00
|
|
|
.B \-f
|
1997-04-29 18:53:37 +04:00
|
|
|
.I fragment-size
|
1997-04-26 17:21:57 +04:00
|
|
|
]
|
|
|
|
[
|
2003-04-11 22:00:53 +04:00
|
|
|
.B \-g
|
|
|
|
.I blocks-per-group
|
|
|
|
]
|
|
|
|
[
|
2008-04-22 16:27:01 +04:00
|
|
|
.B \-G
|
|
|
|
.I number-of-groups
|
|
|
|
]
|
|
|
|
[
|
1997-04-26 17:21:57 +04:00
|
|
|
.B \-i
|
1997-04-29 18:53:37 +04:00
|
|
|
.I bytes-per-inode
|
1997-04-26 17:21:57 +04:00
|
|
|
]
|
|
|
|
[
|
2006-07-16 06:08:20 +04:00
|
|
|
.B \-I
|
|
|
|
.I inode-size
|
|
|
|
]
|
|
|
|
[
|
2000-10-24 23:33:45 +04:00
|
|
|
.B \-j
|
ChangeLog, mke2fs.8.in, mke2fs.c, tune2fs.8.in, tune2fs.c:
tune2fs.c, mke2fs.c, tune2fs.8.in, mke2fs.8.in: Change user interface
so that -J is used to specify journal options, and -j is used to
request creation of a journal using default values. (This is a UI
change, but we haven't done a formal release, and it makes things much
more consistent with the rest of the options out there.)
tune2fs.c: Add support for removing a filesystem from an external
journal; we correctly remove the filesystem UUID from the external
journal's filesystem list.
2001-01-18 04:51:15 +03:00
|
|
|
]
|
|
|
|
[
|
|
|
|
.B \-J
|
2000-11-17 07:55:24 +03:00
|
|
|
.I journal-options
|
2000-10-24 23:33:45 +04:00
|
|
|
]
|
|
|
|
[
|
1999-01-05 10:25:06 +03:00
|
|
|
.B \-N
|
|
|
|
.I number-of-inodes
|
|
|
|
]
|
|
|
|
[
|
2014-03-06 20:00:25 +04:00
|
|
|
.B \-d
|
|
|
|
.I root-directory
|
|
|
|
]
|
|
|
|
[
|
2008-08-24 09:04:43 +04:00
|
|
|
.B \-n
|
1999-09-15 00:11:19 +04:00
|
|
|
]
|
|
|
|
[
|
1997-04-26 17:21:57 +04:00
|
|
|
.B \-m
|
1997-04-29 18:53:37 +04:00
|
|
|
.I reserved-blocks-percentage
|
|
|
|
]
|
|
|
|
[
|
|
|
|
.B \-o
|
|
|
|
.I creator-os
|
1997-04-26 17:21:57 +04:00
|
|
|
]
|
|
|
|
[
|
2008-07-31 02:06:36 +04:00
|
|
|
.B \-O
|
2014-01-01 07:53:52 +04:00
|
|
|
[^]\fIfeature\fR[,...]
|
1999-10-23 05:04:50 +04:00
|
|
|
]
|
|
|
|
[
|
1997-04-26 17:34:30 +04:00
|
|
|
.B \-q
|
|
|
|
]
|
|
|
|
[
|
Many files:
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
1999-10-21 23:56:34 +04:00
|
|
|
.B \-r
|
|
|
|
.I fs-revision-level
|
1997-04-30 01:26:48 +04:00
|
|
|
]
|
|
|
|
[
|
2005-01-05 19:12:20 +03:00
|
|
|
.B \-E
|
|
|
|
.I extended-options
|
1997-04-29 21:48:10 +04:00
|
|
|
]
|
|
|
|
[
|
1997-04-26 17:21:57 +04:00
|
|
|
.B \-v
|
|
|
|
]
|
1997-04-26 17:34:30 +04:00
|
|
|
[
|
1997-04-26 18:37:06 +04:00
|
|
|
.B \-F
|
|
|
|
]
|
|
|
|
[
|
1997-04-29 18:53:37 +04:00
|
|
|
.B \-L
|
|
|
|
.I volume-label
|
|
|
|
]
|
|
|
|
[
|
|
|
|
.B \-M
|
|
|
|
.I last-mounted-directory
|
|
|
|
]
|
|
|
|
[
|
1997-04-26 17:34:30 +04:00
|
|
|
.B \-S
|
|
|
|
]
|
ChangeLog, debugfs.8.in, debugfs.c:
Add a -V option which displays the current version.
ChangeLog, unix.c:
unix.c (e2fsck_update_progress): Remove unused variables.
ChangeLog, inode.c:
inode.c (get_next_blockgroup): Fix bug where if get_next_blockgroup()
is called early because of a missing inode table in a block group, the
current_inode counter wasn't incremented correctly.
ChangeLog, tst_uuid.c:
tst_uuid.c (main): Fixed bogus declaration of the main's argv parameter.
ChangeLog, test_icount.c:
test_icount.c (main): Fix main() declaration so that it returns int,
not void.
Many files:
fsck.c (ignore): Remove unused variable cp.
chattr.c (fatal_error):
tune2fs.c (usage):
lsattr.c (usage):
dumpe2fs.c (usage):
badblocks.c (usage): Remove volatile from declaration.
fsck.c: Change use of strdup to be string_copy, since we don't trust
what glibc is doing with strdup. (Whatever it is, it isn't pretty.)
1998-06-27 09:11:14 +04:00
|
|
|
[
|
2008-02-19 16:32:58 +03:00
|
|
|
.B \-t
|
|
|
|
.I fs-type
|
|
|
|
]
|
|
|
|
[
|
1999-07-19 19:30:21 +04:00
|
|
|
.B \-T
|
2008-02-19 16:32:58 +03:00
|
|
|
.I usage-type
|
1999-07-19 19:30:21 +04:00
|
|
|
]
|
|
|
|
[
|
2009-01-20 21:18:23 +03:00
|
|
|
.B \-U
|
|
|
|
.I UUID
|
|
|
|
]
|
|
|
|
[
|
ChangeLog, debugfs.8.in, debugfs.c:
Add a -V option which displays the current version.
ChangeLog, unix.c:
unix.c (e2fsck_update_progress): Remove unused variables.
ChangeLog, inode.c:
inode.c (get_next_blockgroup): Fix bug where if get_next_blockgroup()
is called early because of a missing inode table in a block group, the
current_inode counter wasn't incremented correctly.
ChangeLog, tst_uuid.c:
tst_uuid.c (main): Fixed bogus declaration of the main's argv parameter.
ChangeLog, test_icount.c:
test_icount.c (main): Fix main() declaration so that it returns int,
not void.
Many files:
fsck.c (ignore): Remove unused variable cp.
chattr.c (fatal_error):
tune2fs.c (usage):
lsattr.c (usage):
dumpe2fs.c (usage):
badblocks.c (usage): Remove volatile from declaration.
fsck.c: Change use of strdup to be string_copy, since we don't trust
what glibc is doing with strdup. (Whatever it is, it isn't pretty.)
1998-06-27 09:11:14 +04:00
|
|
|
.B \-V
|
|
|
|
]
|
2014-07-25 16:58:29 +04:00
|
|
|
[
|
|
|
|
.B \-e
|
|
|
|
.I errors-behavior
|
|
|
|
]
|
1997-04-29 18:53:37 +04:00
|
|
|
.I device
|
1997-04-26 17:21:57 +04:00
|
|
|
[
|
2014-08-25 07:53:33 +04:00
|
|
|
.I fs-size
|
1997-04-26 17:21:57 +04:00
|
|
|
]
|
2001-04-22 07:58:32 +04:00
|
|
|
@JDEV@.sp
|
2001-05-14 08:12:27 +04:00
|
|
|
@JDEV@.B "mke2fs \-O journal_dev"
|
2001-04-22 07:58:32 +04:00
|
|
|
@JDEV@[
|
|
|
|
@JDEV@.B \-b
|
|
|
|
@JDEV@.I block-size
|
|
|
|
@JDEV@]
|
2001-05-14 08:12:27 +04:00
|
|
|
.\" No external-journal specific journal options yet (size is ignored)
|
2001-04-22 07:58:32 +04:00
|
|
|
.\" @JDEV@[
|
|
|
|
.\" @JDEV@.B \-J
|
|
|
|
.\" @JDEV@.I journal-options
|
|
|
|
.\" @JDEV@]
|
|
|
|
@JDEV@[
|
|
|
|
@JDEV@.B \-L
|
|
|
|
@JDEV@.I volume-label
|
|
|
|
@JDEV@]
|
|
|
|
@JDEV@[
|
|
|
|
@JDEV@.B \-n
|
|
|
|
@JDEV@]
|
|
|
|
@JDEV@[
|
|
|
|
@JDEV@.B \-q
|
|
|
|
@JDEV@]
|
|
|
|
@JDEV@[
|
|
|
|
@JDEV@.B \-v
|
|
|
|
@JDEV@]
|
2001-05-14 08:12:27 +04:00
|
|
|
@JDEV@.I external-journal
|
2001-08-17 13:48:11 +04:00
|
|
|
@JDEV@[
|
2014-08-25 07:53:33 +04:00
|
|
|
@JDEV@.I fs-size
|
2001-08-17 13:48:11 +04:00
|
|
|
@JDEV@]
|
1997-04-26 17:21:57 +04:00
|
|
|
.SH DESCRIPTION
|
|
|
|
.B mke2fs
|
2009-05-30 20:34:28 +04:00
|
|
|
is used to create an ext2, ext3, or ext4 filesystem, usually in a disk
|
2014-08-25 07:53:33 +04:00
|
|
|
partition (or file) named by
|
|
|
|
.IR device .
|
|
|
|
.PP
|
|
|
|
The file system size is specified by
|
|
|
|
.IR fs-size .
|
|
|
|
If
|
|
|
|
.I fs-size
|
|
|
|
does not have a suffix, it is interpreted as power-of-two kilobytes,
|
|
|
|
unless the
|
|
|
|
.B \-b
|
|
|
|
.I blocksize
|
|
|
|
option is specified, in which case
|
|
|
|
.I fs-size
|
|
|
|
is interpreted as the number of
|
|
|
|
.I blocksize
|
|
|
|
blocks. If the fs-size is suffixed by 'k', 'm', 'g', 't'
|
|
|
|
(either upper-case or lower-case), then it is interpreted in
|
|
|
|
power-of-two kilobytes, megabytes, gigabytes, terabytes, etc.
|
|
|
|
If
|
|
|
|
.I fs-size
|
|
|
|
is omitted,
|
1997-04-26 17:21:57 +04:00
|
|
|
.B mke2fs
|
2014-08-25 07:53:33 +04:00
|
|
|
will create the file system based on the device size.
|
|
|
|
.PP
|
|
|
|
If
|
|
|
|
.B mke2fs
|
|
|
|
is run as
|
|
|
|
.B mkfs.XXX
|
|
|
|
(i.e.,
|
|
|
|
.BR mkfs.ext2 ,
|
|
|
|
.BR mkfs.ext3 ,
|
|
|
|
or
|
|
|
|
.BR mkfs.ext4 )
|
|
|
|
the option
|
|
|
|
.B \-t
|
|
|
|
.I XXX
|
|
|
|
is implied; so
|
2002-02-26 09:11:26 +03:00
|
|
|
.B mkfs.ext3
|
2014-08-25 07:53:33 +04:00
|
|
|
will create a file system for use with ext3,
|
|
|
|
.B mkfs.ext4
|
|
|
|
will create a file system for use with ext4, and so on.
|
2009-04-23 06:36:36 +04:00
|
|
|
.PP
|
|
|
|
The defaults of the parameters for the newly created filesystem, if not
|
|
|
|
overridden by the options listed below, are controlled by the
|
|
|
|
.B /etc/mke2fs.conf
|
|
|
|
configuration file. See the
|
|
|
|
.BR mke2fs.conf (5)
|
|
|
|
manual page for more details.
|
1997-04-26 17:21:57 +04:00
|
|
|
.SH OPTIONS
|
|
|
|
.TP
|
Many files:
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
1999-10-21 23:56:34 +04:00
|
|
|
.BI \-b " block-size"
|
2008-07-31 02:06:36 +04:00
|
|
|
Specify the size of blocks in bytes. Valid block-size values are 1024,
|
1999-10-23 07:17:10 +04:00
|
|
|
2048 and 4096 bytes per block. If omitted,
|
2008-07-31 02:06:36 +04:00
|
|
|
block-size is heuristically determined by the filesystem size and
|
2003-04-12 06:10:50 +04:00
|
|
|
the expected usage of the filesystem (see the
|
1999-10-23 07:17:10 +04:00
|
|
|
.B \-T
|
2008-07-31 02:06:36 +04:00
|
|
|
option). If
|
2003-04-12 06:10:50 +04:00
|
|
|
.I block-size
|
2010-07-29 20:59:42 +04:00
|
|
|
is preceded by a negative sign ('-'), then
|
2005-01-05 19:12:20 +03:00
|
|
|
.B mke2fs
|
|
|
|
will use heuristics to determine the
|
2003-04-12 06:10:50 +04:00
|
|
|
appropriate block size, with the constraint that the block size will be
|
2008-07-31 02:06:36 +04:00
|
|
|
at least
|
2003-04-12 06:10:50 +04:00
|
|
|
.I block-size
|
|
|
|
bytes. This is useful for certain hardware devices which require that
|
|
|
|
the blocksize be a multiple of 2k.
|
1997-04-26 17:21:57 +04:00
|
|
|
.TP
|
Many files:
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
1999-10-21 23:56:34 +04:00
|
|
|
.B \-c
|
2001-12-24 23:01:59 +03:00
|
|
|
Check the device for bad blocks before creating the file system. If
|
2008-07-31 02:06:36 +04:00
|
|
|
this option is specified twice, then a slower read-write
|
2001-12-24 23:01:59 +03:00
|
|
|
test is used instead of a fast read-only test.
|
1997-04-26 17:21:57 +04:00
|
|
|
.TP
|
2013-01-13 13:08:15 +04:00
|
|
|
.B \-C " cluster-size"
|
|
|
|
Specify the size of cluster in bytes for filesystems using the bigalloc
|
|
|
|
feature. Valid cluster-size values are from 2048 to 256M bytes per
|
2013-12-29 02:50:54 +04:00
|
|
|
cluster. This can only be specified if the bigalloc feature is
|
|
|
|
enabled. (See the
|
|
|
|
.B ext4 (5)
|
|
|
|
man page for more details about bigalloc.) The default cluster size if
|
|
|
|
bigalloc is enabled is 16 times the block size.
|
2013-01-13 13:08:15 +04:00
|
|
|
.TP
|
2012-03-23 00:00:49 +04:00
|
|
|
.B \-D
|
|
|
|
Use direct I/O when writing to the disk. This avoids mke2fs dirtying a
|
|
|
|
lot of buffer cache memory, which may impact other applications running
|
|
|
|
on a busy server. This option will cause mke2fs to run much more
|
|
|
|
slowly, however, so there is a tradeoff to using direct I/O.
|
|
|
|
.TP
|
2014-07-25 16:58:29 +04:00
|
|
|
.BI \-e " error-behavior"
|
|
|
|
Change the behavior of the kernel code when errors are detected.
|
|
|
|
In all cases, a filesystem error will cause
|
|
|
|
.BR e2fsck (8)
|
|
|
|
to check the filesystem on the next boot.
|
|
|
|
.I error-behavior
|
|
|
|
can be one of the following:
|
|
|
|
.RS 1.2i
|
|
|
|
.TP 1.2i
|
|
|
|
.B continue
|
|
|
|
Continue normal execution.
|
|
|
|
.TP
|
|
|
|
.B remount-ro
|
|
|
|
Remount filesystem read-only.
|
|
|
|
.TP
|
|
|
|
.B panic
|
|
|
|
Cause a kernel panic.
|
|
|
|
.RE
|
|
|
|
.TP
|
2005-01-05 19:12:20 +03:00
|
|
|
.BI \-E " extended-options"
|
|
|
|
Set extended options for the filesystem. Extended options are comma
|
|
|
|
separated, and may take an argument using the equals ('=') sign. The
|
2008-08-24 09:04:43 +04:00
|
|
|
.B \-E
|
2008-07-31 02:06:36 +04:00
|
|
|
option used to be
|
2008-08-24 09:04:43 +04:00
|
|
|
.B \-R
|
2008-07-31 02:06:36 +04:00
|
|
|
in earlier versions of
|
2005-01-05 19:12:20 +03:00
|
|
|
.BR mke2fs .
|
2008-07-31 02:06:36 +04:00
|
|
|
The
|
2008-08-24 09:04:43 +04:00
|
|
|
.B \-R
|
2013-12-24 01:09:49 +04:00
|
|
|
option is still accepted for backwards compatibility, but is deprecated.
|
|
|
|
The following extended options are supported:
|
2005-01-05 19:12:20 +03:00
|
|
|
.RS 1.2i
|
|
|
|
.TP
|
2011-09-24 21:48:55 +04:00
|
|
|
.BI mmp_update_interval= interval
|
|
|
|
Adjust the initial MMP update interval to
|
|
|
|
.I interval
|
|
|
|
seconds. Specifying an
|
|
|
|
.I interval
|
|
|
|
of 0 means to use the default interval. The specified interval must
|
|
|
|
be less than 300 seconds. Requires that the
|
|
|
|
.B mmp
|
|
|
|
feature be enabled.
|
|
|
|
.TP
|
2008-02-19 06:56:25 +03:00
|
|
|
.BI stride= stride-size
|
2005-01-05 19:12:20 +03:00
|
|
|
Configure the filesystem for a RAID array with
|
2008-02-19 06:56:25 +03:00
|
|
|
.I stride-size
|
|
|
|
filesystem blocks. This is the number of blocks read or written to disk
|
2008-07-31 02:06:36 +04:00
|
|
|
before moving to the next disk, which is sometimes referred to as the
|
2008-07-10 17:40:48 +04:00
|
|
|
.I chunk size.
|
|
|
|
This mostly affects placement of filesystem metadata like bitmaps at
|
2008-04-18 18:19:27 +04:00
|
|
|
.B mke2fs
|
2008-07-31 02:06:36 +04:00
|
|
|
time to avoid placing them on a single disk, which can hurt performance.
|
|
|
|
It may also be used by the block allocator.
|
2008-02-19 06:56:25 +03:00
|
|
|
.TP
|
2011-07-18 07:13:47 +04:00
|
|
|
.BI stripe_width= stripe-width
|
2008-02-19 06:56:25 +03:00
|
|
|
Configure the filesystem for a RAID array with
|
|
|
|
.I stripe-width
|
2008-07-31 02:06:36 +04:00
|
|
|
filesystem blocks per stripe. This is typically stride-size * N, where
|
2008-07-10 17:40:48 +04:00
|
|
|
N is the number of data-bearing disks in the RAID (e.g. for RAID 5 there is one
|
2008-07-31 02:06:36 +04:00
|
|
|
parity disk, so N will be the number of disks in the array minus 1).
|
2008-02-19 06:56:25 +03:00
|
|
|
This allows the block allocator to prevent read-modify-write of the
|
|
|
|
parity in a RAID stripe if possible when the data is written.
|
2005-01-05 19:12:20 +03:00
|
|
|
.TP
|
2013-12-31 08:03:09 +04:00
|
|
|
.BI offset= offset
|
|
|
|
Create the filesystem at an offset from the beginning of the device or
|
|
|
|
file. This can be useful when creating disk images for virtual machines.
|
|
|
|
.TP
|
2005-01-05 19:12:20 +03:00
|
|
|
.BI resize= max-online-resize
|
|
|
|
Reserve enough space so that the block group descriptor table can grow
|
2008-07-31 02:06:36 +04:00
|
|
|
to support a filesystem that has
|
|
|
|
.I max-online-resize
|
|
|
|
blocks.
|
2008-01-27 03:06:35 +03:00
|
|
|
.TP
|
2008-09-03 05:23:35 +04:00
|
|
|
.B lazy_itable_init\fR[\fB= \fI<0 to disable, 1 to enable>\fR]
|
2008-04-18 18:19:27 +04:00
|
|
|
If enabled and the uninit_bg feature is enabled, the inode table will
|
2008-07-31 02:06:36 +04:00
|
|
|
not be fully initialized by
|
2008-04-18 18:19:27 +04:00
|
|
|
.BR mke2fs .
|
|
|
|
This speeds up filesystem
|
2008-07-31 02:06:36 +04:00
|
|
|
initialization noticeably, but it requires the kernel to finish
|
2008-04-18 18:19:27 +04:00
|
|
|
initializing the filesystem in the background when the filesystem is
|
2008-04-28 03:38:02 +04:00
|
|
|
first mounted. If the option value is omitted, it defaults to 1 to
|
2011-06-11 20:17:29 +04:00
|
|
|
enable lazy inode table zeroing.
|
|
|
|
.TP
|
|
|
|
.B lazy_journal_init\fR[\fB= \fI<0 to disable, 1 to enable>\fR]
|
|
|
|
If enabled, the journal inode will not be fully zeroed out by
|
|
|
|
.BR mke2fs .
|
|
|
|
This speeds up filesystem initialization noticeably, but carries some
|
|
|
|
small risk if the system crashes before the journal has been overwritten
|
|
|
|
entirely one time. If the option value is omitted, it defaults to 1 to
|
|
|
|
enable lazy journal inode zeroing.
|
2008-04-18 18:19:27 +04:00
|
|
|
.TP
|
2014-01-12 07:11:42 +04:00
|
|
|
.BI num_backup_sb= <0|1|2>
|
|
|
|
If the
|
|
|
|
.B sparse_super2
|
|
|
|
file system feature is enabled this option controls whether there will
|
|
|
|
be 0, 1, or 2 backup superblocks created in the file system.
|
|
|
|
.TP
|
2014-01-28 23:44:23 +04:00
|
|
|
.B packed_meta_blocks\fR[\fB= \fI<0 to disable, 1 to enable>\fR]
|
|
|
|
Place the allocation bitmaps and the inode table at the beginning of the
|
|
|
|
disk. This option requires that the flex_bg file system feature to be
|
|
|
|
enabled in order for it to have effect, and will also create the journal
|
|
|
|
at the beginning of the file system. This option is useful for flash
|
|
|
|
devices that use SLC flash at the beginning of the disk.
|
|
|
|
It also maximizes the range of contiguous data blocks, which
|
|
|
|
can be useful for certain specialized use cases, such as supported
|
|
|
|
Shingled Drives.
|
|
|
|
.TP
|
2013-06-16 05:45:37 +04:00
|
|
|
.BI root_owner [=uid:gid]
|
|
|
|
Specify the numeric user and group ID of the root directory. If no UID:GID
|
|
|
|
is specified, use the user and group ID of the user running \fBmke2fs\fR.
|
|
|
|
In \fBmke2fs\fR 1.42 and earlier the UID and GID of the root directory were
|
|
|
|
set by default to the UID and GID of the user running the mke2fs command.
|
|
|
|
The \fBroot_owner=\fR option allows explicitly specifying these values,
|
|
|
|
and avoid side-effects for users that do not expect the contents of the
|
|
|
|
filesystem to change based on the user running \fBmke2fs\fR.
|
|
|
|
.TP
|
2008-01-27 03:06:35 +03:00
|
|
|
.B test_fs
|
|
|
|
Set a flag in the filesystem superblock indicating that it may be
|
|
|
|
mounted using experimental kernel code, such as the ext4dev filesystem.
|
2010-11-18 16:38:39 +03:00
|
|
|
.TP
|
|
|
|
.BI discard
|
|
|
|
Attempt to discard blocks at mkfs time (discarding blocks initially is useful
|
|
|
|
on solid state devices and sparse / thin-provisioned storage). When the device
|
|
|
|
advertises that discard also zeroes data (any subsequent read after the discard
|
|
|
|
and before write returns zero), then mark all not-yet-zeroed inode tables as
|
|
|
|
zeroed. This significantly speeds up filesystem initialization. This is set
|
|
|
|
as default.
|
|
|
|
.TP
|
|
|
|
.BI nodiscard
|
2011-02-01 19:56:41 +03:00
|
|
|
Do not attempt to discard blocks at mkfs time.
|
2013-10-14 16:54:15 +04:00
|
|
|
@QUOTA_MAN_COMMENT@.TP
|
|
|
|
@QUOTA_MAN_COMMENT@.BI quotatype
|
2013-12-16 09:53:35 +04:00
|
|
|
@QUOTA_MAN_COMMENT@Specify which quota type ('usr' or 'grp') is to be
|
2013-12-25 00:15:31 +04:00
|
|
|
@QUOTA_MAN_COMMENT@initialized. This option has effect only if the
|
2013-10-14 16:54:15 +04:00
|
|
|
@QUOTA_MAN_COMMENT@.B quota
|
2013-12-16 09:53:35 +04:00
|
|
|
@QUOTA_MAN_COMMENT@feature is set. Without this extended option, the default
|
|
|
|
@QUOTA_MAN_COMMENT@behavior is to initialize both user and group quotas.
|
2005-01-05 19:12:20 +03:00
|
|
|
.RE
|
|
|
|
.TP
|
Many files:
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
1999-10-21 23:56:34 +04:00
|
|
|
.BI \-f " fragment-size"
|
1997-04-26 17:21:57 +04:00
|
|
|
Specify the size of fragments in bytes.
|
|
|
|
.TP
|
2001-04-22 07:58:32 +04:00
|
|
|
.B \-F
|
2008-07-31 02:06:36 +04:00
|
|
|
Force
|
2001-04-22 07:58:32 +04:00
|
|
|
.B mke2fs
|
2006-08-06 03:05:53 +04:00
|
|
|
to create a filesystem, even if the specified device is not a partition
|
|
|
|
on a block special device, or if other parameters do not make sense.
|
2008-07-31 02:06:36 +04:00
|
|
|
In order to force
|
2006-08-06 03:05:53 +04:00
|
|
|
.B mke2fs
|
2008-07-31 02:06:36 +04:00
|
|
|
to create a filesystem even if the filesystem appears to be in use
|
2006-08-06 03:05:53 +04:00
|
|
|
or is mounted (a truly dangerous thing to do), this option must be
|
|
|
|
specified twice.
|
2001-04-22 07:58:32 +04:00
|
|
|
.TP
|
2003-04-11 22:00:53 +04:00
|
|
|
.BI \-g " blocks-per-group"
|
|
|
|
Specify the number of blocks in a block group. There is generally no
|
2008-07-31 02:06:36 +04:00
|
|
|
reason for the user to ever set this parameter, as the default is optimal
|
2003-04-11 22:00:53 +04:00
|
|
|
for the filesystem. (For administrators who are creating
|
|
|
|
filesystems on RAID arrays, it is preferable to use the
|
|
|
|
.I stride
|
|
|
|
RAID parameter as part of the
|
2008-03-30 22:02:00 +04:00
|
|
|
.B \-E
|
2008-07-31 02:06:36 +04:00
|
|
|
option rather than manipulating the number of blocks per group.)
|
2003-04-11 22:00:53 +04:00
|
|
|
This option is generally used by developers who
|
2008-07-31 02:06:36 +04:00
|
|
|
are developing test cases.
|
2013-01-13 13:08:15 +04:00
|
|
|
.IP
|
|
|
|
If the bigalloc feature is enabled, the
|
|
|
|
.B \-g
|
|
|
|
option will specify the number of clusters in a block group.
|
2003-04-11 22:00:53 +04:00
|
|
|
.TP
|
2008-04-22 16:27:01 +04:00
|
|
|
.BI \-G " number-of-groups"
|
2008-07-31 02:06:36 +04:00
|
|
|
Specify the number of block groups that will be packed together to
|
2009-09-07 23:17:51 +04:00
|
|
|
create a larger virtual block group (or "flex_bg group") in an
|
|
|
|
ext4 filesystem. This improves meta-data locality and performance
|
|
|
|
on meta-data heavy workloads. The number of groups must be a power
|
|
|
|
of 2 and may only be specified if the
|
|
|
|
.B flex_bg
|
|
|
|
filesystem feature is enabled.
|
2008-04-22 16:27:01 +04:00
|
|
|
.TP
|
Many files:
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
1999-10-21 23:56:34 +04:00
|
|
|
.BI \-i " bytes-per-inode"
|
2008-07-31 02:06:36 +04:00
|
|
|
Specify the bytes/inode ratio.
|
1997-04-26 17:21:57 +04:00
|
|
|
.B mke2fs
|
|
|
|
creates an inode for every
|
|
|
|
.I bytes-per-inode
|
2008-07-31 02:06:36 +04:00
|
|
|
bytes of space on the disk. The larger the
|
Many files:
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
1999-10-21 23:56:34 +04:00
|
|
|
.I bytes-per-inode
|
2001-04-22 07:58:32 +04:00
|
|
|
ratio, the fewer inodes will be created. This value generally shouldn't
|
2008-07-31 02:06:36 +04:00
|
|
|
be smaller than the blocksize of the filesystem, since in that case more
|
|
|
|
inodes would be made than can ever be used. Be warned that it is not
|
2013-10-16 07:37:51 +04:00
|
|
|
possible to change this ratio on a filesystem after it is created, so be
|
|
|
|
careful deciding the correct value for this parameter. Note that resizing
|
|
|
|
a filesystem changes the numer of inodes to maintain this ratio.
|
2006-07-16 06:08:20 +04:00
|
|
|
.TP
|
|
|
|
.BI \-I " inode-size"
|
2008-07-31 02:06:36 +04:00
|
|
|
Specify the size of each inode in bytes.
|
2013-12-29 02:06:38 +04:00
|
|
|
The
|
2006-07-16 06:08:20 +04:00
|
|
|
.I inode-size
|
2008-07-31 02:06:36 +04:00
|
|
|
value must be a power of 2 larger or equal to 128. The larger the
|
2006-07-16 06:08:20 +04:00
|
|
|
.I inode-size
|
|
|
|
the more space the inode table will consume, and this reduces the usable
|
2008-07-31 02:06:36 +04:00
|
|
|
space in the filesystem and can also negatively impact performance.
|
2013-12-29 02:06:38 +04:00
|
|
|
It is not
|
|
|
|
possible to change this value after the filesystem is created.
|
|
|
|
.IP
|
|
|
|
In kernels after 2.6.10 and some
|
|
|
|
earlier vendor kernels it is possible to utilize inodes larger than
|
|
|
|
128 bytes to store
|
|
|
|
extended attributes for improved performance.
|
2008-03-09 03:48:56 +03:00
|
|
|
Extended attributes
|
2006-07-16 06:08:20 +04:00
|
|
|
stored in large inodes are not visible with older kernels, and such
|
2013-12-29 02:06:38 +04:00
|
|
|
filesystems will not be mountable with 2.4 kernels at all.
|
|
|
|
.IP
|
|
|
|
The default inode size is controlled by the
|
|
|
|
.BR mke2fs.conf (5)
|
|
|
|
file. In the
|
|
|
|
.B mke2fs.conf
|
|
|
|
file shipped with e2fsprogs, the default inode size is 256 bytes for
|
|
|
|
most file systems, except for small file systems where the inode size
|
|
|
|
will be 128 bytes.
|
2008-07-31 02:06:36 +04:00
|
|
|
.TP
|
2001-04-22 07:58:32 +04:00
|
|
|
.B \-j
|
|
|
|
Create the filesystem with an ext3 journal. If the
|
ChangeLog, mke2fs.8.in, mke2fs.c, tune2fs.8.in, tune2fs.c:
tune2fs.c, mke2fs.c, tune2fs.8.in, mke2fs.8.in: Change user interface
so that -J is used to specify journal options, and -j is used to
request creation of a journal using default values. (This is a UI
change, but we haven't done a formal release, and it makes things much
more consistent with the rest of the options out there.)
tune2fs.c: Add support for removing a filesystem from an external
journal; we correctly remove the filesystem UUID from the external
journal's filesystem list.
2001-01-18 04:51:15 +03:00
|
|
|
.B \-J
|
2001-04-22 07:58:32 +04:00
|
|
|
option is not specified, the default journal parameters will be used to
|
2008-07-31 02:06:36 +04:00
|
|
|
create an appropriately sized journal (given the size of the filesystem)
|
2001-04-22 07:58:32 +04:00
|
|
|
stored within the filesystem. Note that you must be using a kernel
|
|
|
|
which has ext3 support in order to actually make use of the journal.
|
ChangeLog, mke2fs.8.in, mke2fs.c, tune2fs.8.in, tune2fs.c:
tune2fs.c, mke2fs.c, tune2fs.8.in, mke2fs.8.in: Change user interface
so that -J is used to specify journal options, and -j is used to
request creation of a journal using default values. (This is a UI
change, but we haven't done a formal release, and it makes things much
more consistent with the rest of the options out there.)
tune2fs.c: Add support for removing a filesystem from an external
journal; we correctly remove the filesystem UUID from the external
journal's filesystem list.
2001-01-18 04:51:15 +03:00
|
|
|
.TP
|
2001-04-22 07:58:32 +04:00
|
|
|
.BI \-J " journal-options"
|
ChangeLog, mke2fs.8.in, mke2fs.c, tune2fs.8.in, tune2fs.c:
tune2fs.c, mke2fs.c, tune2fs.8.in, mke2fs.8.in: Change user interface
so that -J is used to specify journal options, and -j is used to
request creation of a journal using default values. (This is a UI
change, but we haven't done a formal release, and it makes things much
more consistent with the rest of the options out there.)
tune2fs.c: Add support for removing a filesystem from an external
journal; we correctly remove the filesystem UUID from the external
journal's filesystem list.
2001-01-18 04:51:15 +03:00
|
|
|
Create the ext3 journal using options specified on the command-line.
|
2000-11-17 07:55:24 +03:00
|
|
|
Journal options are comma
|
|
|
|
separated, and may take an argument using the equals ('=') sign.
|
2001-04-22 07:58:32 +04:00
|
|
|
The following journal options are supported:
|
|
|
|
.RS 1.2i
|
ChangeLog, mke2fs.8.in, mke2fs.c, tune2fs.8.in, tune2fs.c:
tune2fs.c, mke2fs.c, tune2fs.8.in, mke2fs.8.in: Change user interface
so that -J is used to specify journal options, and -j is used to
request creation of a journal using default values. (This is a UI
change, but we haven't done a formal release, and it makes things much
more consistent with the rest of the options out there.)
tune2fs.c: Add support for removing a filesystem from an external
journal; we correctly remove the filesystem UUID from the external
journal's filesystem list.
2001-01-18 04:51:15 +03:00
|
|
|
.TP
|
2001-04-22 07:58:32 +04:00
|
|
|
.BI size= journal-size
|
2002-07-02 18:08:27 +04:00
|
|
|
Create an internal journal (i.e., stored inside the filesystem) of size
|
2008-07-31 02:06:36 +04:00
|
|
|
.I journal-size
|
2001-05-14 08:12:27 +04:00
|
|
|
megabytes.
|
2008-07-31 02:06:36 +04:00
|
|
|
The size of the journal must be at least 1024 filesystem blocks
|
|
|
|
(i.e., 1MB if using 1k blocks, 4MB if using 4k blocks, etc.)
|
2011-08-31 17:35:57 +04:00
|
|
|
and may be no more than 10,240,000 filesystem blocks or half the total
|
|
|
|
file system size (whichever is smaller)
|
2014-01-28 21:58:56 +04:00
|
|
|
.TP
|
|
|
|
.BI location =journal-location
|
|
|
|
Specify the location of the journal. The argument
|
|
|
|
.I journal-location
|
|
|
|
can either be specified as a block number, or if the number has a units
|
|
|
|
suffix (e.g., 'M', 'G', etc.) interpret it as the offset from the
|
|
|
|
beginning of the file system.
|
2001-04-22 07:58:32 +04:00
|
|
|
@JDEV@.TP
|
|
|
|
@JDEV@.BI device= external-journal
|
2001-05-14 08:12:27 +04:00
|
|
|
@JDEV@Attach the filesystem to the journal block device located on
|
|
|
|
@JDEV@.IR external-journal .
|
|
|
|
@JDEV@The external
|
|
|
|
@JDEV@journal must already have been created using the command
|
|
|
|
@JDEV@.IP
|
2001-08-17 13:48:11 +04:00
|
|
|
@JDEV@.B mke2fs -O journal_dev
|
|
|
|
@JDEV@.I external-journal
|
2001-05-14 08:12:27 +04:00
|
|
|
@JDEV@.IP
|
|
|
|
@JDEV@Note that
|
|
|
|
@JDEV@.I external-journal
|
|
|
|
@JDEV@must have been created with the
|
|
|
|
@JDEV@same block size as the new filesystem.
|
2006-03-27 20:53:00 +04:00
|
|
|
@JDEV@In addition, while there is support for attaching
|
|
|
|
@JDEV@multiple filesystems to a single external journal,
|
2008-07-31 02:06:36 +04:00
|
|
|
@JDEV@the Linux kernel and
|
2006-03-27 20:53:00 +04:00
|
|
|
@JDEV@.BR e2fsck (8)
|
|
|
|
@JDEV@do not currently support shared external journals yet.
|
2001-08-17 13:48:11 +04:00
|
|
|
@JDEV@.IP
|
|
|
|
@JDEV@Instead of specifying a device name directly,
|
|
|
|
@JDEV@.I external-journal
|
|
|
|
@JDEV@can also be specified by either
|
|
|
|
@JDEV@.BI LABEL= label
|
|
|
|
@JDEV@or
|
|
|
|
@JDEV@.BI UUID= UUID
|
|
|
|
@JDEV@to locate the external journal by either the volume label or UUID
|
|
|
|
@JDEV@stored in the ext2 superblock at the start of the journal. Use
|
|
|
|
@JDEV@.BR dumpe2fs (8)
|
|
|
|
@JDEV@to display a journal device's volume label and UUID. See also the
|
|
|
|
@JDEV@.B -L
|
|
|
|
@JDEV@option of
|
|
|
|
@JDEV@.BR tune2fs (8).
|
2001-05-14 08:12:27 +04:00
|
|
|
.RE
|
|
|
|
@JDEV@.IP
|
2001-04-22 07:58:32 +04:00
|
|
|
@JDEV@Only one of the
|
|
|
|
@JDEV@.BR size " or " device
|
|
|
|
@JDEV@options can be given for a filesystem.
|
|
|
|
.TP
|
|
|
|
.BI \-l " filename"
|
|
|
|
Read the bad blocks list from
|
2008-07-31 02:06:36 +04:00
|
|
|
.IR filename .
|
2001-12-24 23:01:59 +03:00
|
|
|
Note that the block numbers in the bad block list must be generated
|
2008-07-31 02:06:36 +04:00
|
|
|
using the same block size as used by
|
|
|
|
.BR mke2fs .
|
|
|
|
As a result, the
|
2001-12-24 23:01:59 +03:00
|
|
|
.B \-c
|
2008-07-31 02:06:36 +04:00
|
|
|
option to
|
2001-12-24 23:01:59 +03:00
|
|
|
.B mke2fs
|
|
|
|
is a much simpler and less error-prone method of checking a disk for bad
|
2008-07-31 02:06:36 +04:00
|
|
|
blocks before formatting it, as
|
2001-12-24 23:01:59 +03:00
|
|
|
.B mke2fs
|
|
|
|
will automatically pass the correct parameters to the
|
|
|
|
.B badblocks
|
|
|
|
program.
|
2001-04-22 07:58:32 +04:00
|
|
|
.TP
|
2005-09-25 02:47:39 +04:00
|
|
|
.BI \-L " new-volume-label"
|
|
|
|
Set the volume label for the filesystem to
|
|
|
|
.IR new-volume-label .
|
|
|
|
The maximum length of the
|
|
|
|
volume label is 16 bytes.
|
2001-04-22 07:58:32 +04:00
|
|
|
.TP
|
|
|
|
.BI \-m " reserved-blocks-percentage"
|
2008-07-31 02:06:36 +04:00
|
|
|
Specify the percentage of the filesystem blocks reserved for
|
2004-10-08 18:47:30 +04:00
|
|
|
the super-user. This avoids fragmentation, and allows root-owned
|
2008-07-31 02:06:36 +04:00
|
|
|
daemons, such as
|
2004-10-08 18:47:30 +04:00
|
|
|
.BR syslogd (8),
|
2008-07-31 02:06:36 +04:00
|
|
|
to continue to function correctly after non-privileged processes are
|
|
|
|
prevented from writing to the filesystem. The default percentage
|
2004-10-08 18:47:30 +04:00
|
|
|
is 5%.
|
ChangeLog, mke2fs.8.in, mke2fs.c, tune2fs.8.in, tune2fs.c:
tune2fs.c, mke2fs.c, tune2fs.8.in, mke2fs.8.in: Change user interface
so that -J is used to specify journal options, and -j is used to
request creation of a journal using default values. (This is a UI
change, but we haven't done a formal release, and it makes things much
more consistent with the rest of the options out there.)
tune2fs.c: Add support for removing a filesystem from an external
journal; we correctly remove the filesystem UUID from the external
journal's filesystem list.
2001-01-18 04:51:15 +03:00
|
|
|
.TP
|
2008-07-31 02:06:36 +04:00
|
|
|
.BI \-M " last-mounted-directory"
|
|
|
|
Set the last mounted directory for the filesystem. This might be useful
|
|
|
|
for the sake of utilities that key off of the last mounted directory to
|
2005-04-09 08:33:21 +04:00
|
|
|
determine where the filesystem should be mounted.
|
2000-10-24 23:33:45 +04:00
|
|
|
.TP
|
Many files:
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
1999-10-21 23:56:34 +04:00
|
|
|
.B \-n
|
2008-07-31 02:06:36 +04:00
|
|
|
Causes
|
|
|
|
.B mke2fs
|
|
|
|
to not actually create a filesystem, but display what it
|
2002-08-18 02:16:29 +04:00
|
|
|
would do if it were to create a filesystem. This can be used to
|
|
|
|
determine the location of the backup superblocks for a particular
|
2008-07-31 02:06:36 +04:00
|
|
|
filesystem, so long as the
|
|
|
|
.B mke2fs
|
|
|
|
parameters that were passed when the
|
2002-08-18 02:16:29 +04:00
|
|
|
filesystem was originally created are used again. (With the
|
2008-07-31 02:06:36 +04:00
|
|
|
.B \-n
|
2002-08-18 02:16:29 +04:00
|
|
|
option added, of course!)
|
1999-09-15 00:11:19 +04:00
|
|
|
.TP
|
Many files:
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
1999-10-21 23:56:34 +04:00
|
|
|
.BI \-N " number-of-inodes"
|
2008-07-31 02:06:36 +04:00
|
|
|
Overrides the default calculation of the number of inodes that should be
|
|
|
|
reserved for the filesystem (which is based on the number of blocks and
|
|
|
|
the
|
Many files:
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
1999-10-21 23:56:34 +04:00
|
|
|
.I bytes-per-inode
|
2008-07-31 02:06:36 +04:00
|
|
|
ratio). This allows the user to specify the number
|
1999-01-05 10:25:06 +03:00
|
|
|
of desired inodes directly.
|
|
|
|
.TP
|
2014-03-06 20:00:25 +04:00
|
|
|
.BI \-d " root-directory"
|
|
|
|
Add the files from the root-directory to the filesystem.
|
|
|
|
.TP
|
2001-04-22 07:58:32 +04:00
|
|
|
.BI \-o " creator-os"
|
2008-07-31 02:06:36 +04:00
|
|
|
Overrides the default value of the "creator operating system" field of the
|
|
|
|
filesystem. The creator field is set by default to the name of the OS the
|
1997-05-09 07:06:31 +04:00
|
|
|
.B mke2fs
|
2008-07-31 02:06:36 +04:00
|
|
|
executable was compiled for.
|
1997-04-29 18:53:37 +04:00
|
|
|
.TP
|
2014-01-01 07:53:52 +04:00
|
|
|
.B "\-O \fR[^]\fIfeature\fR[,...]"
|
2008-07-31 02:06:36 +04:00
|
|
|
Create a filesystem with the given features (filesystem options),
|
|
|
|
overriding the default filesystem options. The features that are
|
2006-03-24 06:00:01 +03:00
|
|
|
enabled by default are specified by the
|
|
|
|
.I base_features
|
|
|
|
relation, either in the
|
2008-07-31 02:06:36 +04:00
|
|
|
.I [defaults]
|
2006-03-24 06:00:01 +03:00
|
|
|
section in the
|
|
|
|
.B /etc/mke2fs.conf
|
2008-02-19 16:32:58 +03:00
|
|
|
configuration file,
|
2008-07-31 02:06:36 +04:00
|
|
|
or in the
|
2006-03-24 06:00:01 +03:00
|
|
|
.I [fs_types]
|
2008-07-31 02:06:36 +04:00
|
|
|
subsections for the usage types as specified by the
|
2008-08-24 09:04:43 +04:00
|
|
|
.B \-T
|
2008-02-19 16:32:58 +03:00
|
|
|
option, further modified by the
|
|
|
|
.I features
|
|
|
|
relation found in the
|
2008-07-31 02:06:36 +04:00
|
|
|
.I [fs_types]
|
|
|
|
subsections for the filesystem and usage types. See the
|
2008-02-19 16:32:58 +03:00
|
|
|
.BR mke2fs.conf (5)
|
|
|
|
manual page for more details.
|
|
|
|
The filesystem type-specific configuration setting found in the
|
2006-03-24 06:00:01 +03:00
|
|
|
.I [fs_types]
|
|
|
|
section will override the global default found in
|
2008-07-31 02:06:36 +04:00
|
|
|
.IR [defaults] .
|
2001-04-22 07:58:32 +04:00
|
|
|
.sp
|
2008-07-31 02:06:36 +04:00
|
|
|
The filesystem feature set will be further edited
|
|
|
|
using either the feature set specified by this option,
|
|
|
|
or if this option is not given, by the
|
2006-03-24 06:00:01 +03:00
|
|
|
.I default_features
|
2008-07-31 02:06:36 +04:00
|
|
|
relation for the filesystem type being created, or in the
|
|
|
|
.I [defaults]
|
2006-03-24 06:00:01 +03:00
|
|
|
section of the configuration file.
|
|
|
|
.sp
|
|
|
|
The filesystem feature set is comprised of a list of features, separated
|
|
|
|
by commas, that are to be enabled. To disable a feature, simply
|
2014-01-01 07:53:52 +04:00
|
|
|
prefix the feature name with a caret ('^') character.
|
2013-12-25 00:15:31 +04:00
|
|
|
Features with dependencies will not be removed successfully.
|
2013-12-16 09:53:35 +04:00
|
|
|
The pseudo-filesystem feature "none" will clear all filesystem features.
|
|
|
|
.TP
|
2013-12-25 00:15:31 +04:00
|
|
|
For more information about the features which can be set, please see
|
|
|
|
the manual page
|
|
|
|
.BR ext4 (5).
|
1997-04-29 18:53:37 +04:00
|
|
|
.TP
|
2001-05-14 08:12:27 +04:00
|
|
|
.B \-q
|
2008-07-31 02:06:36 +04:00
|
|
|
Quiet execution. Useful if
|
2001-05-14 08:12:27 +04:00
|
|
|
.B mke2fs
|
|
|
|
is run in a script.
|
|
|
|
.TP
|
2001-04-22 07:58:32 +04:00
|
|
|
.BI \-r " revision"
|
1997-04-30 01:26:48 +04:00
|
|
|
Set the filesystem revision for the new filesystem. Note that 1.2
|
2008-07-31 02:06:36 +04:00
|
|
|
kernels only support revision 0 filesystems. The default is to
|
2001-04-22 07:58:32 +04:00
|
|
|
create revision 1 filesystems.
|
1997-04-30 01:26:48 +04:00
|
|
|
.TP
|
Many files:
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
1999-10-21 23:56:34 +04:00
|
|
|
.B \-S
|
1997-04-26 17:34:30 +04:00
|
|
|
Write superblock and group descriptors only. This is useful if all of
|
|
|
|
the superblock and backup superblocks are corrupted, and a last-ditch
|
2008-07-31 02:06:36 +04:00
|
|
|
recovery method is desired. It causes
|
1997-05-09 07:06:31 +04:00
|
|
|
.B mke2fs
|
2008-07-31 02:06:36 +04:00
|
|
|
to reinitialize the
|
1997-04-26 17:34:30 +04:00
|
|
|
superblock and group descriptors, while not touching the inode table
|
|
|
|
and the block and inode bitmaps. The
|
|
|
|
.B e2fsck
|
|
|
|
program should be run immediately after this option is used, and there
|
2001-04-22 07:58:32 +04:00
|
|
|
is no guarantee that any data will be salvageable. It is critical to
|
|
|
|
specify the correct filesystem blocksize when using this option,
|
|
|
|
or there is no chance of recovery.
|
2001-05-14 08:12:27 +04:00
|
|
|
.\" .TP
|
|
|
|
.\" .BI \-t " test"
|
|
|
|
.\" Check the device for bad blocks before creating the file system
|
|
|
|
.\" using the specified test.
|
ChangeLog, debugfs.8.in, debugfs.c:
Add a -V option which displays the current version.
ChangeLog, unix.c:
unix.c (e2fsck_update_progress): Remove unused variables.
ChangeLog, inode.c:
inode.c (get_next_blockgroup): Fix bug where if get_next_blockgroup()
is called early because of a missing inode table in a block group, the
current_inode counter wasn't incremented correctly.
ChangeLog, tst_uuid.c:
tst_uuid.c (main): Fixed bogus declaration of the main's argv parameter.
ChangeLog, test_icount.c:
test_icount.c (main): Fix main() declaration so that it returns int,
not void.
Many files:
fsck.c (ignore): Remove unused variable cp.
chattr.c (fatal_error):
tune2fs.c (usage):
lsattr.c (usage):
dumpe2fs.c (usage):
badblocks.c (usage): Remove volatile from declaration.
fsck.c: Change use of strdup to be string_copy, since we don't trust
what glibc is doing with strdup. (Whatever it is, it isn't pretty.)
1998-06-27 09:11:14 +04:00
|
|
|
.TP
|
2008-02-19 16:32:58 +03:00
|
|
|
.BI \-t " fs-type"
|
2013-12-16 09:53:35 +04:00
|
|
|
Specify the filesystem type (i.e., ext2, ext3, ext4, etc.) that is
|
|
|
|
to be created.
|
2008-07-31 02:06:36 +04:00
|
|
|
If this option is not specified,
|
|
|
|
.B mke2fs
|
|
|
|
will pick a default either via how
|
|
|
|
the command was run (for example, using a name of the form mkfs.ext2,
|
2008-02-19 16:32:58 +03:00
|
|
|
mkfs.ext3, etc.) or via a default as defined by the
|
2013-06-16 05:19:39 +04:00
|
|
|
.B /etc/mke2fs.conf
|
2008-10-02 16:45:02 +04:00
|
|
|
file. This option controls which filesystem options are used by
|
|
|
|
default, based on the
|
|
|
|
.B fstypes
|
|
|
|
configuration stanza in
|
2013-06-16 05:19:39 +04:00
|
|
|
.BR /etc/mke2fs.conf .
|
2008-10-02 16:45:02 +04:00
|
|
|
.sp
|
|
|
|
If the
|
|
|
|
.B \-O
|
|
|
|
option is used to explicitly add or remove filesystem options that
|
|
|
|
should be set in the newly created filesystem, the
|
|
|
|
resulting filesystem may not be supported by the requested
|
|
|
|
.IR fs-type .
|
2011-09-15 22:24:37 +04:00
|
|
|
(e.g., "\fBmke2fs \-t ext3 \-O extent /dev/sdXX\fR" will create a
|
2008-10-02 16:45:02 +04:00
|
|
|
filesystem that is not supported by the ext3 implementation as found in
|
2009-05-30 08:15:22 +04:00
|
|
|
the Linux kernel; and "\fBmke2fs \-t ext3 \-O ^has_journal /dev/hdXX\fR"
|
2008-10-02 16:45:02 +04:00
|
|
|
will create a filesystem that does not have a journal and hence will not
|
|
|
|
be supported by the ext3 filesystem code in the Linux kernel.)
|
2008-02-19 16:32:58 +03:00
|
|
|
.TP
|
|
|
|
.BI \-T " usage-type[,...]"
|
2008-07-31 02:06:36 +04:00
|
|
|
Specify how the filesystem is going to be used, so that
|
|
|
|
.B mke2fs
|
2008-02-19 16:32:58 +03:00
|
|
|
can choose optimal filesystem parameters for that use. The usage
|
|
|
|
types that are supported are defined in the configuration file
|
2013-06-16 05:19:39 +04:00
|
|
|
.BR /etc/mke2fs.conf .
|
2008-02-19 16:32:58 +03:00
|
|
|
The user may specify one or more usage types
|
|
|
|
using a comma separated list.
|
|
|
|
.sp
|
|
|
|
If this option is is not specified,
|
|
|
|
.B mke2fs
|
|
|
|
will pick a single default usage type based on the size of the filesystem to
|
2014-10-13 12:19:24 +04:00
|
|
|
be created. If the filesystem size is less than 3 megabytes,
|
2008-04-18 18:19:27 +04:00
|
|
|
.B mke2fs
|
2008-02-19 16:32:58 +03:00
|
|
|
will use the filesystem type
|
|
|
|
.IR floppy .
|
2014-10-13 12:19:24 +04:00
|
|
|
If the filesystem size is greater than or equal to 3 but less than
|
2008-02-19 16:32:58 +03:00
|
|
|
512 megabytes,
|
|
|
|
.BR mke2fs (8)
|
2010-11-29 11:55:12 +03:00
|
|
|
will use the filesystem type
|
2008-02-19 16:32:58 +03:00
|
|
|
.IR small .
|
2010-11-29 11:55:12 +03:00
|
|
|
If the filesystem size is greater than or equal to 4 terabytes but less than
|
|
|
|
16 terabytes,
|
|
|
|
.BR mke2fs (8)
|
|
|
|
will use the filesystem type
|
|
|
|
.IR big .
|
|
|
|
If the filesystem size is greater than or equal to 16 terabytes,
|
|
|
|
.BR mke2fs (8)
|
|
|
|
will use the filesystem type
|
|
|
|
.IR huge .
|
2008-02-19 16:32:58 +03:00
|
|
|
Otherwise,
|
|
|
|
.BR mke2fs (8)
|
|
|
|
will use the default filesystem type
|
|
|
|
.IR default .
|
2001-04-22 07:58:32 +04:00
|
|
|
.TP
|
2009-01-20 21:18:23 +03:00
|
|
|
.BI \-U " UUID"
|
|
|
|
Create the filesystem with the specified UUID.
|
|
|
|
.TP
|
2001-04-22 07:58:32 +04:00
|
|
|
.B \-v
|
|
|
|
Verbose execution.
|
1999-07-19 19:30:21 +04:00
|
|
|
.TP
|
Many files:
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
1999-10-21 23:56:34 +04:00
|
|
|
.B \-V
|
2008-07-31 02:06:36 +04:00
|
|
|
Print the version number of
|
ChangeLog, debugfs.8.in, debugfs.c:
Add a -V option which displays the current version.
ChangeLog, unix.c:
unix.c (e2fsck_update_progress): Remove unused variables.
ChangeLog, inode.c:
inode.c (get_next_blockgroup): Fix bug where if get_next_blockgroup()
is called early because of a missing inode table in a block group, the
current_inode counter wasn't incremented correctly.
ChangeLog, tst_uuid.c:
tst_uuid.c (main): Fixed bogus declaration of the main's argv parameter.
ChangeLog, test_icount.c:
test_icount.c (main): Fix main() declaration so that it returns int,
not void.
Many files:
fsck.c (ignore): Remove unused variable cp.
chattr.c (fatal_error):
tune2fs.c (usage):
lsattr.c (usage):
dumpe2fs.c (usage):
badblocks.c (usage): Remove volatile from declaration.
fsck.c: Change use of strdup to be string_copy, since we don't trust
what glibc is doing with strdup. (Whatever it is, it isn't pretty.)
1998-06-27 09:11:14 +04:00
|
|
|
.B mke2fs
|
|
|
|
and exit.
|
2010-11-29 11:55:17 +03:00
|
|
|
.SH ENVIRONMENT
|
|
|
|
.TP
|
|
|
|
.BI MKE2FS_SYNC
|
|
|
|
If set to non-zero integer value, its value is used to determine how often
|
|
|
|
.BR sync (2)
|
|
|
|
is called during inode table initialization.
|
|
|
|
.TP
|
|
|
|
.BI MKE2FS_CONFIG
|
|
|
|
Determines the location of the configuration file (see
|
|
|
|
.BR mke2fs.conf (5)).
|
|
|
|
.TP
|
|
|
|
.BI MKE2FS_FIRST_META_BG
|
|
|
|
If set to non-zero integer value, its value is used to determine first meta
|
|
|
|
block group. This is mostly for debugging purposes.
|
|
|
|
.TP
|
|
|
|
.BI MKE2FS_DEVICE_SECTSIZE
|
|
|
|
If set to non-zero integer value, its value is used to determine physical
|
|
|
|
sector size of the
|
|
|
|
.IR device .
|
|
|
|
.TP
|
|
|
|
.BI MKE2FS_SKIP_CHECK_MSG
|
|
|
|
If set, do not show the message of filesystem automatic check caused by
|
|
|
|
mount count or check interval.
|
1997-04-26 17:21:57 +04:00
|
|
|
.SH AUTHOR
|
|
|
|
This version of
|
|
|
|
.B mke2fs
|
1997-04-26 18:00:26 +04:00
|
|
|
has been written by Theodore Ts'o <tytso@mit.edu>.
|
1997-04-26 17:21:57 +04:00
|
|
|
.SH BUGS
|
|
|
|
.B mke2fs
|
Many files:
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
1999-10-21 23:56:34 +04:00
|
|
|
accepts the
|
|
|
|
.B \-f
|
|
|
|
option but currently ignores it because the second
|
1997-04-26 17:21:57 +04:00
|
|
|
extended file system does not support fragments yet.
|
|
|
|
.br
|
2001-04-22 07:58:32 +04:00
|
|
|
There may be other ones. Please, report them to the author.
|
1997-04-26 17:21:57 +04:00
|
|
|
.SH AVAILABILITY
|
|
|
|
.B mke2fs
|
2008-07-31 02:06:36 +04:00
|
|
|
is part of the e2fsprogs package and is available from
|
2001-05-03 18:43:43 +04:00
|
|
|
http://e2fsprogs.sourceforge.net.
|
1997-04-26 17:21:57 +04:00
|
|
|
.SH SEE ALSO
|
2006-03-24 06:00:01 +03:00
|
|
|
.BR mke2fs.conf (5),
|
ChangeLog, e2fsck.h, pass1.c, pass2.c, pass4.c, swapfs.c:
e2fsck.h:
pass1.c (pass1_get_blocks, pass1_read_inode, pass1_write_inode,
pass1_check_directory, e2fsck_use_inode_shortcuts): Make pass1_* be
private static functions, and create new function
e2fsck_use_inode_shortcuts which sets and clears the inode shortcut
functions in the fs structure.
e2fsck.h:
pass2.c (e2fsck_process_bad_inode): Make process_bad_inode() an
exported function.
pass4.c (e2fsck_pass4): Call e2fsck_process_bad_inode to check if a
disconnected inode has any problems before connecting it to
/lost+found. Bug and suggested fix by Pavel Machek <pavel@bug.ucw.cz>
ChangeLog, swapfs.c:
swapfs.c (ext2fs_swap_inode): Add compatibility for Linux 2.3 kernels
that use i_generation instead of i_version. Patch supplied by Jon
Bright <sircus@sircus.demon.co.uk>.
ChangeLog, mke2fs.8.in:
mke2fs.8.in: Fix typo in man page which caused the badblocks command
to not show up in the "SEE ALSO" section.
ChangeLog, expect.1, expect.2, image.gz, name:
f_recnect_bad: New test which checks the case where a disconnect inode
also bad inode fields; we need to make sure e2fsck offers to fix the
inode (or clear the inode, as necessary).
1999-06-25 19:40:18 +04:00
|
|
|
.BR badblocks (8),
|
1997-04-26 17:21:57 +04:00
|
|
|
.BR dumpe2fs (8),
|
|
|
|
.BR e2fsck (8),
|
2013-12-25 00:15:31 +04:00
|
|
|
.BR tune2fs (8),
|
|
|
|
.BR ext4 (5)
|