Debian Codegraph @

upstream/debian-trixie/man8/tune2fs.8

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