1997-04-26 21:21:57 +08:00
|
|
|
.\" -*- nroff -*-
|
1997-04-26 22:00:26 +08: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.
|
|
|
|
.\"
|
1997-04-26 22:37:06 +08:00
|
|
|
.TH MKE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
|
1997-04-26 21:21:57 +08:00
|
|
|
.SH NAME
|
2003-08-25 05:56:41 +08:00
|
|
|
mke2fs \- create an ext2/ext3 filesystem
|
1997-04-26 21:21:57 +08:00
|
|
|
.SH SYNOPSIS
|
|
|
|
.B mke2fs
|
|
|
|
[
|
|
|
|
.B \-c
|
|
|
|
|
|
|
|
|
.B \-l
|
1997-04-29 22:53:37 +08:00
|
|
|
.I filename
|
1997-04-26 21:21:57 +08:00
|
|
|
]
|
|
|
|
[
|
|
|
|
.B \-b
|
1997-04-29 22:53:37 +08:00
|
|
|
.I block-size
|
1997-04-26 21:21:57 +08:00
|
|
|
]
|
|
|
|
[
|
|
|
|
.B \-f
|
1997-04-29 22:53:37 +08:00
|
|
|
.I fragment-size
|
1997-04-26 21:21:57 +08:00
|
|
|
]
|
|
|
|
[
|
2003-04-12 02:00:53 +08:00
|
|
|
.B \-g
|
|
|
|
.I blocks-per-group
|
|
|
|
]
|
|
|
|
[
|
1997-04-26 21:21:57 +08:00
|
|
|
.B \-i
|
1997-04-29 22:53:37 +08:00
|
|
|
.I bytes-per-inode
|
1997-04-26 21:21:57 +08:00
|
|
|
]
|
|
|
|
[
|
2000-10-25 03:33:45 +08: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 09:51:15 +08:00
|
|
|
]
|
|
|
|
[
|
|
|
|
.B \-J
|
2000-11-17 12:55:24 +08:00
|
|
|
.I journal-options
|
2000-10-25 03:33:45 +08:00
|
|
|
]
|
|
|
|
[
|
1999-01-05 15:25:06 +08:00
|
|
|
.B \-N
|
|
|
|
.I number-of-inodes
|
|
|
|
]
|
|
|
|
[
|
1999-09-15 04:11:19 +08:00
|
|
|
.B -n
|
|
|
|
]
|
|
|
|
[
|
1997-04-26 21:21:57 +08:00
|
|
|
.B \-m
|
1997-04-29 22:53:37 +08:00
|
|
|
.I reserved-blocks-percentage
|
|
|
|
]
|
|
|
|
[
|
|
|
|
.B \-o
|
|
|
|
.I creator-os
|
1997-04-26 21:21:57 +08:00
|
|
|
]
|
|
|
|
[
|
1999-10-23 09:04:50 +08:00
|
|
|
.B \-O
|
|
|
|
.IR feature [,...]
|
|
|
|
]
|
|
|
|
[
|
1997-04-26 21:34:30 +08: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-22 03:56:34 +08:00
|
|
|
.B \-r
|
|
|
|
.I fs-revision-level
|
1997-04-30 05:26:48 +08:00
|
|
|
]
|
|
|
|
[
|
2005-01-06 00:12:20 +08:00
|
|
|
.B \-E
|
|
|
|
.I extended-options
|
1997-04-30 01:48:10 +08:00
|
|
|
]
|
|
|
|
[
|
1997-04-26 21:21:57 +08:00
|
|
|
.B \-v
|
|
|
|
]
|
1997-04-26 21:34:30 +08:00
|
|
|
[
|
1997-04-26 22:37:06 +08:00
|
|
|
.B \-F
|
|
|
|
]
|
|
|
|
[
|
1997-04-29 22:53:37 +08:00
|
|
|
.B \-L
|
|
|
|
.I volume-label
|
|
|
|
]
|
|
|
|
[
|
|
|
|
.B \-M
|
|
|
|
.I last-mounted-directory
|
|
|
|
]
|
|
|
|
[
|
1997-04-26 21:34:30 +08: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 13:11:14 +08:00
|
|
|
[
|
1999-07-19 23:30:21 +08:00
|
|
|
.B \-T
|
|
|
|
.I filesystem-type
|
|
|
|
]
|
|
|
|
[
|
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 13:11:14 +08:00
|
|
|
.B \-V
|
|
|
|
]
|
1997-04-29 22:53:37 +08:00
|
|
|
.I device
|
1997-04-26 21:21:57 +08:00
|
|
|
[
|
1997-04-29 22:53:37 +08:00
|
|
|
.I blocks-count
|
1997-04-26 21:21:57 +08:00
|
|
|
]
|
2001-04-22 11:58:32 +08:00
|
|
|
@JDEV@.sp
|
2001-05-14 12:12:27 +08:00
|
|
|
@JDEV@.B "mke2fs \-O journal_dev"
|
2001-04-22 11:58:32 +08:00
|
|
|
@JDEV@[
|
|
|
|
@JDEV@.B \-b
|
|
|
|
@JDEV@.I block-size
|
|
|
|
@JDEV@]
|
2001-05-14 12:12:27 +08:00
|
|
|
.\" No external-journal specific journal options yet (size is ignored)
|
2001-04-22 11:58:32 +08: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 12:12:27 +08:00
|
|
|
@JDEV@.I external-journal
|
2001-08-17 17:48:11 +08:00
|
|
|
@JDEV@[
|
|
|
|
@JDEV@.I blocks-count
|
|
|
|
@JDEV@]
|
1997-04-26 21:21:57 +08:00
|
|
|
.SH DESCRIPTION
|
|
|
|
.B mke2fs
|
2002-07-02 22:08:27 +08:00
|
|
|
is used to create an ext2/ext3 filesystem (usually in a disk partition).
|
1997-04-26 21:21:57 +08:00
|
|
|
.I device
|
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-22 03:56:34 +08:00
|
|
|
is the special file corresponding to the device (e.g
|
|
|
|
.IR /dev/hdXX ).
|
1997-04-26 21:21:57 +08:00
|
|
|
.I blocks-count
|
|
|
|
is the number of blocks on the device. If omitted,
|
|
|
|
.B mke2fs
|
2002-02-26 14:11:26 +08:00
|
|
|
automagically figures the file system size. If called as
|
|
|
|
.B mkfs.ext3
|
|
|
|
a journal is created as if the
|
|
|
|
.B \-j
|
|
|
|
option was specified.
|
1997-04-26 21:21:57 +08: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-22 03:56:34 +08:00
|
|
|
.BI \-b " block-size"
|
1999-09-15 04:11:19 +08:00
|
|
|
Specify the size of blocks in bytes. Valid block size vales are 1024,
|
1999-10-23 11:17:10 +08:00
|
|
|
2048 and 4096 bytes per block. If omitted,
|
|
|
|
.B mke2fs
|
2004-03-21 05:14:46 +08:00
|
|
|
block-size is heuristically determined by the file system size and
|
2003-04-12 10:10:50 +08:00
|
|
|
the expected usage of the filesystem (see the
|
1999-10-23 11:17:10 +08:00
|
|
|
.B \-T
|
2003-04-12 10:10:50 +08:00
|
|
|
option). If
|
|
|
|
.I block-size
|
2005-01-06 00:12:20 +08:00
|
|
|
is negative, then
|
|
|
|
.B mke2fs
|
|
|
|
will use heuristics to determine the
|
2003-04-12 10:10:50 +08:00
|
|
|
appropriate block size, with the constraint that the block size will be
|
|
|
|
at least
|
|
|
|
.I block-size
|
|
|
|
bytes. This is useful for certain hardware devices which require that
|
|
|
|
the blocksize be a multiple of 2k.
|
1997-04-26 21:21:57 +08: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-22 03:56:34 +08:00
|
|
|
.B \-c
|
2001-12-25 04:01:59 +08:00
|
|
|
Check the device for bad blocks before creating the file system. If
|
2004-11-20 03:29:48 +08:00
|
|
|
this option is specified twice, then a slower, read-write
|
2001-12-25 04:01:59 +08:00
|
|
|
test is used instead of a fast read-only test.
|
1997-04-26 21:21:57 +08:00
|
|
|
.TP
|
2005-01-06 00:12:20 +08: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
|
|
|
|
.B -E
|
|
|
|
option used to be
|
|
|
|
.B -R
|
|
|
|
in earlier versions of
|
|
|
|
.BR mke2fs .
|
|
|
|
The
|
|
|
|
.B -R
|
|
|
|
option is still accepted for backwards compatibility. The
|
|
|
|
following extended options are supported:
|
|
|
|
.RS 1.2i
|
|
|
|
.TP
|
|
|
|
.BI stride= stripe-size
|
|
|
|
Configure the filesystem for a RAID array with
|
|
|
|
.I stripe-size
|
|
|
|
filesystem blocks per stripe.
|
|
|
|
.TP
|
|
|
|
.BI resize= max-online-resize
|
|
|
|
Reserve enough space so that the block group descriptor table can grow
|
|
|
|
to support a filesystem that has max-online-resize blocks.
|
|
|
|
.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-22 03:56:34 +08:00
|
|
|
.BI \-f " fragment-size"
|
1997-04-26 21:21:57 +08:00
|
|
|
Specify the size of fragments in bytes.
|
|
|
|
.TP
|
2001-04-22 11:58:32 +08:00
|
|
|
.B \-F
|
|
|
|
Force
|
|
|
|
.B mke2fs
|
|
|
|
to run, even if the specified device is not a
|
|
|
|
block special device, or appears to be mounted.
|
|
|
|
.TP
|
2003-04-12 02:00:53 +08:00
|
|
|
.BI \-g " blocks-per-group"
|
|
|
|
Specify the number of blocks in a block group. There is generally no
|
|
|
|
reason the user to ever set this parameter, as the default is optimal
|
|
|
|
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
|
|
|
|
.B \-R
|
|
|
|
option rather than manipulating the number of blocks per group.)
|
|
|
|
This option is generally used by developers who
|
|
|
|
are developing test cases.
|
|
|
|
.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-22 03:56:34 +08:00
|
|
|
.BI \-i " bytes-per-inode"
|
1997-04-26 21:21:57 +08:00
|
|
|
Specify the bytes/inode ratio.
|
|
|
|
.B mke2fs
|
|
|
|
creates an inode for every
|
|
|
|
.I bytes-per-inode
|
2001-04-22 11:58:32 +08: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-22 03:56:34 +08:00
|
|
|
.I bytes-per-inode
|
2001-04-22 11:58:32 +08:00
|
|
|
ratio, the fewer inodes will be created. This value generally shouldn't
|
|
|
|
be smaller than the blocksize of the filesystem, since then too many
|
|
|
|
inodes will be made. Be warned that is not possible to expand the number
|
|
|
|
of inodes on a filesystem after it is created, so be careful deciding the
|
|
|
|
correct value for this parameter.
|
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 09:51:15 +08:00
|
|
|
.TP
|
2001-04-22 11:58:32 +08: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 09:51:15 +08:00
|
|
|
.B \-J
|
2001-04-22 11:58:32 +08:00
|
|
|
option is not specified, the default journal parameters will be used to
|
|
|
|
create an appropriately sized journal (given the size of the filesystem)
|
|
|
|
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 09:51:15 +08:00
|
|
|
.TP
|
2001-04-22 11:58:32 +08: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 09:51:15 +08:00
|
|
|
Create the ext3 journal using options specified on the command-line.
|
2000-11-17 12:55:24 +08:00
|
|
|
Journal options are comma
|
|
|
|
separated, and may take an argument using the equals ('=') sign.
|
2001-04-22 11:58:32 +08: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 09:51:15 +08:00
|
|
|
.TP
|
2001-04-22 11:58:32 +08:00
|
|
|
.BI size= journal-size
|
2002-07-02 22:08:27 +08:00
|
|
|
Create an internal journal (i.e., stored inside the filesystem) of size
|
2001-05-14 12:12:27 +08:00
|
|
|
.I journal-size
|
|
|
|
megabytes.
|
ChangeLog, mke2fs.8.in, mke2fs.c, tune2fs.8.in, tune2fs.c, util.c, util.h:
ke2fs.8.in, tune2fs.8.in: Change man paegs to document that the
journal must be bewteen 1024 and 10,240 file system blocks.
mke2fs.c, tune2fs.c: Change to use figure_journal_size()
util.c, util.h (figure_journal_size): Change journal_default_size into
routine which also converts the requested journal size into filesystem
blocks and does bounds checking to make sure the journal is sized
reasonably. Renamed function to journal_default_size.
parse_journal_opts): Remove bounds check for the journal size, since
this is now done in figure_journal_size, and based on the number of
filesystem blocks, as opposed to using the absolute size of the
journal.
2001-03-27 04:07:13 +08: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.)
|
2001-05-14 12:12:27 +08:00
|
|
|
and may be no more than 102,400 filesystem blocks.
|
2001-04-22 11:58:32 +08:00
|
|
|
@JDEV@.TP
|
|
|
|
@JDEV@.BI device= external-journal
|
2001-05-14 12:12:27 +08: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 17:48:11 +08:00
|
|
|
@JDEV@.B mke2fs -O journal_dev
|
|
|
|
@JDEV@.I external-journal
|
2001-05-14 12:12:27 +08: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.
|
2001-08-17 17:48:11 +08: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 12:12:27 +08:00
|
|
|
.RE
|
|
|
|
@JDEV@.IP
|
2001-04-22 11:58:32 +08: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
|
2001-12-25 04:01:59 +08:00
|
|
|
.IR filename .
|
|
|
|
Note that the block numbers in the bad block list must be generated
|
|
|
|
using the same block size as used by mke2fs. As a result, the
|
|
|
|
.B \-c
|
|
|
|
option to
|
|
|
|
.B mke2fs
|
|
|
|
is a much simpler and less error-prone method of checking a disk for bad
|
|
|
|
blocks before formatting it, as
|
|
|
|
.B mke2fs
|
|
|
|
will automatically pass the correct parameters to the
|
|
|
|
.B badblocks
|
|
|
|
program.
|
2001-04-22 11:58:32 +08:00
|
|
|
.TP
|
|
|
|
.B \-L
|
|
|
|
Set the volume label for the filesystem.
|
|
|
|
.TP
|
|
|
|
.BI \-m " reserved-blocks-percentage"
|
|
|
|
Specify the percentage of the filesystem blocks reserved for
|
2004-10-08 22:47:30 +08:00
|
|
|
the super-user. This avoids fragmentation, and allows root-owned
|
|
|
|
daemons, such as
|
|
|
|
.BR syslogd (8),
|
|
|
|
to continue to function correctly after non-privileged processes are
|
|
|
|
prevented from writing to the filesystem. The default percentage
|
|
|
|
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 09:51:15 +08:00
|
|
|
.TP
|
2001-04-22 11:58:32 +08:00
|
|
|
.B \-M
|
|
|
|
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
|
|
|
|
determine where the filesytem should be mounted.
|
2000-10-25 03:33:45 +08: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-22 03:56:34 +08:00
|
|
|
.B \-n
|
2002-08-18 06:16:29 +08:00
|
|
|
causes mke2fs to not actually create a filesystem, but display what it
|
|
|
|
would do if it were to create a filesystem. This can be used to
|
|
|
|
determine the location of the backup superblocks for a particular
|
|
|
|
filesystem, so long as the mke2fs parameters that were passed when the
|
|
|
|
filesystem was originally created are used again. (With the
|
|
|
|
.B \-n
|
|
|
|
option added, of course!)
|
1999-09-15 04:11:19 +08: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-22 03:56:34 +08:00
|
|
|
.BI \-N " number-of-inodes"
|
1999-01-05 15:25:06 +08: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
|
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-22 03:56:34 +08:00
|
|
|
the
|
|
|
|
.I bytes-per-inode
|
|
|
|
ratio). This allows the user to specify the number
|
1999-01-05 15:25:06 +08:00
|
|
|
of desired inodes directly.
|
|
|
|
.TP
|
2001-04-22 11:58:32 +08:00
|
|
|
.BI \-o " creator-os"
|
1997-04-29 22:53:37 +08:00
|
|
|
Manually override the default value of the "creator os" field of the
|
|
|
|
filesystem. Normally the creator field is set by default to the native OS
|
1997-05-09 11:06:31 +08:00
|
|
|
of the
|
|
|
|
.B mke2fs
|
|
|
|
executable.
|
1997-04-29 22:53:37 +08:00
|
|
|
.TP
|
2001-05-14 12:12:27 +08:00
|
|
|
.B "\-O \fIfeature\fR[,...]"
|
2004-04-13 08:36:35 +08:00
|
|
|
Create filesystem with given features (filesystem options), overriding
|
2004-04-12 04:47:25 +08:00
|
|
|
the default filesystem options.
|
2001-04-22 11:58:32 +08:00
|
|
|
Currently, the
|
|
|
|
.B sparse_super
|
|
|
|
and
|
|
|
|
.B filetype
|
2002-07-02 22:08:27 +08:00
|
|
|
features are turned on by default when
|
1997-05-09 11:06:31 +08:00
|
|
|
.B mke2fs
|
2002-07-02 22:08:27 +08:00
|
|
|
is run on a system with Linux 2.2 or later (unless creator-os is set to
|
|
|
|
the Hurd). Filesystems that may need to be mounted on pre-2.2 Linux or
|
|
|
|
other kernels should be created with
|
2001-04-22 11:58:32 +08:00
|
|
|
.B "\-O none"
|
|
|
|
(or
|
|
|
|
.B "\-r 0"
|
2002-07-02 22:08:27 +08:00
|
|
|
for Linux 1.2) which will disable these features, even if
|
2001-04-22 11:58:32 +08:00
|
|
|
.B mke2fs
|
|
|
|
is run on a system which can support them.
|
|
|
|
.sp
|
|
|
|
The following filesystem options are supported:
|
|
|
|
.RS 1.2i
|
1997-04-26 22:48:50 +08:00
|
|
|
.TP
|
2003-04-12 01:32:31 +08:00
|
|
|
.B dir_index
|
|
|
|
Use hashed b-trees to speed up lookups in large directories.
|
1997-04-26 21:34:30 +08:00
|
|
|
.TP
|
2001-04-22 11:58:32 +08:00
|
|
|
.B filetype
|
|
|
|
Store file type information in directory entries.
|
1997-04-29 22:53:37 +08:00
|
|
|
.TP
|
2001-04-22 11:58:32 +08:00
|
|
|
.B has_journal
|
|
|
|
Create an ext3 journal (as if using the
|
|
|
|
.B \-j
|
|
|
|
option).
|
|
|
|
@JDEV@.TP
|
2001-05-14 12:12:27 +08:00
|
|
|
@JDEV@.B journal_dev
|
2001-04-22 11:58:32 +08:00
|
|
|
@JDEV@Create an external ext3 journal on the given device
|
2001-05-14 12:12:27 +08:00
|
|
|
@JDEV@instead of a regular ext2 filesystem.
|
|
|
|
@JDEV@Note that
|
|
|
|
@JDEV@.I external-journal
|
|
|
|
@JDEV@must be created with the same
|
|
|
|
@JDEV@block size as the filesystems that will be using it.
|
2003-04-12 01:32:31 +08:00
|
|
|
.TP
|
|
|
|
.B sparse_super
|
|
|
|
Create a filesystem with fewer superblock backup copies
|
|
|
|
(saves space on large filesystems).
|
2001-04-22 11:58:32 +08:00
|
|
|
.RE
|
1997-04-29 22:53:37 +08:00
|
|
|
.TP
|
2001-05-14 12:12:27 +08:00
|
|
|
.B \-q
|
|
|
|
Quiet execution. Useful if
|
|
|
|
.B mke2fs
|
|
|
|
is run in a script.
|
|
|
|
.TP
|
2001-04-22 11:58:32 +08:00
|
|
|
.BI \-r " revision"
|
1997-04-30 05:26:48 +08:00
|
|
|
Set the filesystem revision for the new filesystem. Note that 1.2
|
2001-04-22 11:58:32 +08:00
|
|
|
kernels only support revision 0 filesystems. The default is to
|
|
|
|
create revision 1 filesystems.
|
1997-04-30 05:26:48 +08: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-22 03:56:34 +08:00
|
|
|
.B \-S
|
1997-04-26 21:34:30 +08:00
|
|
|
Write superblock and group descriptors only. This is useful if all of
|
|
|
|
the superblock and backup superblocks are corrupted, and a last-ditch
|
1997-05-09 11:06:31 +08:00
|
|
|
recovery method is desired. It causes
|
|
|
|
.B mke2fs
|
|
|
|
to reinitialize the
|
1997-04-26 21:34:30 +08: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 11:58:32 +08: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 12:12:27 +08: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 13:11:14 +08: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-22 03:56:34 +08:00
|
|
|
.BI \-T " fs-type"
|
1999-07-19 23:30:21 +08:00
|
|
|
Specify how the filesystem is going to be used, so that mke2fs can
|
2001-04-22 11:58:32 +08:00
|
|
|
chose optimal filesystem parameters for that use. The supported
|
|
|
|
filesystem types are:
|
|
|
|
.RS 1.2i
|
|
|
|
.TP 1.2i
|
|
|
|
news
|
|
|
|
one inode per 4kb block
|
|
|
|
.TP
|
|
|
|
largefile
|
|
|
|
one inode per megabyte
|
|
|
|
.TP
|
|
|
|
largefile4
|
|
|
|
one inode per 4 megabytes
|
|
|
|
.RE
|
|
|
|
.TP
|
|
|
|
.B \-v
|
|
|
|
Verbose execution.
|
1999-07-19 23:30:21 +08: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-22 03:56:34 +08:00
|
|
|
.B \-V
|
1999-07-19 23:30:21 +08: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 13:11:14 +08:00
|
|
|
.B mke2fs
|
|
|
|
and exit.
|
1997-04-26 21:21:57 +08:00
|
|
|
.SH AUTHOR
|
|
|
|
This version of
|
|
|
|
.B mke2fs
|
1997-04-26 22:00:26 +08:00
|
|
|
has been written by Theodore Ts'o <tytso@mit.edu>.
|
1997-04-26 21:21:57 +08: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-22 03:56:34 +08:00
|
|
|
accepts the
|
|
|
|
.B \-f
|
|
|
|
option but currently ignores it because the second
|
1997-04-26 21:21:57 +08:00
|
|
|
extended file system does not support fragments yet.
|
|
|
|
.br
|
2001-04-22 11:58:32 +08:00
|
|
|
There may be other ones. Please, report them to the author.
|
1997-04-26 21:21:57 +08:00
|
|
|
.SH AVAILABILITY
|
|
|
|
.B mke2fs
|
2001-05-12 23:49:17 +08:00
|
|
|
is part of the e2fsprogs package and is available from
|
2001-05-03 22:43:43 +08:00
|
|
|
http://e2fsprogs.sourceforge.net.
|
1997-04-26 21:21:57 +08:00
|
|
|
.SH SEE ALSO
|
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 23:40:18 +08:00
|
|
|
.BR badblocks (8),
|
1997-04-26 21:21:57 +08:00
|
|
|
.BR dumpe2fs (8),
|
|
|
|
.BR e2fsck (8),
|
|
|
|
.BR tune2fs (8)
|