Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 1 | .\" -*- nroff -*- |
Theodore Ts'o | a418d3a | 1997-04-26 14:00:26 +0000 | [diff] [blame] | 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. |
| 4 | .\" |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 5 | .TH MKE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@" |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 6 | .SH NAME |
Theodore Ts'o | a7ac1df | 2003-08-24 17:56:41 -0400 | [diff] [blame] | 7 | mke2fs \- create an ext2/ext3 filesystem |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 8 | .SH SYNOPSIS |
| 9 | .B mke2fs |
| 10 | [ |
| 11 | .B \-c |
| 12 | | |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 13 | .B \-l |
Theodore Ts'o | 1e3472c | 1997-04-29 14:53:37 +0000 | [diff] [blame] | 14 | .I filename |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 15 | ] |
| 16 | [ |
| 17 | .B \-b |
Theodore Ts'o | 1e3472c | 1997-04-29 14:53:37 +0000 | [diff] [blame] | 18 | .I block-size |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 19 | ] |
| 20 | [ |
| 21 | .B \-f |
Theodore Ts'o | 1e3472c | 1997-04-29 14:53:37 +0000 | [diff] [blame] | 22 | .I fragment-size |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 23 | ] |
| 24 | [ |
Theodore Ts'o | 5e05541 | 2003-04-11 14:00:53 -0400 | [diff] [blame] | 25 | .B \-g |
| 26 | .I blocks-per-group |
| 27 | ] |
| 28 | [ |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 29 | .B \-i |
Theodore Ts'o | 1e3472c | 1997-04-29 14:53:37 +0000 | [diff] [blame] | 30 | .I bytes-per-inode |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 31 | ] |
| 32 | [ |
Theodore Ts'o | 85ef4ae | 2000-10-24 19:33:45 +0000 | [diff] [blame] | 33 | .B \-j |
Theodore Ts'o | dc2ec52 | 2001-01-18 01:51:15 +0000 | [diff] [blame] | 34 | ] |
| 35 | [ |
| 36 | .B \-J |
Theodore Ts'o | 8ddaa66 | 2000-11-17 04:55:24 +0000 | [diff] [blame] | 37 | .I journal-options |
Theodore Ts'o | 85ef4ae | 2000-10-24 19:33:45 +0000 | [diff] [blame] | 38 | ] |
| 39 | [ |
Theodore Ts'o | 5515e6b | 1999-01-05 07:25:06 +0000 | [diff] [blame] | 40 | .B \-N |
| 41 | .I number-of-inodes |
| 42 | ] |
| 43 | [ |
Theodore Ts'o | 2740156 | 1999-09-14 20:11:19 +0000 | [diff] [blame] | 44 | .B -n |
| 45 | ] |
| 46 | [ |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 47 | .B \-m |
Theodore Ts'o | 1e3472c | 1997-04-29 14:53:37 +0000 | [diff] [blame] | 48 | .I reserved-blocks-percentage |
| 49 | ] |
| 50 | [ |
| 51 | .B \-o |
| 52 | .I creator-os |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 53 | ] |
| 54 | [ |
Theodore Ts'o | 896938d | 1999-10-23 01:04:50 +0000 | [diff] [blame] | 55 | .B \-O |
| 56 | .IR feature [,...] |
| 57 | ] |
| 58 | [ |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 59 | .B \-q |
| 60 | ] |
| 61 | [ |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 62 | .B \-r |
| 63 | .I fs-revision-level |
Theodore Ts'o | a29f4d3 | 1997-04-29 21:26:48 +0000 | [diff] [blame] | 64 | ] |
| 65 | [ |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 66 | .B \-R |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 67 | .I raid-options |
Theodore Ts'o | 521e368 | 1997-04-29 17:48:10 +0000 | [diff] [blame] | 68 | ] |
| 69 | [ |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 70 | .B \-v |
| 71 | ] |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 72 | [ |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 73 | .B \-F |
| 74 | ] |
| 75 | [ |
Theodore Ts'o | 1e3472c | 1997-04-29 14:53:37 +0000 | [diff] [blame] | 76 | .B \-L |
| 77 | .I volume-label |
| 78 | ] |
| 79 | [ |
| 80 | .B \-M |
| 81 | .I last-mounted-directory |
| 82 | ] |
| 83 | [ |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 84 | .B \-S |
| 85 | ] |
Theodore Ts'o | 818180c | 1998-06-27 05:11:14 +0000 | [diff] [blame] | 86 | [ |
Theodore Ts'o | 50787ea | 1999-07-19 15:30:21 +0000 | [diff] [blame] | 87 | .B \-T |
| 88 | .I filesystem-type |
| 89 | ] |
| 90 | [ |
Theodore Ts'o | 818180c | 1998-06-27 05:11:14 +0000 | [diff] [blame] | 91 | .B \-V |
| 92 | ] |
Theodore Ts'o | 1e3472c | 1997-04-29 14:53:37 +0000 | [diff] [blame] | 93 | .I device |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 94 | [ |
Theodore Ts'o | 1e3472c | 1997-04-29 14:53:37 +0000 | [diff] [blame] | 95 | .I blocks-count |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 96 | ] |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 97 | @JDEV@.sp |
Theodore Ts'o | 8d64174 | 2001-05-14 04:12:27 +0000 | [diff] [blame] | 98 | @JDEV@.B "mke2fs \-O journal_dev" |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 99 | @JDEV@[ |
| 100 | @JDEV@.B \-b |
| 101 | @JDEV@.I block-size |
| 102 | @JDEV@] |
Theodore Ts'o | 8d64174 | 2001-05-14 04:12:27 +0000 | [diff] [blame] | 103 | .\" No external-journal specific journal options yet (size is ignored) |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 104 | .\" @JDEV@[ |
| 105 | .\" @JDEV@.B \-J |
| 106 | .\" @JDEV@.I journal-options |
| 107 | .\" @JDEV@] |
| 108 | @JDEV@[ |
| 109 | @JDEV@.B \-L |
| 110 | @JDEV@.I volume-label |
| 111 | @JDEV@] |
| 112 | @JDEV@[ |
| 113 | @JDEV@.B \-n |
| 114 | @JDEV@] |
| 115 | @JDEV@[ |
| 116 | @JDEV@.B \-q |
| 117 | @JDEV@] |
| 118 | @JDEV@[ |
| 119 | @JDEV@.B \-v |
| 120 | @JDEV@] |
Theodore Ts'o | 8d64174 | 2001-05-14 04:12:27 +0000 | [diff] [blame] | 121 | @JDEV@.I external-journal |
Andreas Dilger | 2d15576 | 2001-08-17 03:48:11 -0600 | [diff] [blame] | 122 | @JDEV@[ |
| 123 | @JDEV@.I blocks-count |
| 124 | @JDEV@] |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 125 | .SH DESCRIPTION |
| 126 | .B mke2fs |
Theodore Ts'o | f0865ce | 2002-07-02 10:08:27 -0400 | [diff] [blame] | 127 | is used to create an ext2/ext3 filesystem (usually in a disk partition). |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 128 | .I device |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 129 | is the special file corresponding to the device (e.g |
| 130 | .IR /dev/hdXX ). |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 131 | .I blocks-count |
| 132 | is the number of blocks on the device. If omitted, |
| 133 | .B mke2fs |
Andreas Dilger | 0072f8d | 2002-02-25 23:11:26 -0700 | [diff] [blame] | 134 | automagically figures the file system size. If called as |
| 135 | .B mkfs.ext3 |
| 136 | a journal is created as if the |
| 137 | .B \-j |
| 138 | option was specified. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 139 | .SH OPTIONS |
| 140 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 141 | .BI \-b " block-size" |
Theodore Ts'o | 2740156 | 1999-09-14 20:11:19 +0000 | [diff] [blame] | 142 | Specify the size of blocks in bytes. Valid block size vales are 1024, |
Theodore Ts'o | 06968e7 | 1999-10-23 03:17:10 +0000 | [diff] [blame] | 143 | 2048 and 4096 bytes per block. If omitted, |
| 144 | .B mke2fs |
Theodore Ts'o | 6750877 | 2004-03-20 16:14:46 -0500 | [diff] [blame] | 145 | block-size is heuristically determined by the file system size and |
Theodore Ts'o | c5290fa | 2003-04-11 22:10:50 -0400 | [diff] [blame] | 146 | the expected usage of the filesystem (see the |
Theodore Ts'o | 06968e7 | 1999-10-23 03:17:10 +0000 | [diff] [blame] | 147 | .B \-T |
Theodore Ts'o | c5290fa | 2003-04-11 22:10:50 -0400 | [diff] [blame] | 148 | option). If |
| 149 | .I block-size |
Theodore Ts'o | 6750877 | 2004-03-20 16:14:46 -0500 | [diff] [blame] | 150 | is negative, then mke2fs will use heuristics to determine the |
Theodore Ts'o | c5290fa | 2003-04-11 22:10:50 -0400 | [diff] [blame] | 151 | appropriate block size, with the constraint that the block size will be |
| 152 | at least |
| 153 | .I block-size |
| 154 | bytes. This is useful for certain hardware devices which require that |
| 155 | the blocksize be a multiple of 2k. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 156 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 157 | .B \-c |
Theodore Ts'o | 3ed57c2 | 2001-12-24 15:01:59 -0500 | [diff] [blame] | 158 | Check the device for bad blocks before creating the file system. If |
| 159 | this option is specified twice, then a slower, destructive, read-write |
| 160 | test is used instead of a fast read-only test. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 161 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 162 | .BI \-f " fragment-size" |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 163 | Specify the size of fragments in bytes. |
| 164 | .TP |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 165 | .B \-F |
| 166 | Force |
| 167 | .B mke2fs |
| 168 | to run, even if the specified device is not a |
| 169 | block special device, or appears to be mounted. |
| 170 | .TP |
Theodore Ts'o | 5e05541 | 2003-04-11 14:00:53 -0400 | [diff] [blame] | 171 | .BI \-g " blocks-per-group" |
| 172 | Specify the number of blocks in a block group. There is generally no |
| 173 | reason the user to ever set this parameter, as the default is optimal |
| 174 | for the filesystem. (For administrators who are creating |
| 175 | filesystems on RAID arrays, it is preferable to use the |
| 176 | .I stride |
| 177 | RAID parameter as part of the |
| 178 | .B \-R |
| 179 | option rather than manipulating the number of blocks per group.) |
| 180 | This option is generally used by developers who |
| 181 | are developing test cases. |
| 182 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 183 | .BI \-i " bytes-per-inode" |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 184 | Specify the bytes/inode ratio. |
| 185 | .B mke2fs |
| 186 | creates an inode for every |
| 187 | .I bytes-per-inode |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 188 | bytes of space on the disk. The larger the |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 189 | .I bytes-per-inode |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 190 | ratio, the fewer inodes will be created. This value generally shouldn't |
| 191 | be smaller than the blocksize of the filesystem, since then too many |
| 192 | inodes will be made. Be warned that is not possible to expand the number |
| 193 | of inodes on a filesystem after it is created, so be careful deciding the |
| 194 | correct value for this parameter. |
Theodore Ts'o | dc2ec52 | 2001-01-18 01:51:15 +0000 | [diff] [blame] | 195 | .TP |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 196 | .B \-j |
| 197 | Create the filesystem with an ext3 journal. If the |
Theodore Ts'o | dc2ec52 | 2001-01-18 01:51:15 +0000 | [diff] [blame] | 198 | .B \-J |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 199 | option is not specified, the default journal parameters will be used to |
| 200 | create an appropriately sized journal (given the size of the filesystem) |
| 201 | stored within the filesystem. Note that you must be using a kernel |
| 202 | which has ext3 support in order to actually make use of the journal. |
Theodore Ts'o | dc2ec52 | 2001-01-18 01:51:15 +0000 | [diff] [blame] | 203 | .TP |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 204 | .BI \-J " journal-options" |
Theodore Ts'o | dc2ec52 | 2001-01-18 01:51:15 +0000 | [diff] [blame] | 205 | Create the ext3 journal using options specified on the command-line. |
Theodore Ts'o | 8ddaa66 | 2000-11-17 04:55:24 +0000 | [diff] [blame] | 206 | Journal options are comma |
| 207 | separated, and may take an argument using the equals ('=') sign. |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 208 | The following journal options are supported: |
| 209 | .RS 1.2i |
Theodore Ts'o | dc2ec52 | 2001-01-18 01:51:15 +0000 | [diff] [blame] | 210 | .TP |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 211 | .BI size= journal-size |
Theodore Ts'o | f0865ce | 2002-07-02 10:08:27 -0400 | [diff] [blame] | 212 | Create an internal journal (i.e., stored inside the filesystem) of size |
Theodore Ts'o | 8d64174 | 2001-05-14 04:12:27 +0000 | [diff] [blame] | 213 | .I journal-size |
| 214 | megabytes. |
Theodore Ts'o | 2537b6d | 2001-03-26 20:07:13 +0000 | [diff] [blame] | 215 | The size of the journal must be at least 1024 filesystem blocks |
| 216 | (i.e., 1MB if using 1k blocks, 4MB if using 4k blocks, etc.) |
Theodore Ts'o | 8d64174 | 2001-05-14 04:12:27 +0000 | [diff] [blame] | 217 | and may be no more than 102,400 filesystem blocks. |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 218 | @JDEV@.TP |
| 219 | @JDEV@.BI device= external-journal |
Theodore Ts'o | 8d64174 | 2001-05-14 04:12:27 +0000 | [diff] [blame] | 220 | @JDEV@Attach the filesystem to the journal block device located on |
| 221 | @JDEV@.IR external-journal . |
| 222 | @JDEV@The external |
| 223 | @JDEV@journal must already have been created using the command |
| 224 | @JDEV@.IP |
Andreas Dilger | 2d15576 | 2001-08-17 03:48:11 -0600 | [diff] [blame] | 225 | @JDEV@.B mke2fs -O journal_dev |
| 226 | @JDEV@.I external-journal |
Theodore Ts'o | 8d64174 | 2001-05-14 04:12:27 +0000 | [diff] [blame] | 227 | @JDEV@.IP |
| 228 | @JDEV@Note that |
| 229 | @JDEV@.I external-journal |
| 230 | @JDEV@must have been created with the |
| 231 | @JDEV@same block size as the new filesystem. |
Andreas Dilger | 2d15576 | 2001-08-17 03:48:11 -0600 | [diff] [blame] | 232 | @JDEV@.IP |
| 233 | @JDEV@Instead of specifying a device name directly, |
| 234 | @JDEV@.I external-journal |
| 235 | @JDEV@can also be specified by either |
| 236 | @JDEV@.BI LABEL= label |
| 237 | @JDEV@or |
| 238 | @JDEV@.BI UUID= UUID |
| 239 | @JDEV@to locate the external journal by either the volume label or UUID |
| 240 | @JDEV@stored in the ext2 superblock at the start of the journal. Use |
| 241 | @JDEV@.BR dumpe2fs (8) |
| 242 | @JDEV@to display a journal device's volume label and UUID. See also the |
| 243 | @JDEV@.B -L |
| 244 | @JDEV@option of |
| 245 | @JDEV@.BR tune2fs (8). |
Theodore Ts'o | 8d64174 | 2001-05-14 04:12:27 +0000 | [diff] [blame] | 246 | .RE |
| 247 | @JDEV@.IP |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 248 | @JDEV@Only one of the |
| 249 | @JDEV@.BR size " or " device |
| 250 | @JDEV@options can be given for a filesystem. |
Theodore Ts'o | dc2ec52 | 2001-01-18 01:51:15 +0000 | [diff] [blame] | 251 | .TP |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 252 | .BI \-l " filename" |
| 253 | Read the bad blocks list from |
Theodore Ts'o | 3ed57c2 | 2001-12-24 15:01:59 -0500 | [diff] [blame] | 254 | .IR filename . |
| 255 | Note that the block numbers in the bad block list must be generated |
| 256 | using the same block size as used by mke2fs. As a result, the |
| 257 | .B \-c |
| 258 | option to |
| 259 | .B mke2fs |
| 260 | is a much simpler and less error-prone method of checking a disk for bad |
| 261 | blocks before formatting it, as |
| 262 | .B mke2fs |
| 263 | will automatically pass the correct parameters to the |
| 264 | .B badblocks |
| 265 | program. |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 266 | .TP |
| 267 | .B \-L |
| 268 | Set the volume label for the filesystem. |
| 269 | .TP |
| 270 | .BI \-m " reserved-blocks-percentage" |
| 271 | Specify the percentage of the filesystem blocks reserved for |
| 272 | the super-user. This value defaults to 5%. |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 273 | .TP |
| 274 | .B \-M |
| 275 | Set the last mounted directory for the filesystem. This might be useful |
| 276 | for the sake of utilities that key off of the last mounted directory to |
| 277 | determine where the filesytem should be mounted. |
Theodore Ts'o | 85ef4ae | 2000-10-24 19:33:45 +0000 | [diff] [blame] | 278 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 279 | .B \-n |
Theodore Ts'o | 1f22ce3 | 2002-08-17 18:16:29 -0400 | [diff] [blame] | 280 | causes mke2fs to not actually create a filesystem, but display what it |
| 281 | would do if it were to create a filesystem. This can be used to |
| 282 | determine the location of the backup superblocks for a particular |
| 283 | filesystem, so long as the mke2fs parameters that were passed when the |
| 284 | filesystem was originally created are used again. (With the |
| 285 | .B \-n |
| 286 | option added, of course!) |
Theodore Ts'o | 2740156 | 1999-09-14 20:11:19 +0000 | [diff] [blame] | 287 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 288 | .BI \-N " number-of-inodes" |
Theodore Ts'o | 5515e6b | 1999-01-05 07:25:06 +0000 | [diff] [blame] | 289 | overrides the default calculation of the number of inodes that should be |
| 290 | reserved for the filesystem (which is based on the number of blocks and |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 291 | the |
| 292 | .I bytes-per-inode |
| 293 | ratio). This allows the user to specify the number |
Theodore Ts'o | 5515e6b | 1999-01-05 07:25:06 +0000 | [diff] [blame] | 294 | of desired inodes directly. |
| 295 | .TP |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 296 | .BI \-o " creator-os" |
Theodore Ts'o | 1e3472c | 1997-04-29 14:53:37 +0000 | [diff] [blame] | 297 | Manually override the default value of the "creator os" field of the |
| 298 | filesystem. Normally the creator field is set by default to the native OS |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 299 | of the |
| 300 | .B mke2fs |
| 301 | executable. |
Theodore Ts'o | 1e3472c | 1997-04-29 14:53:37 +0000 | [diff] [blame] | 302 | .TP |
Theodore Ts'o | 8d64174 | 2001-05-14 04:12:27 +0000 | [diff] [blame] | 303 | .B "\-O \fIfeature\fR[,...]" |
Theodore Ts'o | e02bb6d | 2004-04-12 20:36:35 -0400 | [diff] [blame] | 304 | Create filesystem with given features (filesystem options), overriding |
Theodore Ts'o | 481d139 | 2004-04-11 16:47:25 -0400 | [diff] [blame] | 305 | the default filesystem options. |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 306 | Currently, the |
| 307 | .B sparse_super |
| 308 | and |
| 309 | .B filetype |
Theodore Ts'o | f0865ce | 2002-07-02 10:08:27 -0400 | [diff] [blame] | 310 | features are turned on by default when |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 311 | .B mke2fs |
Theodore Ts'o | f0865ce | 2002-07-02 10:08:27 -0400 | [diff] [blame] | 312 | is run on a system with Linux 2.2 or later (unless creator-os is set to |
| 313 | the Hurd). Filesystems that may need to be mounted on pre-2.2 Linux or |
| 314 | other kernels should be created with |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 315 | .B "\-O none" |
| 316 | (or |
| 317 | .B "\-r 0" |
Theodore Ts'o | f0865ce | 2002-07-02 10:08:27 -0400 | [diff] [blame] | 318 | for Linux 1.2) which will disable these features, even if |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 319 | .B mke2fs |
| 320 | is run on a system which can support them. |
| 321 | .sp |
| 322 | The following filesystem options are supported: |
| 323 | .RS 1.2i |
| 324 | .TP |
Theodore Ts'o | ccbed85 | 2003-04-11 13:32:31 -0400 | [diff] [blame] | 325 | .B dir_index |
| 326 | Use hashed b-trees to speed up lookups in large directories. |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 327 | .TP |
| 328 | .B filetype |
| 329 | Store file type information in directory entries. |
| 330 | .TP |
| 331 | .B has_journal |
| 332 | Create an ext3 journal (as if using the |
| 333 | .B \-j |
| 334 | option). |
| 335 | @JDEV@.TP |
Theodore Ts'o | 8d64174 | 2001-05-14 04:12:27 +0000 | [diff] [blame] | 336 | @JDEV@.B journal_dev |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 337 | @JDEV@Create an external ext3 journal on the given device |
Theodore Ts'o | 8d64174 | 2001-05-14 04:12:27 +0000 | [diff] [blame] | 338 | @JDEV@instead of a regular ext2 filesystem. |
| 339 | @JDEV@Note that |
| 340 | @JDEV@.I external-journal |
| 341 | @JDEV@must be created with the same |
| 342 | @JDEV@block size as the filesystems that will be using it. |
Theodore Ts'o | ccbed85 | 2003-04-11 13:32:31 -0400 | [diff] [blame] | 343 | .TP |
| 344 | .B sparse_super |
| 345 | Create a filesystem with fewer superblock backup copies |
| 346 | (saves space on large filesystems). |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 347 | .RE |
| 348 | .TP |
Theodore Ts'o | 8d64174 | 2001-05-14 04:12:27 +0000 | [diff] [blame] | 349 | .B \-q |
| 350 | Quiet execution. Useful if |
| 351 | .B mke2fs |
| 352 | is run in a script. |
| 353 | .TP |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 354 | .BI \-r " revision" |
| 355 | Set the filesystem revision for the new filesystem. Note that 1.2 |
| 356 | kernels only support revision 0 filesystems. The default is to |
| 357 | create revision 1 filesystems. |
| 358 | .TP |
| 359 | .BI \-R " raid-options" |
| 360 | Set raid-related options for the filesystem. Raid options are comma |
Theodore Ts'o | 8d64174 | 2001-05-14 04:12:27 +0000 | [diff] [blame] | 361 | separated, and may take an argument using the equals ('=') sign. The |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 362 | following options are supported: |
| 363 | .RS 1.2i |
| 364 | .TP |
| 365 | .BI stride= stripe-size |
| 366 | Configure the filesystem for a RAID array with |
Theodore Ts'o | 8d64174 | 2001-05-14 04:12:27 +0000 | [diff] [blame] | 367 | .I stripe-size |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 368 | filesystem blocks per stripe. |
| 369 | .RE |
| 370 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 371 | .B \-S |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 372 | Write superblock and group descriptors only. This is useful if all of |
| 373 | the superblock and backup superblocks are corrupted, and a last-ditch |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 374 | recovery method is desired. It causes |
| 375 | .B mke2fs |
| 376 | to reinitialize the |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 377 | superblock and group descriptors, while not touching the inode table |
| 378 | and the block and inode bitmaps. The |
| 379 | .B e2fsck |
| 380 | program should be run immediately after this option is used, and there |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 381 | is no guarantee that any data will be salvageable. It is critical to |
| 382 | specify the correct filesystem blocksize when using this option, |
| 383 | or there is no chance of recovery. |
Theodore Ts'o | 8d64174 | 2001-05-14 04:12:27 +0000 | [diff] [blame] | 384 | .\" .TP |
| 385 | .\" .BI \-t " test" |
| 386 | .\" Check the device for bad blocks before creating the file system |
| 387 | .\" using the specified test. |
Theodore Ts'o | 818180c | 1998-06-27 05:11:14 +0000 | [diff] [blame] | 388 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 389 | .BI \-T " fs-type" |
Theodore Ts'o | 50787ea | 1999-07-19 15:30:21 +0000 | [diff] [blame] | 390 | Specify how the filesystem is going to be used, so that mke2fs can |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 391 | chose optimal filesystem parameters for that use. The supported |
| 392 | filesystem types are: |
| 393 | .RS 1.2i |
| 394 | .TP 1.2i |
| 395 | news |
| 396 | one inode per 4kb block |
| 397 | .TP |
| 398 | largefile |
| 399 | one inode per megabyte |
| 400 | .TP |
| 401 | largefile4 |
| 402 | one inode per 4 megabytes |
| 403 | .RE |
| 404 | .TP |
| 405 | .B \-v |
| 406 | Verbose execution. |
Theodore Ts'o | 50787ea | 1999-07-19 15:30:21 +0000 | [diff] [blame] | 407 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 408 | .B \-V |
Theodore Ts'o | 50787ea | 1999-07-19 15:30:21 +0000 | [diff] [blame] | 409 | Print the version number of |
Theodore Ts'o | 818180c | 1998-06-27 05:11:14 +0000 | [diff] [blame] | 410 | .B mke2fs |
| 411 | and exit. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 412 | .SH AUTHOR |
| 413 | This version of |
| 414 | .B mke2fs |
Theodore Ts'o | a418d3a | 1997-04-26 14:00:26 +0000 | [diff] [blame] | 415 | has been written by Theodore Ts'o <tytso@mit.edu>. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 416 | .SH BUGS |
| 417 | .B mke2fs |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 418 | accepts the |
| 419 | .B \-f |
| 420 | option but currently ignores it because the second |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 421 | extended file system does not support fragments yet. |
| 422 | .br |
Theodore Ts'o | 48015ce | 2001-04-22 03:58:32 +0000 | [diff] [blame] | 423 | There may be other ones. Please, report them to the author. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 424 | .SH AVAILABILITY |
| 425 | .B mke2fs |
Theodore Ts'o | 12da49c | 2001-05-12 15:49:17 +0000 | [diff] [blame] | 426 | is part of the e2fsprogs package and is available from |
Theodore Ts'o | 348e43d | 2001-05-03 14:43:43 +0000 | [diff] [blame] | 427 | http://e2fsprogs.sourceforge.net. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 428 | .SH SEE ALSO |
Theodore Ts'o | e72a9ba | 1999-06-25 15:40:18 +0000 | [diff] [blame] | 429 | .BR badblocks (8), |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 430 | .BR dumpe2fs (8), |
| 431 | .BR e2fsck (8), |
| 432 | .BR tune2fs (8) |