Whamcloud - gitweb
ChangeLog, mke2fs.c:
[tools/e2fsprogs.git] / misc / mke2fs.8.in
1 .\" -*- nroff -*-
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 .\" 
5 .TH MKE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
6 .SH NAME
7 mke2fs \- create a Linux second extended file system
8 .SH SYNOPSIS
9 .B mke2fs
10 [
11 .B \-c
12
13 .\" .B \-t
14 .\" .I test
15 .\" |
16 .B \-l
17 .I filename
18 ]
19 [
20 .B \-b
21 .I block-size
22 ]
23 [
24 .B \-f
25 .I fragment-size
26 ]
27 [
28 .B \-i
29 .I bytes-per-inode
30 ]
31 [
32 .B \-N
33 .I number-of-inodes
34 ]
35 [
36 .B -n
37 ]
38 [
39 .B \-m
40 .I reserved-blocks-percentage
41 ]
42 [
43 .B \-o
44 .I creator-os
45 ]
46 [
47 .B \-O 
48 .IR feature [,...]
49 ]
50 [
51 .B \-q
52 ]
53 [
54 .B \-r
55 .I fs-revision-level
56 ]
57 [
58 .B \-R
59 .I raid_options
60 ]
61 [
62 .B \-s
63 .I sparse-super-flag
64 ]
65 [
66 .B \-v
67 ]
68 [
69 .B \-F
70 ]
71 [
72 .B \-L
73 .I volume-label
74 ]
75 [
76 .B \-M
77 .I last-mounted-directory
78 ]
79 [
80 .B \-S
81 ]
82 [
83 .B \-T
84 .I filesystem-type
85 ]
86 [
87 .B \-V
88 ]
89 .I device
90 [
91 .I blocks-count
92 ]
93 .SH DESCRIPTION
94 .B mke2fs
95 is used to create a Linux second extended file system on a device (usually
96 a disk partition).
97 .I device
98 is the special file corresponding to the device (e.g 
99 .IR /dev/hdXX ).
100 .I blocks-count
101 is the number of blocks on the device.  If omitted,
102 .B mke2fs
103 automagically figures the file system size.
104 .SH OPTIONS
105 .TP
106 .BI \-b " block-size"
107 Specify the size of blocks in bytes.  Valid block size vales are 1024, 
108 2048 and 4096 bytes per block.  If omitted,
109 .B mke2fs
110 block-size is determined by the file system size and the expected usage
111 of the filesystem (see the
112 .B \-T
113 option).
114 .TP
115 .B \-c
116 Check the device for bad blocks before creating the file system, using a
117 fast read-only test.
118 .TP
119 .BI \-f " fragment-size"
120 Specify the size of fragments in bytes.
121 .TP
122 .BI \-i " bytes-per-inode"
123 Specify the bytes/inode ratio. 
124 .B mke2fs
125 creates an inode for every
126 .I bytes-per-inode
127 bytes of space on the disk.  
128 The larger the 
129 .I bytes-per-inode
130 ratio, the fewer inodes will be created.
131 This value generally shouldn't be smaller than
132 the blocksize of the filesystem, since then too many inodes will be made.  
133 Be warned that is not possible to expand the number of inodes on a 
134 filesystem after it is created, so be careful decided the correct
135 value for this parameter. 
136 .TP
137 .B \-n
138 causes mke2fs to not actually create a filesystem, but display what it 
139 would do if it were to create a filesystem.
140 .TP
141 .BI \-N " number-of-inodes"
142 overrides the default calculation of the number of inodes that should be 
143 reserved for the filesystem (which is based on the number of blocks and 
144 the 
145 .I bytes-per-inode
146 ratio).  This allows the user to specify the number 
147 of desired inodes directly.
148 .TP
149 .BI \-O " feature\fR[,...]"
150 Create the filesystem with the listed set of features 
151 (filesystem options).  The following features are supported: 
152 .IR sparse_super ,
153 which cause the filesystem to use sparse superblocks, and
154 .IR filetype ,
155 which will cause the filesystem to store file type information in 
156 directory entries.   Currently, both features are turned on by default
157 unless 
158 .B mke2fs
159 is run on a system with a pre-2.2 Linux kernel.
160 .B Warning:
161 Pre-2.2 Linux kernels do not properly 
162 support the filesystems that use either of these two features.   Filesystems 
163 that may need to mounted on pre-2.2 kernels should be created with 
164 .B -O
165 .I none
166 which will disable both of these features, even if 
167 .B mke2fs 
168 is run on a system which can support these features.
169 .TP
170 .BI \-l " filename"
171 Read the bad blocks list from
172 .I filename.
173 \.
174 .TP
175 .BI -m " reserved-blocks-percentage"
176 Specify the percentage of reserved blocks for the super-user.  This value
177 defaults to 5%.
178 .\" .TP
179 .\" .BI \-t " test"
180 .\" Check the device for bad blocks before creating the file system
181 .\" using the specified test.
182 .TP
183 .B \-o
184 Manually override the default value of the "creator os" field of the 
185 filesystem.  Normally the creator field is set by default to the native OS
186 of the
187 .B mke2fs
188 executable.
189 .TP
190 .B \-q
191 Quiet execution.  Useful if 
192 .B mke2fs
193 is run in a script.
194 .TP
195 .BI \-s " sparse-super-flag"
196 If 
197 .I sparse-super-flag
198 is 1, then turn on the sparse superblock flag in the superblock.  
199 .B Note:
200 This option is deprecated; use the 
201 .B \-O
202 option instead.
203 .TP
204 .B \-v
205 Verbose execution.
206 .TP
207 .B \-F
208 Force 
209 .B mke2fs
210 to run, even if the specified device is not a 
211 block special device, or appears to be mounted.
212 .TP
213 .B \-L
214 Set the volume label for the filesystem.
215 .TP
216 .B \-M
217 Set the last mounted directory for the filesystem.  This might be useful 
218 for the sake of utilities that key off of the last mounted directory to 
219 determine where the filesytem should be mounted.
220 .TP
221 .BI -r " revision"
222 Set the filesystem revision for the new filesystem.  Note that 1.2
223 kernels only support revision 0 filesystems.
224 .TP
225 .BI \-R " raid_options"
226 Set raid-related options for the filesystem.  Raid options are comma
227 separated, and may take an argument using the equals ('=')  sign.
228 Currently the only supported argument is 
229 .I stride
230 which takes as its argument the number of blocks in a RAID stripe.
231 .TP
232 .B \-S
233 Write superblock and group descriptors only.  This is useful if all of
234 the superblock and backup superblocks are corrupted, and a last-ditch
235 recovery method is desired.  It causes 
236 .B mke2fs
237 to reinitialize the 
238 superblock and group descriptors, while not touching the inode table
239 and the block and inode bitmaps.  The
240 .B e2fsck
241 program should be run immediately after this option is used, and there
242 is no guarantee that any data will be salvageable.
243 .TP
244 .BI \-T " fs-type"
245 Specify how the filesystem is going to be used, so that mke2fs can 
246 automatically determine the optimal filesystem parameters.  The only
247 filesystem type which is currently supported is "news".
248 .TP
249 .B \-V
250 Print the version number of 
251 .B mke2fs
252 and exit.
253 .SH AUTHOR
254 This version of
255 .B mke2fs
256 has been written by Theodore Ts'o <tytso@mit.edu>.
257 .SH BUGS
258 .B mke2fs
259 accepts the
260 .B \-f
261 option but currently ignores it because the second
262 extended file system does not support fragments yet.
263 .br
264 There may be some other ones.  Please, report them to the author.
265 .SH AVAILABILITY
266 .B mke2fs
267 is part of the e2fsprogs package and is available for anonymous 
268 ftp from tsx-11.mit.edu in /pub/linux/packages/ext2fs.
269 .SH SEE ALSO
270 .BR badblocks (8),
271 .BR dumpe2fs (8),
272 .BR e2fsck (8),
273 .BR tune2fs (8)