Whamcloud - gitweb
ChangeLog, e2fsck.h, pass1.c, pass2.c, pass4.c, swapfs.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 .\" 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 \-m
37 .I reserved-blocks-percentage
38 ]
39 [
40 .B \-o
41 .I creator-os
42 ]
43 [
44 .B \-q
45 ]
46 [
47 .B \-r fs-revision-level
48 ]
49 [
50 .B -R raid_options
51 ]
52 [
53 .B -s sparse-super-flag
54 ]
55 [
56 .B \-v
57 ]
58 [
59 .B \-F
60 ]
61 [
62 .B \-L
63 .I volume-label
64 ]
65 [
66 .B \-M
67 .I last-mounted-directory
68 ]
69 [
70 .B \-S
71 ]
72 [
73 .B \-V
74 ]
75 .I device
76 [
77 .I blocks-count
78 ]
79 .SH DESCRIPTION
80 .B mke2fs
81 is used to create a Linux second extended file system on a device (usually
82 a disk partition).
83 .br
84 .I device
85 is the special file corresponding to the device (e.g /dev/hdXX).
86 .br
87 .I blocks-count
88 is the number of blocks on the device.  If omitted,
89 .B mke2fs
90 automagically figures the file system size.
91 .SH OPTIONS
92 .TP
93 .I -b block-size
94 Specify the size of blocks in bytes.
95 .TP
96 .I -c
97 Check the device for bad blocks before creating the file system, using a
98 fast read-only test.
99 .TP
100 .I -f fragment-size
101 Specify the size of fragments in bytes.
102 .TP
103 .I -i bytes-per-inode
104 Specify the bytes/inode ratio. 
105 .B mke2fs
106 creates an inode for every
107 .I bytes-per-inode
108 bytes of space on the disk.  This value defaults to 4096 bytes.
109 .I bytes-per-inode
110 must be at least 1024.
111 .TP
112 .I -N number-of-inodes
113 overrides the default calculation of the number of inodes that should be 
114 reserved for the filesystem (which is based on the number of blocks and 
115 the bytes-per-inode ratio).  This allows the user to specify the number 
116 of desired inodes directly.
117 .TP
118 .I -l filename
119 Read the bad blocks list from
120 .I filename.
121 \.
122 .TP
123 .I -m reserved-blocks-percentage
124 Specify the percentage of reserved blocks for the super-user.  This value
125 defaults to 5%.
126 .\" .TP
127 .\" .I -t test
128 .\" Check the device for bad blocks before creating the file system
129 .\" using the specified test.
130 .TP
131 .I -o
132 Manually override the default value of the "creator os" field of the 
133 filesystem.  Normally the creator field is set by default to the native OS
134 of the
135 .B mke2fs
136 executable.
137 .TP
138 .I -q
139 Quiet execution.  Useful if 
140 .B mke2fs
141 is run in a script.
142 .TP
143 .I -s sparse-super-flag
144 If sparse-super-flag is 1, then turn on the sparse superblock flag.  
145 If 0, then turn off the sparse superblock flag.  (Currently, the sparse 
146 superblock flag defaults to off.)  
147 .B Warning:
148 The Linux 2.0 kernel does not properly support this feature.  Neither do
149 all Linux 2.1 kernels; please don't use this unless you know what you're
150 doing!
151 .TP
152 .I -v
153 Verbose execution.
154 .TP
155 .I -F
156 Force 
157 .B mke2fs
158 to run, even if the specified device is not a 
159 block special device.
160 .TP
161 .I -L
162 Set the volume label for the filesystem.
163 .TP
164 .I -M
165 Set the last mounted directory for the filesystem.  This might be useful 
166 for the sake of utilities that key off of the last mounted directory to 
167 determine where the filesytem should be mounted.
168 .TP
169 .I -r revision
170 Set the filesystem revision for the new filesystem.  Note that 1.2
171 kernels only support revision 0 filesystems.
172 .TP
173 .I -R raid_options
174 Set raid-related options for the filesystem.  Raid options are comma
175 separated, and may take an argument using the equals ('=')  sign.
176 Currently the only supported argument is 
177 .I stride
178 which takes as its argument the number of blocks in a RAID stripe.
179 .TP
180 .I -S
181 Write superblock and group descriptors only.  This is useful if all of
182 the superblock and backup superblocks are corrupted, and a last-ditch
183 recovery method is desired.  It causes 
184 .B mke2fs
185 to reinitialize the 
186 superblock and group descriptors, while not touching the inode table
187 and the block and inode bitmaps.  The
188 .B e2fsck
189 program should be run immediately after this option is used, and there
190 is no guarantee that any data will be salvageable.
191 .TP
192 .I -V
193 print the version number of 
194 .B mke2fs
195 and exit.
196 .SH AUTHOR
197 This version of
198 .B mke2fs
199 has been written by Theodore Ts'o <tytso@mit.edu>.
200 .SH BUGS
201 .B mke2fs
202 accepts the -f option but currently ignores it because the second
203 extended file system does not support fragments yet.
204 .br
205 There may be some other ones.  Please, report them to the author.
206 .SH AVAILABILITY
207 .B mke2fs
208 is part of the e2fsprogs package and is available for anonymous 
209 ftp from tsx-11.mit.edu in /pub/linux/packages/ext2fs.
210 .SH SEE ALSO
211 .BR badblocks (8),
212 .BR dumpe2fs (8),
213 .BR e2fsck (8),
214 .BR tune2fs (8)