2 .\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved.
3 .\" This file may be copied under the terms of the GNU Public License.
5 .TH MKE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
7 mke2fs \- create a Linux second extended file system
44 .I reserved-blocks-percentage
77 .I last-mounted-directory
94 @JDEV@.B "mke2fs \-O journal-dev"
99 .\" No journal-device specific journal options yet (size is ignored)
102 .\" @JDEV@.I journal-options
106 @JDEV@.I volume-label
117 @JDEV@.I journal-device
120 is used to create a Linux second extended file system on a device (usually
123 is the special file corresponding to the device (e.g
126 is the number of blocks on the device. If omitted,
128 automagically figures the file system size.
131 .BI \-b " block-size"
132 Specify the size of blocks in bytes. Valid block size vales are 1024,
133 2048 and 4096 bytes per block. If omitted,
135 block-size is determined by the file system size and the expected usage
136 of the filesystem (see the
141 Check the device for bad blocks before creating the file system, using a
144 .BI \-f " fragment-size"
145 Specify the size of fragments in bytes.
150 to run, even if the specified device is not a
151 block special device, or appears to be mounted.
153 .BI \-i " bytes-per-inode"
154 Specify the bytes/inode ratio.
156 creates an inode for every
158 bytes of space on the disk. The larger the
160 ratio, the fewer inodes will be created. This value generally shouldn't
161 be smaller than the blocksize of the filesystem, since then too many
162 inodes will be made. Be warned that is not possible to expand the number
163 of inodes on a filesystem after it is created, so be careful deciding the
164 correct value for this parameter.
167 Create the filesystem with an ext3 journal. If the
169 option is not specified, the default journal parameters will be used to
170 create an appropriately sized journal (given the size of the filesystem)
171 stored within the filesystem. Note that you must be using a kernel
172 which has ext3 support in order to actually make use of the journal.
174 .BI \-J " journal-options"
175 Create the ext3 journal using options specified on the command-line.
176 Journal options are comma
177 separated, and may take an argument using the equals ('=') sign.
178 The following journal options are supported:
181 .BI size= journal-size
182 Create a journal stored in the filesystem of size
184 The size of the journal must be at least 1024 filesystem blocks
185 (i.e., 1MB if using 1k blocks, 4MB if using 4k blocks, etc.)
186 and may be no more than 10,240 filesystem blocks.
187 The journal must fit within the newly created filesystem.
189 @JDEV@.BI device= external-journal
190 @JDEV@Add an external journal found on a block device named by
191 @JDEV@.I external-journal
192 @JDEV@to the filesystem. The external
193 @JDEV@journal must have been already created using the command
195 @JDEV@.B mke2fs \-O journal-dev
196 @JDEV@.IR journal\-device
198 @JDEV@Only one of the
199 @JDEV@.BR size " or " device
200 @JDEV@options can be given for a filesystem.
204 Read the bad blocks list from
208 Set the volume label for the filesystem.
210 .BI \-m " reserved-blocks-percentage"
211 Specify the percentage of the filesystem blocks reserved for
212 the super-user. This value defaults to 5%.
215 .\" Check the device for bad blocks before creating the file system
216 .\" using the specified test.
219 Set the last mounted directory for the filesystem. This might be useful
220 for the sake of utilities that key off of the last mounted directory to
221 determine where the filesytem should be mounted.
224 causes mke2fs to not actually create a filesystem, but display what it
225 would do if it were to create a filesystem.
227 .BI \-N " number-of-inodes"
228 overrides the default calculation of the number of inodes that should be
229 reserved for the filesystem (which is based on the number of blocks and
232 ratio). This allows the user to specify the number
233 of desired inodes directly.
235 .BI \-o " creator-os"
236 Manually override the default value of the "creator os" field of the
237 filesystem. Normally the creator field is set by default to the native OS
242 .B \-O "\fIfeature\fR[,...]"
243 Create filesystem with given features (filesystem options).
248 features are turned on by default unless
250 is run on a system with a pre-2.2 Linux kernel.
253 Linux kernels before 2.0.39 and many 2.1 series kernels do not support
254 filesystems that use any of these features. Filesystems that
255 may need to mounted on pre-2.2 kernels should be created with the
259 for 1.2 kernels) which will disable these features, even if
261 is run on a system which can support them.
263 The following filesystem options are supported:
267 Create a filesystem with fewer superblock backup copies
268 (saves space on large filesystems).
271 Store file type information in directory entries.
274 Create an ext3 journal (as if using the
279 @JDEV@Create an external ext3 journal on the given device
280 @JDEV@instead of a regular ext2 filesystem. The external ext3
281 @JDEV@journal can be shared by multiple ext2 filesystems.
285 Set the filesystem revision for the new filesystem. Note that 1.2
286 kernels only support revision 0 filesystems. The default is to
287 create revision 1 filesystems.
289 .BI \-R " raid-options"
290 Set raid-related options for the filesystem. Raid options are comma
291 separated, and may take an argument using the equals ('=') sign. The
292 following options are supported:
295 .BI stride= stripe-size
296 Configure the filesystem for a RAID array with
298 filesystem blocks per stripe.
302 Quiet execution. Useful if
307 Write superblock and group descriptors only. This is useful if all of
308 the superblock and backup superblocks are corrupted, and a last-ditch
309 recovery method is desired. It causes
312 superblock and group descriptors, while not touching the inode table
313 and the block and inode bitmaps. The
315 program should be run immediately after this option is used, and there
316 is no guarantee that any data will be salvageable. It is critical to
317 specify the correct filesystem blocksize when using this option,
318 or there is no chance of recovery.
321 Specify how the filesystem is going to be used, so that mke2fs can
322 chose optimal filesystem parameters for that use. The supported
323 filesystem types are:
327 one inode per 4kb block
330 one inode per megabyte
333 one inode per 4 megabytes
340 Print the version number of
346 has been written by Theodore Ts'o <tytso@mit.edu>.
351 option but currently ignores it because the second
352 extended file system does not support fragments yet.
354 There may be other ones. Please, report them to the author.
357 is part of the e2fsprogs package and is available from
358 http://e2fsprogs.sourceforge.net.