blob: b5af4d0359e8acfe2e05977b4f6c51ab60a4d86b [file] [log] [blame]
Theodore Ts'o3839e651997-04-26 13:21:57 +00001.\" Revision 1.0 93/06/3 23:00 chk
2.\" Initial revision
3.\"
4.\"
Theodore Ts'o74becf31997-04-26 14:37:06 +00005.TH TUNE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
Theodore Ts'o3839e651997-04-26 13:21:57 +00006.SH NAME
Theodore Ts'oa7ac1df2003-08-24 17:56:41 -04007tune2fs \- adjust tunable filesystem parameters on ext2/ext3 filesystems
Theodore Ts'o3839e651997-04-26 13:21:57 +00008.SH SYNOPSIS
9.B tune2fs
10[
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +000011.B \-l
Theodore Ts'of3db3561997-04-26 13:34:30 +000012]
13[
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +000014.B \-c
Theodore Ts'of3db3561997-04-26 13:34:30 +000015.I max-mount-counts
16]
17[
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +000018.B \-e
Theodore Ts'of3db3561997-04-26 13:34:30 +000019.I errors-behavior
20]
21[
Theodore Ts'o177ab2b2002-01-27 18:23:49 -050022.B \-f
23]
24[
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +000025.B \-i
Theodore Ts'of3db3561997-04-26 13:34:30 +000026.I interval-between-checks
27]
28[
Theodore Ts'o08dd8302001-01-14 16:25:58 +000029.B \-j
Theodore Ts'odc2ec522001-01-18 01:51:15 +000030]
31[
32.B \-J
Theodore Ts'o08dd8302001-01-14 16:25:58 +000033.I journal-options
34]
35[
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +000036.B \-m
Theodore Ts'of3db3561997-04-26 13:34:30 +000037.I reserved-blocks-percentage
38]
39[
Theodore Ts'oa0c3fd52002-10-15 17:43:43 -040040.B \-o
Theodore Ts'oc65e54b2003-12-11 11:31:48 -050041.RI [^]mount-options [,...]
Theodore Ts'oa0c3fd52002-10-15 17:43:43 -040042]
Theodore Ts'oa0c3fd52002-10-15 17:43:43 -040043[
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +000044.B \-r
Theodore Ts'of3db3561997-04-26 13:34:30 +000045.I reserved-blocks-count
46]
47[
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +000048.B \-s
49.I sparse-super-flag
Theodore Ts'o521e3681997-04-29 17:48:10 +000050]
51[
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +000052.B \-u
Theodore Ts'of3db3561997-04-26 13:34:30 +000053.I user
54]
55[
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +000056.B \-g
Theodore Ts'of3db3561997-04-26 13:34:30 +000057.I group
Theodore Ts'o3839e651997-04-26 13:21:57 +000058]
Theodore Ts'o1e3472c1997-04-29 14:53:37 +000059[
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +000060.B \-C
Theodore Ts'o1e3472c1997-04-29 14:53:37 +000061.I mount-count
62]
63[
Theodore Ts'o6cb27402008-01-26 19:06:35 -050064.B \-E
65.I extended-options
66]
67[
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +000068.B \-L
Theodore Ts'o1e3472c1997-04-29 14:53:37 +000069.I volume-name
70]
71[
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +000072.B \-M
Theodore Ts'o1e3472c1997-04-29 14:53:37 +000073.I last-mounted-directory
74]
75[
Theodore Ts'o896938d1999-10-23 01:04:50 +000076.B \-O
Theodore Ts'oce57f142001-04-26 04:25:39 +000077.RI [^] feature [,...]
Theodore Ts'o896938d1999-10-23 01:04:50 +000078]
79[
Theodore Ts'od4de4aa2001-12-26 08:58:01 -050080.B \-T
81.I time-last-checked
82]
83[
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +000084.B \-U
Theodore Ts'o1e3472c1997-04-29 14:53:37 +000085.I UUID
86]
Theodore Ts'o3839e651997-04-26 13:21:57 +000087device
88.SH DESCRIPTION
89.BI tune2fs
Theodore Ts'oa7ac1df2003-08-24 17:56:41 -040090allows the system administrator to adjust various tunable filesystem
91parameters on Linux ext2/ext3 filesystems.
Theodore Ts'o3839e651997-04-26 13:21:57 +000092.SH OPTIONS
93.TP
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +000094.BI \-c " max-mount-counts"
Theodore Ts'oe0f72cf2006-05-14 18:09:12 -040095Adjust the number of mounts after which the filesystem will be checked by
96.BR e2fsck (8).
97If
Theodore Ts'o45d9e2f2000-07-07 03:12:54 +000098.I max-mount-counts
Theodore Ts'o7b921b92005-05-06 12:04:10 -040099is 0 or \-1, the number of times the filesystem is mounted will be disregarded
Theodore Ts'o66cf2f62001-06-14 06:42:44 +0000100by
101.BR e2fsck (8)
102and the kernel.
103.sp
104Staggering the mount-counts at which filesystems are forcibly
105checked will avoid all filesystems being checked at one time
106when using journaled filesystems.
107.sp
108You should strongly consider the consequences of disabling
109mount-count-dependent checking entirely. Bad disk drives, cables,
110memory, and kernel bugs could all corrupt a filesystem without
111marking the filesystem dirty or in error. If you are using
112journaling on your filesystem, your filesystem will
113.B never
114be marked dirty, so it will not normally be checked. A
115filesystem error detected by the kernel will still force
116an fsck on the next reboot, but it may already be too late
117to prevent data loss at that point.
118.sp
119See also the
120.B \-i
121option for time-dependent checking.
Theodore Ts'o3839e651997-04-26 13:21:57 +0000122.TP
Theodore Ts'oce57f142001-04-26 04:25:39 +0000123.BI \-C " mount-count"
124Set the number of times the filesystem has been mounted.
Theodore Ts'oe0f72cf2006-05-14 18:09:12 -0400125If set to a greater value than the max-mount-counts parameter
126set by the
127.B \-c
128option,
129.BR e2fsck (8)
130will check the filesystem at the next reboot.
Theodore Ts'oce57f142001-04-26 04:25:39 +0000131.TP
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +0000132.BI \-e " error-behavior"
Theodore Ts'oce57f142001-04-26 04:25:39 +0000133Change the behavior of the kernel code when errors are detected.
Theodore Ts'o66cf2f62001-06-14 06:42:44 +0000134In all cases, a filesystem error will cause
135.BR e2fsck (8)
136to check the filesystem on the next boot.
Theodore Ts'o583ccdc1997-05-09 03:06:31 +0000137.I error-behavior
138can be one of the following:
Theodore Ts'oce57f142001-04-26 04:25:39 +0000139.RS 1.2i
140.TP 1.2i
141.B continue
142Continue normal execution.
143.TP
144.B remount-ro
145Remount filesystem read-only.
146.TP
147.B panic
148Cause a kernel panic.
149.RE
Theodore Ts'o3839e651997-04-26 13:21:57 +0000150.TP
Theodore Ts'o6cb27402008-01-26 19:06:35 -0500151.BI \-E " extended-options"
152Set extended options for the filesystem. Extended options are comma
Theodore Ts'o0c17cb22008-02-18 22:56:25 -0500153separated, and may take an argument using the equals ('=') sign.
154The following extended options are supported:
Theodore Ts'o6cb27402008-01-26 19:06:35 -0500155.RS 1.2i
156.TP
Theodore Ts'o0c17cb22008-02-18 22:56:25 -0500157.BI stride= stride-size
158Configure the filesystem for a RAID array with
159.I stride-size
160filesystem blocks. This is the number of blocks read or written to disk
161before moving to next disk. This mostly affects placement of filesystem
162metadata like bitmaps at
163.BR mke2fs (2)
164time to avoid placing them on a single disk, which can hurt the performanace.
165It may also be used by block allocator.
166.TP
167.BI stripe-width= stripe-width
168Configure the filesystem for a RAID array with
169.I stripe-width
170filesystem blocks per stripe. This is typically be stride-size * N, where
171N is the number of data disks in the RAID (e.g. RAID 5 N+1, RAID 6 N+2).
172This allows the block allocator to prevent read-modify-write of the
173parity in a RAID stripe if possible when the data is written.
174.TP
Theodore Ts'o6cb27402008-01-26 19:06:35 -0500175.B test_fs
176Set a flag in the filesystem superblock indicating that it may be
177mounted using experimental kernel code, such as the ext4dev filesystem.
178.TP
179.B ^test_fs
180Clear the test_fs flag, indicating the filesystem should only be mounted
181using production-level filesystem code.
182.RE
183.TP
Theodore Ts'o177ab2b2002-01-27 18:23:49 -0500184.B \-f
185Force the tune2fs operation to complete even in the face of errors. This
186option is useful when removing the
187.B has_journal
188filesystem feature from a filesystem which has
189an external journal (or is corrupted
190such that it appears to have an external journal), but that
191external journal is not available.
192.sp
193.B WARNING:
194Removing an external journal from a filesystem which was not cleanly unmounted
195without first replaying the external journal can result in
196severe data loss and filesystem corruption.
197.TP
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +0000198.BI \-g " group"
Theodore Ts'ofebac232007-07-11 23:20:17 -0400199Set the group which can use the reserved filesystem blocks.
Theodore Ts'oce57f142001-04-26 04:25:39 +0000200The
Theodore Ts'of3db3561997-04-26 13:34:30 +0000201.I group
Theodore Ts'oce57f142001-04-26 04:25:39 +0000202parameter can be a numerical gid or a group name. If a group name is given,
Theodore Ts'oe1c6b2f2000-12-02 06:19:33 +0000203it is converted to a numerical gid before it is stored in the superblock.
Theodore Ts'of3db3561997-04-26 13:34:30 +0000204.TP
Theodore Ts'oce57f142001-04-26 04:25:39 +0000205.B \-i " \fIinterval-between-checks\fR[\fBd\fR|\fBm\fR|\fBw\fR]"
206Adjust the maximal time between two filesystem checks.
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +0000207No postfix or
208.B d
209result in days,
210.B m
211in months, and
212.B w
Theodore Ts'o66cf2f62001-06-14 06:42:44 +0000213in weeks. A value of zero will disable the time-dependent checking.
214.sp
215It is strongly recommended that either
216.B \-c
217(mount-count-dependent) or
218.B \-i
219(time-dependent) checking be enabled to force periodic full
220.BR e2fsck (8)
221checking of the filesystem. Failure to do so may lead to filesystem
Theodore Ts'o9a85c2a2006-09-12 02:33:08 -0400222corruption (due to bad disks, cables, memory, or kernel bugs) going
223unnoticed, ultimately resulting in data loss or corruption.
Theodore Ts'o3839e651997-04-26 13:21:57 +0000224.TP
Theodore Ts'o66cf2f62001-06-14 06:42:44 +0000225.B \-j
Theodore Ts'oce57f142001-04-26 04:25:39 +0000226Add an ext3 journal to the filesystem. If the
Theodore Ts'odc2ec522001-01-18 01:51:15 +0000227.B \-J
Theodore Ts'o8d641742001-05-14 04:12:27 +0000228option is not specified, the default journal parameters will be used to create
Theodore Ts'odc2ec522001-01-18 01:51:15 +0000229an appropriately sized journal (given the size of the filesystem)
Theodore Ts'oce57f142001-04-26 04:25:39 +0000230stored within the filesystem. Note that you must be using a kernel
231which has ext3 support in order to actually make use of the journal.
Theodore Ts'o91d71c42004-09-19 07:34:35 -0400232.IP
233If this option is used to create a journal on a mounted filesystem, an
234immutable file,
235.BR .journal ,
236will be created in the top-level directory of the filesystem, as it is
237the only safe way to create the journal inode while the filesystem is
238mounted. While the ext3 journal is visible, it is not safe to
239delete it, or modify it while the filesystem is mounted; for this
240reason the file is marked immutable.
241While checking unmounted filesystems,
242.BR e2fsck (8)
243will automatically move
244.B .journal
245files to the invisible, reserved journal inode. For all filesystems
246except for the root filesystem, this should happen automatically and
247naturally during the next reboot cycle. Since the root filesystem is
248mounted read-only,
249.BR e2fsck (8)
250must be run from a rescue floppy in order to effect this transition.
251.IP
252On some distributions, such as Debian, if an initial ramdisk is used,
253the initrd scripts will automatically convert an ext2 root filesystem
254to ext3 if the
255.BR /etc/fstab
256file specifies the ext3 filesystem for the root filesystem in order to
257avoid requiring the use of a rescue floppy to add an ext3 journal to
258the root filesystem.
Theodore Ts'odc2ec522001-01-18 01:51:15 +0000259.TP
Theodore Ts'o8d641742001-05-14 04:12:27 +0000260.BR \-J " journal-options"
Theodore Ts'oce57f142001-04-26 04:25:39 +0000261Override the default ext3 journal parameters. Journal options are comma
Theodore Ts'o08dd8302001-01-14 16:25:58 +0000262separated, and may take an argument using the equals ('=') sign.
Theodore Ts'oce57f142001-04-26 04:25:39 +0000263The following journal options are supported:
264.RS 1.2i
Theodore Ts'odc2ec522001-01-18 01:51:15 +0000265.TP
Theodore Ts'oce57f142001-04-26 04:25:39 +0000266.BI size= journal-size
Theodore Ts'odc2ec522001-01-18 01:51:15 +0000267Create a journal stored in the filesystem of size
Theodore Ts'o251395d2001-05-14 04:43:05 +0000268.I journal-size
269megabytes. The size of the journal must be at least 1024 filesystem blocks
270(i.e., 1MB if using 1k blocks, 4MB if using 4k blocks, etc.)
271and may be no more than 102,400 filesystem blocks.
272There must be enough free space in the filesystem to create a journal of
Theodore Ts'odc2ec522001-01-18 01:51:15 +0000273that size.
Theodore Ts'oce57f142001-04-26 04:25:39 +0000274@JDEV@.TP
275@JDEV@.BI device= external-journal
Theodore Ts'o251395d2001-05-14 04:43:05 +0000276@JDEV@Attach the filesystem to the journal block device located on
277@JDEV@.IR external-journal .
Theodore Ts'oce57f142001-04-26 04:25:39 +0000278@JDEV@The external
279@JDEV@journal must have been already created using the command
Theodore Ts'o251395d2001-05-14 04:43:05 +0000280@JDEV@.IP
Theodore Ts'oce57f142001-04-26 04:25:39 +0000281@JDEV@.B mke2fs -O journal_dev
Theodore Ts'oe9a2d072001-06-14 07:15:02 +0000282@JDEV@.I external-journal
Theodore Ts'o251395d2001-05-14 04:43:05 +0000283@JDEV@.IP
284@JDEV@Note that
285@JDEV@.I external-journal
286@JDEV@must be formatted with the same block
287@JDEV@size as filesystems which will be using it.
Theodore Ts'o3024d882006-03-27 11:53:00 -0500288@JDEV@In addition, while there is support for attaching
289@JDEV@multiple filesystems to a single external journal,
290@JDEV@the Linux kernel and
291@JDEV@.BR e2fsck (8)
292@JDEV@do not currently support shared external journals yet.
Andreas Dilger2d155762001-08-17 03:48:11 -0600293@JDEV@.IP
294@JDEV@Instead of specifying a device name directly,
295@JDEV@.I external-journal
296@JDEV@can also be specified by either
297@JDEV@.BI LABEL= label
298@JDEV@or
299@JDEV@.BI UUID= UUID
300@JDEV@to locate the external journal by either the volume label or UUID
301@JDEV@stored in the ext2 superblock at the start of the journal. Use
302@JDEV@.BR dumpe2fs (8)
303@JDEV@to display a journal device's volume label and UUID. See also the
304@JDEV@.B -L
305@JDEV@option of
306@JDEV@.BR tune2fs (8).
Theodore Ts'oce57f142001-04-26 04:25:39 +0000307.RE
308@JDEV@.IP
309@JDEV@Only one of the
310@JDEV@.BR size " or " device
311@JDEV@options can be given for a filesystem.
Theodore Ts'o08dd8302001-01-14 16:25:58 +0000312.TP
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +0000313.B \-l
Theodore Ts'oce57f142001-04-26 04:25:39 +0000314List the contents of the filesystem superblock.
Theodore Ts'o1e3472c1997-04-29 14:53:37 +0000315.TP
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +0000316.BI \-L " volume-label"
Theodore Ts'oce57f142001-04-26 04:25:39 +0000317Set the volume label of the filesystem.
Theodore Ts'oa789d841998-03-30 01:20:55 +0000318Ext2 filesystem labels can be at most 16 characters long; if
319.I volume-label
320is longer than 16 characters,
321.B tune2fs
Andreas Dilger2d155762001-08-17 03:48:11 -0600322will truncate it and print a warning. The volume label can be used
323by
324.BR mount (8),
325.BR fsck (8),
326and
327.BR /etc/fstab (5)
328(and possibly others) by specifying
329.BI LABEL= volume_label
330instead of a block special device name like
331.BR /dev/hda5 .
Theodore Ts'oce57f142001-04-26 04:25:39 +0000332.TP
333.BI \-m " reserved-blocks-percentage"
Theodore Ts'ofebac232007-07-11 23:20:17 -0400334Set the percentage of the filesystem which may only be allocated
335by privileged processes. Reserving some number of filesystem blocks
336for use by privileged processes is done
337to avoid filesystem fragmentation, and to allow system
338daemons, such as
339.BR syslogd (8),
340to continue to function correctly after non-privileged processes are
341prevented from writing to the filesystem. Normally, the default percentage
342of reserved blocks is 5%.
Theodore Ts'o1e3472c1997-04-29 14:53:37 +0000343.TP
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +0000344.BI \-M " last-mounted-directory"
Theodore Ts'oce57f142001-04-26 04:25:39 +0000345Set the last-mounted directory for the filesystem.
Theodore Ts'o1e3472c1997-04-29 14:53:37 +0000346.TP
Theodore Ts'oa0c3fd52002-10-15 17:43:43 -0400347.BR \-o " [^]\fImount-option\fR[,...]"
348Set or clear the indicated default mount options in the filesystem.
Theodore Ts'o81393672005-04-16 14:05:09 -0400349Default mount options can be overridden by mount options specified
Theodore Ts'oa0c3fd52002-10-15 17:43:43 -0400350either in
351.BR /etc/fstab (5)
352or on the command line arguments to
353.BR mount (8).
354Older kernels may not support this feature; in particular,
355kernels which predate 2.4.20 will almost certainly ignore the
356default mount options field in the superblock.
357.IP
358More than one mount option can be cleared or set by separating
359features with commas. Mount options prefixed with a
360caret character ('^') will be cleared in the filesystem's superblock;
361mount options without a prefix character or prefixed with a plus
362character ('+') will be added to the filesystem.
363.IP
364The following mount options can be set or cleared using
365.BR tune2fs :
366.RS 1.2i
367.TP
368.B debug
369Enable debugging code for this filesystem.
370.TP
371.B bsdgroups
372Emulate BSD behaviour when creating new files: they will take the group-id
373of the directory in which they were created. The standard System V behaviour
Theodore Ts'o77be4d22003-03-06 12:39:55 -0500374is the default, where newly created files take on the fsgid of the current
Theodore Ts'o81393672005-04-16 14:05:09 -0400375process, unless the directory has the setgid bit set, in which case it takes
Theodore Ts'oa0c3fd52002-10-15 17:43:43 -0400376the gid from the parent directory, and also gets the setgid bit set if it is
Theodore Ts'o9a85c2a2006-09-12 02:33:08 -0400377a directory itself.
Theodore Ts'oa0c3fd52002-10-15 17:43:43 -0400378.TP
379.B user_xattr
380Enable user-specified extended attributes.
381.TP
382.B acl
383Enable Posix Access Control Lists.
384.TP
385.B uid16
386Disables 32-bit UIDs and GIDs. This is for interoperability with
387older kernels which only store and expect 16-bit values.
Theodore Ts'o2bae5432002-10-25 16:21:03 -0400388.TP
389.B journal_data
390When the filesystem is mounted with journalling enabled, all data
391(not just metadata) is committed into the journal prior to being written
392into the main filesystem.
393.TP
394.B journal_data_ordered
395When the filesystem is mounted with journalling enabled, all data is forced
Theodore Ts'occdd1d62004-04-11 17:02:44 -0400396directly out to the main file system prior to its metadata being committed
Theodore Ts'o2bae5432002-10-25 16:21:03 -0400397to the journal.
398.TP
399.B journal_data_writeback
400When the filesystem is mounted with journalling enabled, data may be
Theodore Ts'occdd1d62004-04-11 17:02:44 -0400401written into the main filesystem after its metadata has been committed
Theodore Ts'o2bae5432002-10-25 16:21:03 -0400402to the journal. This may increase throughput, however, it may allow old
403data to appear in files after a crash and journal recovery.
Theodore Ts'oa0c3fd52002-10-15 17:43:43 -0400404.RE
405.TP
Theodore Ts'o251395d2001-05-14 04:43:05 +0000406.BR \-O " [^]\fIfeature\fR[,...]"
407Set or clear the indicated filesystem features (options) in the filesystem.
Theodore Ts'oce57f142001-04-26 04:25:39 +0000408More than one filesystem feature can be cleared or set by separating
409features with commas. Filesystem features prefixed with a
410caret character ('^') will be cleared in the filesystem's superblock;
411filesystem features without a prefix character or prefixed with a plus
412character ('+') will be added to the filesystem.
413.IP
414The following filesystem features can be set or cleared using
Theodore Ts'o251395d2001-05-14 04:43:05 +0000415.BR tune2fs :
Theodore Ts'oce57f142001-04-26 04:25:39 +0000416.RS 1.2i
417.TP
Theodore Ts'o558df542008-02-27 15:01:19 -0500418.B large_file
419Filesystem can contain files that are greater than 2GB. (Modern kernels
420set this feature automatically when a file > 2GB is created.)
421.TP
Theodore Ts'occbed852003-04-11 13:32:31 -0400422.B dir_index
423Use hashed b-trees to speed up lookups in large directories.
Theodore Ts'oce57f142001-04-26 04:25:39 +0000424.TP
425.B filetype
Theodore Ts'o251395d2001-05-14 04:43:05 +0000426Store file type information in directory entries.
Theodore Ts'oce57f142001-04-26 04:25:39 +0000427.TP
428.B has_journal
Theodore Ts'o82b39c92002-09-29 19:08:38 -0400429Use a journal to ensure filesystem consistency even across unclean shutdowns.
430Setting the filesystem feature is equivalent to using the
Theodore Ts'oce57f142001-04-26 04:25:39 +0000431.B \-j
Theodore Ts'o82b39c92002-09-29 19:08:38 -0400432option.
Theodore Ts'occbed852003-04-11 13:32:31 -0400433.TP
434.B sparse_super
435Limit the number of backup superblocks to save space on large filesystems.
Theodore Ts'o037914e2008-02-26 17:31:06 -0500436.TP
437.B resize_inode
438Reserve space so the block group descriptor table may grow in the
439future.
440.B Tune2fs
441only supports clearing this filesystem feature.
Jose R. Santos4e988cb2007-10-21 21:03:41 -0500442.TP
443.B uninit_groups
444Allow the kernel to initialize bitmaps and inode tables and keep a high
445watermark for the unused inodes in a filesystem, to reduce
446.BR e2fsck (8)
447time.
Theodore Ts'oce57f142001-04-26 04:25:39 +0000448.RE
449.IP
Theodore Ts'o39567c42001-09-19 15:28:21 -0400450After setting or clearing
Theodore Ts'o037914e2008-02-26 17:31:06 -0500451.BR sparse_super ,
Jose R. Santos4e988cb2007-10-21 21:03:41 -0500452.BR uninit_groups ,
Theodore Ts'o037914e2008-02-26 17:31:06 -0500453.BR filetype ,
454or
455.B resize_inode
Theodore Ts'o39567c42001-09-19 15:28:21 -0400456filesystem features,
Theodore Ts'oce57f142001-04-26 04:25:39 +0000457.BR e2fsck (8)
Theodore Ts'o251395d2001-05-14 04:43:05 +0000458must be run on the filesystem to return the filesystem to a consistent state.
Theodore Ts'o39567c42001-09-19 15:28:21 -0400459.B Tune2fs
460will print a message requesting that the system administrator run
461.BR e2fsck (8)
Theodore Ts'o45e18ad2004-09-17 17:31:16 -0400462if necessary. After setting the
463.B dir_index
464feature,
465.B e2fsck -D
466can be run to convert existing directories to the hashed B-tree format.
Theodore Ts'oce57f142001-04-26 04:25:39 +0000467.TP
468.BI \-r " reserved-blocks-count"
469Set the number of reserved filesystem blocks.
470.TP
Theodore Ts'od4de4aa2001-12-26 08:58:01 -0500471.BI \-T " time-last-checked"
472Set the time the filesystem was last checked using
473.BR e2fsck .
474This can be useful in scripts which use a Logical Volume Manager to make
475a consistent snapshot of a filesystem, and then check the filesystem
476during off hours to make sure it hasn't been corrupted due to
477hardware problems, etc. If the filesystem was clean, then this option can
478be used to set the last checked time on the original filesystem. The format
479of
480.I time-last-checked
481is the international date format, with an optional time specifier, i.e.
Theodore Ts'o9a85c2a2006-09-12 02:33:08 -0400482YYYYMMDD[HH[MM[SS]]]. The keyword
Theodore Ts'od4de4aa2001-12-26 08:58:01 -0500483.B now
484is also accepted, in which case the last checked time will be set to the
485current time.
486.TP
Theodore Ts'oce57f142001-04-26 04:25:39 +0000487.BI \-u " user"
488Set the user who can use the reserved filesystem blocks.
489.I user
490can be a numerical uid or a user name. If a user name is given, it
491is converted to a numerical uid before it is stored in the superblock.
Theodore Ts'o896938d1999-10-23 01:04:50 +0000492.TP
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +0000493.BI \-U " UUID"
Theodore Ts'o8d641742001-05-14 04:12:27 +0000494Set the universally unique identifier (UUID) of the filesystem to
Theodore Ts'oce57f142001-04-26 04:25:39 +0000495.IR UUID .
Theodore Ts'of044b4d2002-08-17 13:32:21 -0400496The format of the UUID is a series of hex digits separated by hyphens,
Theodore Ts'oce57f142001-04-26 04:25:39 +0000497like this:
498"c1b9d5a2-f162-11cf-9ece-0020afc76f16".
499The
500.I UUID
501parameter may also be one of the following:
502.RS 1.2i
503.TP
504.I clear
505clear the filesystem UUID
506.TP
507.I random
508generate a new randomly-generated UUID
509.TP
510.I time
511generate a new time-based UUID
512.RE
513.IP
Andreas Dilger2d155762001-08-17 03:48:11 -0600514The UUID may be used by
515.BR mount (8),
516.BR fsck (8),
517and
518.BR /etc/fstab (5)
519(and possibly others) by specifying
520.BI UUID= uuid
521instead of a block special device name like
522.BR /dev/hda1 .
523.IP
Theodore Ts'oce57f142001-04-26 04:25:39 +0000524See
525.BR uuidgen (8)
526for more information.
527If the system does not have a good random number generator such as
528.I /dev/random
529or
530.IR /dev/urandom ,
531.B tune2fs
532will automatically use a time-based UUID instead of a randomly-generated UUID.
Theodore Ts'o3839e651997-04-26 13:21:57 +0000533.SH BUGS
Theodore Ts'o63985322001-01-03 17:02:13 +0000534We haven't found any bugs yet. That doesn't mean there aren't any...
Theodore Ts'o3839e651997-04-26 13:21:57 +0000535.SH AUTHOR
536.B tune2fs
Theodore Ts'o2e5a1b92004-01-31 20:27:36 -0500537was written by Remy Card <Remy.Card@linux.org>. It is currently being
538maintained by Theodore Ts'o <tytso@alum.mit.edu>.
Theodore Ts'o3839e651997-04-26 13:21:57 +0000539.B tune2fs
Theodore Ts'oa418d3a1997-04-26 14:00:26 +0000540uses the ext2fs library written by Theodore Ts'o <tytso@mit.edu>.
Theodore Ts'o3839e651997-04-26 13:21:57 +0000541This manual page was written by Christian Kuhtz <chk@data-hh.Hanse.DE>.
Theodore Ts'o66cf2f62001-06-14 06:42:44 +0000542Time-dependent checking was added by Uwe Ohse <uwe@tirka.gun.de>.
Theodore Ts'o3839e651997-04-26 13:21:57 +0000543.SH AVAILABILITY
544.B tune2fs
Theodore Ts'o12da49c2001-05-12 15:49:17 +0000545is part of the e2fsprogs package and is available from
Theodore Ts'o348e43d2001-05-03 14:43:43 +0000546http://e2fsprogs.sourceforge.net.
Theodore Ts'o3839e651997-04-26 13:21:57 +0000547.SH SEE ALSO
Andreas Mohr0fd2f902008-02-28 20:50:05 -0500548.BR debugfs (8),
Theodore Ts'o3839e651997-04-26 13:21:57 +0000549.BR dumpe2fs (8),
550.BR e2fsck (8),
551.BR mke2fs (8)