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