]>
Commit | Line | Data |
---|---|---|
3839e657 TT |
1 | .\" Revision 1.0 93/06/3 23:00 chk |
2 | .\" Initial revision | |
3 | .\" | |
4 | .\" | |
74becf3c | 5 | .TH TUNE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@" |
3839e657 | 6 | .SH NAME |
4f858546 | 7 | tune2fs \- adjust tunable filesystem parameters on ext2/ext3/ext4 filesystems |
3839e657 TT |
8 | .SH SYNOPSIS |
9 | .B tune2fs | |
10 | [ | |
caf8ce4c | 11 | .B \-l |
f3db3566 TT |
12 | ] |
13 | [ | |
caf8ce4c | 14 | .B \-c |
f3db3566 TT |
15 | .I max-mount-counts |
16 | ] | |
17 | [ | |
caf8ce4c | 18 | .B \-e |
f3db3566 TT |
19 | .I errors-behavior |
20 | ] | |
21 | [ | |
177ab2be TT |
22 | .B \-f |
23 | ] | |
24 | [ | |
caf8ce4c | 25 | .B \-i |
f3db3566 TT |
26 | .I interval-between-checks |
27 | ] | |
28 | [ | |
bc8f1ae5 TT |
29 | .B \-I |
30 | .I new_inode_size | |
31 | ] | |
32 | [ | |
08dd830d | 33 | .B \-j |
dc2ec525 TT |
34 | ] |
35 | [ | |
36 | .B \-J | |
08dd830d TT |
37 | .I journal-options |
38 | ] | |
39 | [ | |
caf8ce4c | 40 | .B \-m |
f3db3566 TT |
41 | .I reserved-blocks-percentage |
42 | ] | |
a0c3fd5e TT |
43 | [ |
44 | .B \-o | |
c65e54b0 | 45 | .RI [^]mount-options [,...] |
a0c3fd5e | 46 | ] |
f3db3566 | 47 | [ |
bc8f1ae5 TT |
48 | .B \-p |
49 | .I mmp_update_interval | |
50 | ] | |
51 | [ | |
caf8ce4c | 52 | .B \-r |
f3db3566 TT |
53 | .I reserved-blocks-count |
54 | ] | |
55 | [ | |
caf8ce4c TT |
56 | .B \-s |
57 | .I sparse-super-flag | |
521e3685 TT |
58 | ] |
59 | [ | |
caf8ce4c | 60 | .B \-u |
f3db3566 TT |
61 | .I user |
62 | ] | |
63 | [ | |
caf8ce4c | 64 | .B \-g |
f3db3566 | 65 | .I group |
3839e657 | 66 | ] |
1e3472c5 | 67 | [ |
caf8ce4c | 68 | .B \-C |
1e3472c5 TT |
69 | .I mount-count |
70 | ] | |
71 | [ | |
6cb27404 TT |
72 | .B \-E |
73 | .I extended-options | |
74 | ] | |
75 | [ | |
caf8ce4c | 76 | .B \-L |
39460665 | 77 | .I volume-label |
1e3472c5 TT |
78 | ] |
79 | [ | |
caf8ce4c | 80 | .B \-M |
1e3472c5 TT |
81 | .I last-mounted-directory |
82 | ] | |
83 | [ | |
d04ad325 | 84 | .B \-O |
ce57f14f | 85 | .RI [^] feature [,...] |
896938d5 TT |
86 | ] |
87 | [ | |
771e8db9 AK |
88 | .B \-Q |
89 | .I quota-options | |
90 | ] | |
91 | [ | |
d4de4aa9 TT |
92 | .B \-T |
93 | .I time-last-checked | |
94 | ] | |
95 | [ | |
caf8ce4c | 96 | .B \-U |
1e3472c5 TT |
97 | .I UUID |
98 | ] | |
f7d05594 DW |
99 | [ |
100 | .B \-z | |
101 | .I undo_file | |
102 | ] | |
3839e657 TT |
103 | device |
104 | .SH DESCRIPTION | |
105 | .BI tune2fs | |
d04ad325 TT |
106 | allows the system administrator to adjust various tunable filesystem |
107 | parameters on Linux ext2, ext3, or ext4 filesystems. The current values | |
4f858546 | 108 | of these options can be displayed by using the |
c927bec1 TT |
109 | .B -l |
110 | option to | |
111 | .BR tune2fs (8) | |
112 | program, or by using the | |
113 | .BR dumpe2fs (8) | |
114 | program. | |
9946478a TT |
115 | .PP |
116 | The | |
117 | .I device | |
585545e1 | 118 | specifier can either be a filename (i.e., /dev/sda1), or a LABEL or UUID |
39460665 | 119 | specifier: "\fBLABEL=\fIvolume-label\fR" or "\fBUUID=\fIuuid\fR". (i.e., |
9946478a | 120 | LABEL=home or UUID=e40486c6-84d5-4f2f-b99c-032281799c9d). |
3839e657 TT |
121 | .SH OPTIONS |
122 | .TP | |
caf8ce4c | 123 | .BI \-c " max-mount-counts" |
d04ad325 TT |
124 | Adjust the number of mounts after which the filesystem will be checked by |
125 | .BR e2fsck (8). | |
e0f72cfd | 126 | If |
45d9e2ff | 127 | .I max-mount-counts |
d04ad325 | 128 | is 0 or \-1, the number of times the filesystem is mounted will be disregarded |
66cf2f60 TT |
129 | by |
130 | .BR e2fsck (8) | |
131 | and the kernel. | |
132 | .sp | |
133 | Staggering the mount-counts at which filesystems are forcibly | |
134 | checked will avoid all filesystems being checked at one time | |
135 | when using journaled filesystems. | |
136 | .sp | |
0e3b7032 ES |
137 | Mount-count-dependent checking is disabled by default to avoid |
138 | unanticipated long reboots while e2fsck does its work. However, | |
139 | you may wish to consider the consequences of disabling | |
66cf2f60 TT |
140 | mount-count-dependent checking entirely. Bad disk drives, cables, |
141 | memory, and kernel bugs could all corrupt a filesystem without | |
142 | marking the filesystem dirty or in error. If you are using | |
143 | journaling on your filesystem, your filesystem will | |
144 | .B never | |
145 | be marked dirty, so it will not normally be checked. A | |
146 | filesystem error detected by the kernel will still force | |
147 | an fsck on the next reboot, but it may already be too late | |
148 | to prevent data loss at that point. | |
149 | .sp | |
150 | See also the | |
151 | .B \-i | |
152 | option for time-dependent checking. | |
3839e657 | 153 | .TP |
ce57f14f TT |
154 | .BI \-C " mount-count" |
155 | Set the number of times the filesystem has been mounted. | |
e0f72cfd | 156 | If set to a greater value than the max-mount-counts parameter |
d04ad325 | 157 | set by the |
e0f72cfd TT |
158 | .B \-c |
159 | option, | |
d04ad325 | 160 | .BR e2fsck (8) |
e0f72cfd | 161 | will check the filesystem at the next reboot. |
ce57f14f | 162 | .TP |
caf8ce4c | 163 | .BI \-e " error-behavior" |
ce57f14f | 164 | Change the behavior of the kernel code when errors are detected. |
66cf2f60 TT |
165 | In all cases, a filesystem error will cause |
166 | .BR e2fsck (8) | |
167 | to check the filesystem on the next boot. | |
583ccdc3 TT |
168 | .I error-behavior |
169 | can be one of the following: | |
ce57f14f TT |
170 | .RS 1.2i |
171 | .TP 1.2i | |
172 | .B continue | |
173 | Continue normal execution. | |
174 | .TP | |
175 | .B remount-ro | |
176 | Remount filesystem read-only. | |
177 | .TP | |
178 | .B panic | |
179 | Cause a kernel panic. | |
180 | .RE | |
3839e657 | 181 | .TP |
6cb27404 TT |
182 | .BI \-E " extended-options" |
183 | Set extended options for the filesystem. Extended options are comma | |
0c17cb25 TT |
184 | separated, and may take an argument using the equals ('=') sign. |
185 | The following extended options are supported: | |
6cb27404 TT |
186 | .RS 1.2i |
187 | .TP | |
0f5eba75 AD |
188 | .B clear_mmp |
189 | Reset the MMP block (if any) back to the clean state. Use only if | |
190 | absolutely certain the device is not currently mounted or being | |
191 | fscked, or major filesystem corruption can result. Needs '-f'. | |
192 | .TP | |
193 | .BI mmp_update_interval= interval | |
194 | Adjust the initial MMP update interval to | |
195 | .I interval | |
196 | seconds. Specifying an | |
197 | .I interval | |
198 | of 0 means to use the default interval. The specified interval must | |
199 | be less than 300 seconds. Requires that the | |
200 | .B mmp | |
201 | feature be enabled. | |
202 | .TP | |
0c17cb25 TT |
203 | .BI stride= stride-size |
204 | Configure the filesystem for a RAID array with | |
205 | .I stride-size | |
206 | filesystem blocks. This is the number of blocks read or written to disk | |
207 | before moving to next disk. This mostly affects placement of filesystem | |
208 | metadata like bitmaps at | |
209 | .BR mke2fs (2) | |
711d3846 | 210 | time to avoid placing them on a single disk, which can hurt the performance. |
0c17cb25 TT |
211 | It may also be used by block allocator. |
212 | .TP | |
10ff68d4 | 213 | .BI stripe_width= stripe-width |
0c17cb25 TT |
214 | Configure the filesystem for a RAID array with |
215 | .I stripe-width | |
216 | filesystem blocks per stripe. This is typically be stride-size * N, where | |
217 | N is the number of data disks in the RAID (e.g. RAID 5 N+1, RAID 6 N+2). | |
218 | This allows the block allocator to prevent read-modify-write of the | |
219 | parity in a RAID stripe if possible when the data is written. | |
220 | .TP | |
10ff68d4 TT |
221 | .BI hash_alg= hash-alg |
222 | Set the default hash algorithm used for filesystems with hashed b-tree | |
223 | directories. Valid algorithms accepted are: | |
224 | .IR legacy , | |
225 | .IR half_md4 , | |
226 | and | |
227 | .IR tea . | |
228 | .TP | |
9345f026 TT |
229 | .BI mount_opts= mount_option_string |
230 | Set a set of default mount options which will be used when the file | |
231 | system is mounted. Unlike the bitmask-based default mount options which | |
232 | can be specified with the | |
233 | .B -o | |
234 | option, | |
235 | .I mount_option_string | |
236 | is an arbitrary string with a maximum length of 63 bytes, which is | |
237 | stored in the superblock. | |
238 | .IP | |
239 | The ext4 file system driver will first apply | |
240 | the bitmask-based default options, and then parse the | |
241 | .IR mount_option_string , | |
242 | before parsing the mount options passed from the | |
243 | .BR mount (8) | |
244 | program. | |
245 | .IP | |
246 | This superblock setting is only honored in 2.6.35+ kernels; | |
247 | and not at all by the ext2 and ext3 file system drivers. | |
248 | .TP | |
6cb27404 TT |
249 | .B test_fs |
250 | Set a flag in the filesystem superblock indicating that it may be | |
251 | mounted using experimental kernel code, such as the ext4dev filesystem. | |
252 | .TP | |
253 | .B ^test_fs | |
254 | Clear the test_fs flag, indicating the filesystem should only be mounted | |
255 | using production-level filesystem code. | |
256 | .RE | |
257 | .TP | |
177ab2be | 258 | .B \-f |
d04ad325 TT |
259 | Force the tune2fs operation to complete even in the face of errors. This |
260 | option is useful when removing the | |
177ab2be | 261 | .B has_journal |
d04ad325 | 262 | filesystem feature from a filesystem which has |
177ab2be | 263 | an external journal (or is corrupted |
d04ad325 | 264 | such that it appears to have an external journal), but that |
5fe2bd60 ES |
265 | external journal is not available. If the filesystem appears to require |
266 | journal replay, the | |
267 | .B \-f | |
268 | flag must be specified twice to proceed. | |
177ab2be TT |
269 | .sp |
270 | .B WARNING: | |
271 | Removing an external journal from a filesystem which was not cleanly unmounted | |
272 | without first replaying the external journal can result in | |
273 | severe data loss and filesystem corruption. | |
274 | .TP | |
caf8ce4c | 275 | .BI \-g " group" |
febac23c | 276 | Set the group which can use the reserved filesystem blocks. |
d04ad325 | 277 | The |
f3db3566 | 278 | .I group |
ce57f14f | 279 | parameter can be a numerical gid or a group name. If a group name is given, |
e1c6b2f0 | 280 | it is converted to a numerical gid before it is stored in the superblock. |
f3db3566 | 281 | .TP |
ce57f14f | 282 | .B \-i " \fIinterval-between-checks\fR[\fBd\fR|\fBm\fR|\fBw\fR]" |
d04ad325 | 283 | Adjust the maximal time between two filesystem checks. |
c5fbf388 | 284 | No suffix or |
caf8ce4c | 285 | .B d |
c5fbf388 TT |
286 | will interpret the number |
287 | .I interval-between-checks | |
288 | as days, | |
caf8ce4c | 289 | .B m |
c5fbf388 | 290 | as months, and |
caf8ce4c | 291 | .B w |
c5fbf388 | 292 | as weeks. A value of zero will disable the time-dependent checking. |
66cf2f60 | 293 | .sp |
0e3b7032 ES |
294 | There are pros and cons to disabling these periodic checks; see the |
295 | discussion under the | |
66cf2f60 | 296 | .B \-c |
0e3b7032 | 297 | (mount-count-dependent check) option for details. |
3839e657 | 298 | .TP |
bc8f1ae5 TT |
299 | .B \-I |
300 | Change the inode size used by the file system. This requires rewriting | |
301 | the inode table, so it requires that the file system is checked for | |
302 | consistency first using | |
303 | .BR e2fsck (8). | |
304 | This operation can also take a while and the file system can be | |
305 | corrupted and data lost if it is interrupted while in the middle of | |
306 | converting the file system. | |
307 | .TP | |
66cf2f60 | 308 | .B \-j |
d04ad325 | 309 | Add an ext3 journal to the filesystem. If the |
dc2ec525 | 310 | .B \-J |
8d641749 | 311 | option is not specified, the default journal parameters will be used to create |
d04ad325 | 312 | an appropriately sized journal (given the size of the filesystem) |
ce57f14f TT |
313 | stored within the filesystem. Note that you must be using a kernel |
314 | which has ext3 support in order to actually make use of the journal. | |
91d71c41 TT |
315 | .IP |
316 | If this option is used to create a journal on a mounted filesystem, an | |
317 | immutable file, | |
318 | .BR .journal , | |
319 | will be created in the top-level directory of the filesystem, as it is | |
320 | the only safe way to create the journal inode while the filesystem is | |
321 | mounted. While the ext3 journal is visible, it is not safe to | |
322 | delete it, or modify it while the filesystem is mounted; for this | |
323 | reason the file is marked immutable. | |
d04ad325 | 324 | While checking unmounted filesystems, |
91d71c41 | 325 | .BR e2fsck (8) |
d04ad325 | 326 | will automatically move |
91d71c41 TT |
327 | .B .journal |
328 | files to the invisible, reserved journal inode. For all filesystems | |
329 | except for the root filesystem, this should happen automatically and | |
330 | naturally during the next reboot cycle. Since the root filesystem is | |
331 | mounted read-only, | |
332 | .BR e2fsck (8) | |
333 | must be run from a rescue floppy in order to effect this transition. | |
334 | .IP | |
335 | On some distributions, such as Debian, if an initial ramdisk is used, | |
336 | the initrd scripts will automatically convert an ext2 root filesystem | |
d04ad325 | 337 | to ext3 if the |
91d71c41 TT |
338 | .BR /etc/fstab |
339 | file specifies the ext3 filesystem for the root filesystem in order to | |
340 | avoid requiring the use of a rescue floppy to add an ext3 journal to | |
341 | the root filesystem. | |
dc2ec525 | 342 | .TP |
8d641749 | 343 | .BR \-J " journal-options" |
ce57f14f | 344 | Override the default ext3 journal parameters. Journal options are comma |
08dd830d | 345 | separated, and may take an argument using the equals ('=') sign. |
ce57f14f TT |
346 | The following journal options are supported: |
347 | .RS 1.2i | |
dc2ec525 | 348 | .TP |
ce57f14f | 349 | .BI size= journal-size |
dc2ec525 | 350 | Create a journal stored in the filesystem of size |
251395db TT |
351 | .I journal-size |
352 | megabytes. The size of the journal must be at least 1024 filesystem blocks | |
353 | (i.e., 1MB if using 1k blocks, 4MB if using 4k blocks, etc.) | |
8815116d | 354 | and may be no more than 10,240,000 filesystem blocks. |
251395db | 355 | There must be enough free space in the filesystem to create a journal of |
dc2ec525 | 356 | that size. |
b818205f TT |
357 | .TP |
358 | .BI location =journal-location | |
359 | Specify the location of the journal. The argument | |
360 | .I journal-location | |
361 | can either be specified as a block number, or if the number has a units | |
362 | suffix (e.g., 'M', 'G', etc.) interpret it as the offset from the | |
363 | beginning of the file system. | |
ce57f14f TT |
364 | @JDEV@.TP |
365 | @JDEV@.BI device= external-journal | |
251395db TT |
366 | @JDEV@Attach the filesystem to the journal block device located on |
367 | @JDEV@.IR external-journal . | |
d04ad325 | 368 | @JDEV@The external |
ce57f14f | 369 | @JDEV@journal must have been already created using the command |
251395db | 370 | @JDEV@.IP |
d04ad325 | 371 | @JDEV@.B mke2fs -O journal_dev |
e9a2d071 | 372 | @JDEV@.I external-journal |
251395db TT |
373 | @JDEV@.IP |
374 | @JDEV@Note that | |
375 | @JDEV@.I external-journal | |
376 | @JDEV@must be formatted with the same block | |
377 | @JDEV@size as filesystems which will be using it. | |
3024d887 TT |
378 | @JDEV@In addition, while there is support for attaching |
379 | @JDEV@multiple filesystems to a single external journal, | |
d04ad325 | 380 | @JDEV@the Linux kernel and |
3024d887 TT |
381 | @JDEV@.BR e2fsck (8) |
382 | @JDEV@do not currently support shared external journals yet. | |
2d15576d AD |
383 | @JDEV@.IP |
384 | @JDEV@Instead of specifying a device name directly, | |
385 | @JDEV@.I external-journal | |
386 | @JDEV@can also be specified by either | |
387 | @JDEV@.BI LABEL= label | |
388 | @JDEV@or | |
389 | @JDEV@.BI UUID= UUID | |
390 | @JDEV@to locate the external journal by either the volume label or UUID | |
391 | @JDEV@stored in the ext2 superblock at the start of the journal. Use | |
392 | @JDEV@.BR dumpe2fs (8) | |
393 | @JDEV@to display a journal device's volume label and UUID. See also the | |
394 | @JDEV@.B -L | |
395 | @JDEV@option of | |
396 | @JDEV@.BR tune2fs (8). | |
ce57f14f TT |
397 | .RE |
398 | @JDEV@.IP | |
399 | @JDEV@Only one of the | |
400 | @JDEV@.BR size " or " device | |
401 | @JDEV@options can be given for a filesystem. | |
08dd830d | 402 | .TP |
caf8ce4c | 403 | .B \-l |
c927bec1 TT |
404 | List the contents of the filesystem superblock, including the current |
405 | values of the parameters that can be set via this program. | |
ce57f14f TT |
406 | .TP |
407 | .BI \-L " volume-label" | |
d04ad325 | 408 | Set the volume label of the filesystem. |
ce57f14f | 409 | Ext2 filesystem labels can be at most 16 characters long; if |
d04ad325 TT |
410 | .I volume-label |
411 | is longer than 16 characters, | |
ce57f14f | 412 | .B tune2fs |
2d15576d AD |
413 | will truncate it and print a warning. The volume label can be used |
414 | by | |
415 | .BR mount (8), | |
416 | .BR fsck (8), | |
417 | and | |
418 | .BR /etc/fstab (5) | |
419 | (and possibly others) by specifying | |
39460665 | 420 | .BI LABEL= volume-label |
2d15576d AD |
421 | instead of a block special device name like |
422 | .BR /dev/hda5 . | |
3839e657 | 423 | .TP |
caf8ce4c | 424 | .BI \-m " reserved-blocks-percentage" |
febac23c | 425 | Set the percentage of the filesystem which may only be allocated |
d04ad325 TT |
426 | by privileged processes. Reserving some number of filesystem blocks |
427 | for use by privileged processes is done | |
febac23c | 428 | to avoid filesystem fragmentation, and to allow system |
d04ad325 | 429 | daemons, such as |
febac23c | 430 | .BR syslogd (8), |
d04ad325 TT |
431 | to continue to function correctly after non-privileged processes are |
432 | prevented from writing to the filesystem. Normally, the default percentage | |
febac23c | 433 | of reserved blocks is 5%. |
ce57f14f TT |
434 | .TP |
435 | .BI \-M " last-mounted-directory" | |
436 | Set the last-mounted directory for the filesystem. | |
437 | .TP | |
a0c3fd5e TT |
438 | .BR \-o " [^]\fImount-option\fR[,...]" |
439 | Set or clear the indicated default mount options in the filesystem. | |
d04ad325 TT |
440 | Default mount options can be overridden by mount options specified |
441 | either in | |
a0c3fd5e TT |
442 | .BR /etc/fstab (5) |
443 | or on the command line arguments to | |
d04ad325 | 444 | .BR mount (8). |
a0c3fd5e TT |
445 | Older kernels may not support this feature; in particular, |
446 | kernels which predate 2.4.20 will almost certainly ignore the | |
447 | default mount options field in the superblock. | |
448 | .IP | |
449 | More than one mount option can be cleared or set by separating | |
d04ad325 TT |
450 | features with commas. Mount options prefixed with a |
451 | caret character ('^') will be cleared in the filesystem's superblock; | |
452 | mount options without a prefix character or prefixed with a plus | |
a0c3fd5e TT |
453 | character ('+') will be added to the filesystem. |
454 | .IP | |
455 | The following mount options can be set or cleared using | |
456 | .BR tune2fs : | |
457 | .RS 1.2i | |
458 | .TP | |
459 | .B debug | |
460 | Enable debugging code for this filesystem. | |
461 | .TP | |
462 | .B bsdgroups | |
585545e1 TT |
463 | Emulate BSD behavior when creating new files: they will take the group-id |
464 | of the directory in which they were created. The standard System V behavior | |
77be4d2d | 465 | is the default, where newly created files take on the fsgid of the current |
d04ad325 TT |
466 | process, unless the directory has the setgid bit set, in which case it takes |
467 | the gid from the parent directory, and also gets the setgid bit set if it is | |
9a85c2ab | 468 | a directory itself. |
a0c3fd5e TT |
469 | .TP |
470 | .B user_xattr | |
471 | Enable user-specified extended attributes. | |
472 | .TP | |
473 | .B acl | |
474 | Enable Posix Access Control Lists. | |
475 | .TP | |
476 | .B uid16 | |
477 | Disables 32-bit UIDs and GIDs. This is for interoperability with | |
478 | older kernels which only store and expect 16-bit values. | |
2bae543e TT |
479 | .TP |
480 | .B journal_data | |
481 | When the filesystem is mounted with journalling enabled, all data | |
482 | (not just metadata) is committed into the journal prior to being written | |
483 | into the main filesystem. | |
484 | .TP | |
485 | .B journal_data_ordered | |
486 | When the filesystem is mounted with journalling enabled, all data is forced | |
d04ad325 | 487 | directly out to the main file system prior to its metadata being committed |
2bae543e TT |
488 | to the journal. |
489 | .TP | |
490 | .B journal_data_writeback | |
491 | When the filesystem is mounted with journalling enabled, data may be | |
ccdd1d6d | 492 | written into the main filesystem after its metadata has been committed |
2bae543e TT |
493 | to the journal. This may increase throughput, however, it may allow old |
494 | data to appear in files after a crash and journal recovery. | |
9345f026 TT |
495 | .TP |
496 | .B nobarrier | |
497 | The file system will be mounted with barrier operations in the journal | |
498 | disabled. (This option is currently only supported by the ext4 file | |
499 | system driver in 2.6.35+ kernels.) | |
500 | .TP | |
501 | .B block_validity | |
502 | The file system will be mounted with the block_validity option enabled, | |
503 | which causes extra checks to be performed after reading or writing from | |
504 | the file system. This prevents corrupted metadata blocks from causing | |
505 | file system damage by overwriting parts of the inode table or block | |
506 | group descriptors. This comes at the cost of increased memory and CPU | |
507 | overhead, so it is enabled only for debugging purposes. (This option is | |
508 | currently only supported by the ext4 file system driver in 2.6.35+ | |
509 | kernels.) | |
510 | .TP | |
511 | .B discard | |
585545e1 | 512 | The file system will be mounted with the discard mount option. This will |
9345f026 TT |
513 | cause the file system driver to attempt to use the trim/discard feature |
514 | of some storage devices (such as SSD's and thin-provisioned drives | |
515 | available in some enterprise storage arrays) to inform the storage | |
516 | device that blocks belonging to deleted files can be reused for other | |
517 | purposes. (This option is currently only supported by the ext4 file | |
518 | system driver in 2.6.35+ kernels.) | |
519 | .TP | |
520 | .B nodelalloc | |
521 | The file system will be mounted with the nodelalloc mount option. This | |
522 | will disable the delayed allocation feature. (This option is currently | |
523 | only supported by the ext4 file system driver in 2.6.35+ kernels.) | |
a0c3fd5e TT |
524 | .RE |
525 | .TP | |
251395db TT |
526 | .BR \-O " [^]\fIfeature\fR[,...]" |
527 | Set or clear the indicated filesystem features (options) in the filesystem. | |
ce57f14f | 528 | More than one filesystem feature can be cleared or set by separating |
d04ad325 TT |
529 | features with commas. Filesystem features prefixed with a |
530 | caret character ('^') will be cleared in the filesystem's superblock; | |
531 | filesystem features without a prefix character or prefixed with a plus | |
3c22bf7e TT |
532 | character ('+') will be added to the filesystem. For a detailed |
533 | description of the file system features, please see the man page | |
534 | .BR ext4 (5). | |
ce57f14f TT |
535 | .IP |
536 | The following filesystem features can be set or cleared using | |
251395db | 537 | .BR tune2fs : |
ce57f14f TT |
538 | .RS 1.2i |
539 | .TP | |
ccbed85a | 540 | .B dir_index |
3c22bf7e | 541 | Use hashed b-trees to speed up lookups for large directories. |
ce57f14f | 542 | .TP |
25bc8c75 AD |
543 | .B dir_nlink |
544 | Allow more than 65000 subdirectories per directory. | |
545 | .TP | |
78b7cd3b TT |
546 | .B encrypt |
547 | Enable file system level encryption. | |
548 | .B Tune2fs | |
549 | currently only supports setting this filesystem feature. | |
550 | .TP | |
3c22bf7e TT |
551 | .B extent |
552 | Enable the use of extent trees to store the location of data blocks in inodes. | |
78b7cd3b TT |
553 | .B Tune2fs |
554 | currently only supports setting this filesystem feature. | |
3c22bf7e TT |
555 | .TP |
556 | .B extra_isize | |
557 | Enable the extended inode fields used by ext4. | |
558 | .TP | |
ce57f14f | 559 | .B filetype |
251395db | 560 | Store file type information in directory entries. |
ce57f14f | 561 | .TP |
73ebdf99 TT |
562 | .B flex_bg |
563 | Allow bitmaps and inode tables for a block group to be placed | |
7a9f055f TT |
564 | anywhere on the storage media. \fBTune2fs\fR will not reorganize |
565 | the location of the inode tables and allocation bitmaps, as | |
566 | .BR mke2fs (8) | |
585545e1 | 567 | will do when it creates a freshly formatted file system with |
7a9f055f TT |
568 | .B flex_bg |
569 | enabled. | |
73ebdf99 | 570 | .TP |
ce57f14f | 571 | .B has_journal |
82b39c9f | 572 | Use a journal to ensure filesystem consistency even across unclean shutdowns. |
d04ad325 | 573 | Setting the filesystem feature is equivalent to using the |
ce57f14f | 574 | .B \-j |
82b39c9f | 575 | option. |
ccbed85a | 576 | .TP |
3c22bf7e TT |
577 | .B huge_file |
578 | Support files larger than 2 terabytes in size. | |
579 | .TP | |
73ebdf99 | 580 | .B large_file |
3c22bf7e | 581 | Filesystem can contain files that are greater than 2GB. |
037914e2 | 582 | .TP |
78b7cd3b TT |
583 | .B metadata_csum |
584 | Store a checksum to protect the contents in each metadata block. | |
4e988cb4 | 585 | .TP |
0f5eba75 | 586 | .B mmp |
3c22bf7e | 587 | Enable or disable multiple mount protection (MMP) feature. |
9e8fcd6e | 588 | .TP |
78b7cd3b TT |
589 | .B project |
590 | Enable project ID tracking. This is used for project quota tracking. | |
591 | .TP | |
9e8fcd6e TT |
592 | .B quota |
593 | Enable internal file system quota inodes. | |
0f5eba75 | 594 | .TP |
8b39e4cf TT |
595 | .B read-only |
596 | Force the kernel to mount the file system read-only. | |
597 | .TP | |
78b7cd3b TT |
598 | .B resize_inode |
599 | Reserve space so the block group descriptor table may grow in the | |
600 | future. | |
601 | .B Tune2fs | |
602 | only supports clearing this filesystem feature. | |
603 | .TP | |
73ebdf99 TT |
604 | .B sparse_super |
605 | Limit the number of backup superblocks to save space on large filesystems. | |
78b7cd3b TT |
606 | .B Tune2fs |
607 | currently only supports setting this filesystem feature. | |
73ebdf99 | 608 | .TP |
2930dad2 | 609 | .B uninit_bg |
3c22bf7e TT |
610 | Allow the kernel to initialize bitmaps and inode tables lazily, and to |
611 | keep a high watermark for the unused inodes in a filesystem, to reduce | |
4e988cb4 | 612 | .BR e2fsck (8) |
78b7cd3b | 613 | time. The first e2fsck run after enabling this feature will take the |
4237c73b AD |
614 | full time, but subsequent e2fsck runs will take only a fraction of the |
615 | original time, depending on how full the file system is. | |
ce57f14f TT |
616 | .RE |
617 | .IP | |
d04ad325 | 618 | After setting or clearing |
037914e2 | 619 | .BR sparse_super , |
2930dad2 | 620 | .BR uninit_bg , |
037914e2 TT |
621 | .BR filetype , |
622 | or | |
623 | .B resize_inode | |
39567c44 | 624 | filesystem features, |
78b7cd3b | 625 | the file system may require being checked using |
ce57f14f | 626 | .BR e2fsck (8) |
78b7cd3b | 627 | to return the filesystem to a consistent state. |
39567c44 TT |
628 | .B Tune2fs |
629 | will print a message requesting that the system administrator run | |
630 | .BR e2fsck (8) | |
d04ad325 | 631 | if necessary. After setting the |
45e18ad7 | 632 | .B dir_index |
d04ad325 | 633 | feature, |
45e18ad7 TT |
634 | .B e2fsck -D |
635 | can be run to convert existing directories to the hashed B-tree format. | |
4237c73b | 636 | Enabling certain filesystem features may prevent the filesystem from being |
73ebdf99 | 637 | mounted by kernels which do not support those features. In particular, the |
2930dad2 | 638 | .BR uninit_bg |
4237c73b AD |
639 | and |
640 | .BR flex_bg | |
641 | features are only supported by the ext4 filesystem. | |
f3db3566 | 642 | .TP |
0f5eba75 AD |
643 | .BI \-p " mmp_check_interval" |
644 | Set the desired MMP check interval in seconds. It is 5 seconds by default. | |
645 | .TP | |
caf8ce4c | 646 | .BI \-r " reserved-blocks-count" |
ce57f14f | 647 | Set the number of reserved filesystem blocks. |
f3db3566 | 648 | .TP |
771e8db9 AK |
649 | .BI \-Q " quota-options" |
650 | Sets 'quota' feature on the superblock and works on the quota files for the | |
651 | given quota type. Quota options could be one or more of the following: | |
652 | .RS 1.2i | |
653 | .TP | |
654 | .BR [^]usrquota | |
655 | Sets/clears user quota inode in the superblock. | |
b75a4ce1 DP |
656 | .TP |
657 | .BR [^]grpquota | |
771e8db9 | 658 | Sets/clears group quota inode in the superblock. |
080e09b4 LX |
659 | .TP |
660 | .BR [^]prjquota | |
661 | Sets/clears project quota inode in the superblock. | |
a99145e6 | 662 | .RE |
771e8db9 | 663 | .TP |
d4de4aa9 TT |
664 | .BI \-T " time-last-checked" |
665 | Set the time the filesystem was last checked using | |
666 | .BR e2fsck . | |
402b95d2 | 667 | The time is interpreted using the current (local) timezone. |
d4de4aa9 | 668 | This can be useful in scripts which use a Logical Volume Manager to make |
d04ad325 TT |
669 | a consistent snapshot of a filesystem, and then check the filesystem |
670 | during off hours to make sure it hasn't been corrupted due to | |
671 | hardware problems, etc. If the filesystem was clean, then this option can | |
672 | be used to set the last checked time on the original filesystem. The format | |
673 | of | |
d4de4aa9 TT |
674 | .I time-last-checked |
675 | is the international date format, with an optional time specifier, i.e. | |
d04ad325 | 676 | YYYYMMDD[HH[MM[SS]]]. The keyword |
d4de4aa9 | 677 | .B now |
d04ad325 | 678 | is also accepted, in which case the last checked time will be set to the |
d4de4aa9 TT |
679 | current time. |
680 | .TP | |
caf8ce4c | 681 | .BI \-u " user" |
ce57f14f | 682 | Set the user who can use the reserved filesystem blocks. |
f3db3566 | 683 | .I user |
d04ad325 | 684 | can be a numerical uid or a user name. If a user name is given, it |
e1c6b2f0 | 685 | is converted to a numerical uid before it is stored in the superblock. |
1dde43f0 | 686 | .TP |
ce57f14f | 687 | .BI \-U " UUID" |
8d641749 | 688 | Set the universally unique identifier (UUID) of the filesystem to |
ce57f14f | 689 | .IR UUID . |
d04ad325 TT |
690 | The format of the UUID is a series of hex digits separated by hyphens, |
691 | like this: | |
692 | "c1b9d5a2-f162-11cf-9ece-0020afc76f16". | |
693 | The | |
ce57f14f TT |
694 | .I UUID |
695 | parameter may also be one of the following: | |
696 | .RS 1.2i | |
1e3472c5 | 697 | .TP |
ce57f14f TT |
698 | .I clear |
699 | clear the filesystem UUID | |
1e3472c5 | 700 | .TP |
ce57f14f TT |
701 | .I random |
702 | generate a new randomly-generated UUID | |
896938d5 | 703 | .TP |
ce57f14f TT |
704 | .I time |
705 | generate a new time-based UUID | |
706 | .RE | |
707 | .IP | |
2d15576d AD |
708 | The UUID may be used by |
709 | .BR mount (8), | |
710 | .BR fsck (8), | |
711 | and | |
712 | .BR /etc/fstab (5) | |
713 | (and possibly others) by specifying | |
714 | .BI UUID= uuid | |
715 | instead of a block special device name like | |
716 | .BR /dev/hda1 . | |
717 | .IP | |
ce57f14f TT |
718 | See |
719 | .BR uuidgen (8) | |
720 | for more information. | |
721 | If the system does not have a good random number generator such as | |
722 | .I /dev/random | |
723 | or | |
724 | .IR /dev/urandom , | |
725 | .B tune2fs | |
726 | will automatically use a time-based UUID instead of a randomly-generated UUID. | |
f7d05594 DW |
727 | .TP |
728 | .BI \-z " undo_file" | |
729 | Before overwriting a file system block, write the old contents of the block to | |
730 | an undo file. This undo file can be used with e2undo(8) to restore the old | |
731 | contents of the file system should something go wrong. If the empty string is | |
732 | passed as the undo_file argument, the undo file will be written to a file named | |
733 | tune2fs-\fIdevice\fR.e2undo in the directory specified via the | |
734 | \fIE2FSPROGS_UNDO_DIR\fR environment variable. | |
735 | ||
736 | WARNING: The undo file cannot be used to recover from a power or system crash. | |
3839e657 | 737 | .SH BUGS |
63985320 | 738 | We haven't found any bugs yet. That doesn't mean there aren't any... |
3839e657 | 739 | .SH AUTHOR |
78b7cd3b | 740 | .B tune2fs |
2e5a1b9e TT |
741 | was written by Remy Card <Remy.Card@linux.org>. It is currently being |
742 | maintained by Theodore Ts'o <tytso@alum.mit.edu>. | |
3839e657 | 743 | .B tune2fs |
a418d3ad | 744 | uses the ext2fs library written by Theodore Ts'o <tytso@mit.edu>. |
3839e657 | 745 | This manual page was written by Christian Kuhtz <chk@data-hh.Hanse.DE>. |
66cf2f60 | 746 | Time-dependent checking was added by Uwe Ohse <uwe@tirka.gun.de>. |
3839e657 TT |
747 | .SH AVAILABILITY |
748 | .B tune2fs | |
d04ad325 | 749 | is part of the e2fsprogs package and is available from |
348e43dc | 750 | http://e2fsprogs.sourceforge.net. |
3839e657 | 751 | .SH SEE ALSO |
0fd2f900 | 752 | .BR debugfs (8), |
3839e657 TT |
753 | .BR dumpe2fs (8), |
754 | .BR e2fsck (8), | |
3c22bf7e TT |
755 | .BR mke2fs (8), |
756 | .BR ext4 (5) |