blob: 94557076cdddff0637170acbe488fb3e7c8ed5c6 [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'o4f858542009-05-30 12:34:28 -04007tune2fs \- adjust tunable filesystem parameters on ext2/ext3/ext4 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[
Aditya Kali771e8db2011-07-20 11:40:05 -070080.B \-Q
81.I quota-options
82]
83[
Theodore Ts'od4de4aa2001-12-26 08:58:01 -050084.B \-T
85.I time-last-checked
86]
87[
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +000088.B \-U
Theodore Ts'o1e3472c1997-04-29 14:53:37 +000089.I UUID
90]
Theodore Ts'o3839e651997-04-26 13:21:57 +000091device
92.SH DESCRIPTION
93.BI tune2fs
Theodore Ts'oa7ac1df2003-08-24 17:56:41 -040094allows the system administrator to adjust various tunable filesystem
Theodore Ts'o4f858542009-05-30 12:34:28 -040095parameters on Linux ext2, ext3, or ext4 filesystems. The current values
96of these options can be displayed by using the
Theodore Ts'oc927bec2009-04-18 11:39:22 -040097.B -l
98option to
99.BR tune2fs (8)
100program, or by using the
101.BR dumpe2fs (8)
102program.
Theodore Ts'o99464782010-09-25 21:41:21 -0400103.PP
104The
105.I device
Theodore Ts'o585545e2012-07-14 19:58:06 -0400106specifier can either be a filename (i.e., /dev/sda1), or a LABEL or UUID
107specifier: "\fBLABEL=\fIvolume-name\fR" or "\fBUUID=\fIuuid\fR". (i.e.,
Theodore Ts'o99464782010-09-25 21:41:21 -0400108LABEL=home or UUID=e40486c6-84d5-4f2f-b99c-032281799c9d).
Theodore Ts'o3839e651997-04-26 13:21:57 +0000109.SH OPTIONS
110.TP
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +0000111.BI \-c " max-mount-counts"
Theodore Ts'oe0f72cf2006-05-14 18:09:12 -0400112Adjust the number of mounts after which the filesystem will be checked by
113.BR e2fsck (8).
114If
Theodore Ts'o45d9e2f2000-07-07 03:12:54 +0000115.I max-mount-counts
Theodore Ts'o7b921b92005-05-06 12:04:10 -0400116is 0 or \-1, the number of times the filesystem is mounted will be disregarded
Theodore Ts'o66cf2f62001-06-14 06:42:44 +0000117by
118.BR e2fsck (8)
119and the kernel.
120.sp
121Staggering the mount-counts at which filesystems are forcibly
122checked will avoid all filesystems being checked at one time
123when using journaled filesystems.
124.sp
125You should strongly consider the consequences of disabling
126mount-count-dependent checking entirely. Bad disk drives, cables,
127memory, and kernel bugs could all corrupt a filesystem without
128marking the filesystem dirty or in error. If you are using
129journaling on your filesystem, your filesystem will
130.B never
131be marked dirty, so it will not normally be checked. A
132filesystem error detected by the kernel will still force
133an fsck on the next reboot, but it may already be too late
134to prevent data loss at that point.
135.sp
136See also the
137.B \-i
138option for time-dependent checking.
Theodore Ts'o3839e651997-04-26 13:21:57 +0000139.TP
Theodore Ts'oce57f142001-04-26 04:25:39 +0000140.BI \-C " mount-count"
141Set the number of times the filesystem has been mounted.
Theodore Ts'oe0f72cf2006-05-14 18:09:12 -0400142If set to a greater value than the max-mount-counts parameter
143set by the
144.B \-c
145option,
146.BR e2fsck (8)
147will check the filesystem at the next reboot.
Theodore Ts'oce57f142001-04-26 04:25:39 +0000148.TP
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +0000149.BI \-e " error-behavior"
Theodore Ts'oce57f142001-04-26 04:25:39 +0000150Change the behavior of the kernel code when errors are detected.
Theodore Ts'o66cf2f62001-06-14 06:42:44 +0000151In all cases, a filesystem error will cause
152.BR e2fsck (8)
153to check the filesystem on the next boot.
Theodore Ts'o583ccdc1997-05-09 03:06:31 +0000154.I error-behavior
155can be one of the following:
Theodore Ts'oce57f142001-04-26 04:25:39 +0000156.RS 1.2i
157.TP 1.2i
158.B continue
159Continue normal execution.
160.TP
161.B remount-ro
162Remount filesystem read-only.
163.TP
164.B panic
165Cause a kernel panic.
166.RE
Theodore Ts'o3839e651997-04-26 13:21:57 +0000167.TP
Theodore Ts'o6cb27402008-01-26 19:06:35 -0500168.BI \-E " extended-options"
169Set extended options for the filesystem. Extended options are comma
Theodore Ts'o0c17cb22008-02-18 22:56:25 -0500170separated, and may take an argument using the equals ('=') sign.
171The following extended options are supported:
Theodore Ts'o6cb27402008-01-26 19:06:35 -0500172.RS 1.2i
173.TP
Andreas Dilger0f5eba72011-09-24 13:48:55 -0400174.B clear_mmp
175Reset the MMP block (if any) back to the clean state. Use only if
176absolutely certain the device is not currently mounted or being
177fscked, or major filesystem corruption can result. Needs '-f'.
178.TP
179.BI mmp_update_interval= interval
180Adjust the initial MMP update interval to
181.I interval
182seconds. Specifying an
183.I interval
184of 0 means to use the default interval. The specified interval must
185be less than 300 seconds. Requires that the
186.B mmp
187feature be enabled.
188.TP
Theodore Ts'o0c17cb22008-02-18 22:56:25 -0500189.BI stride= stride-size
190Configure the filesystem for a RAID array with
191.I stride-size
192filesystem blocks. This is the number of blocks read or written to disk
193before moving to next disk. This mostly affects placement of filesystem
194metadata like bitmaps at
195.BR mke2fs (2)
Theodore Ts'o711d3842008-09-07 14:08:40 -0400196time to avoid placing them on a single disk, which can hurt the performance.
Theodore Ts'o0c17cb22008-02-18 22:56:25 -0500197It may also be used by block allocator.
198.TP
Theodore Ts'o10ff68d2008-08-29 21:21:19 -0400199.BI stripe_width= stripe-width
Theodore Ts'o0c17cb22008-02-18 22:56:25 -0500200Configure the filesystem for a RAID array with
201.I stripe-width
202filesystem blocks per stripe. This is typically be stride-size * N, where
203N is the number of data disks in the RAID (e.g. RAID 5 N+1, RAID 6 N+2).
204This allows the block allocator to prevent read-modify-write of the
205parity in a RAID stripe if possible when the data is written.
206.TP
Theodore Ts'o10ff68d2008-08-29 21:21:19 -0400207.BI hash_alg= hash-alg
208Set the default hash algorithm used for filesystems with hashed b-tree
209directories. Valid algorithms accepted are:
210.IR legacy ,
211.IR half_md4 ,
212and
213.IR tea .
214.TP
Theodore Ts'o9345f022010-09-18 19:38:22 -0400215.BI mount_opts= mount_option_string
216Set a set of default mount options which will be used when the file
217system is mounted. Unlike the bitmask-based default mount options which
218can be specified with the
219.B -o
220option,
221.I mount_option_string
222is an arbitrary string with a maximum length of 63 bytes, which is
223stored in the superblock.
224.IP
225The ext4 file system driver will first apply
226the bitmask-based default options, and then parse the
227.IR mount_option_string ,
228before parsing the mount options passed from the
229.BR mount (8)
230program.
231.IP
232This superblock setting is only honored in 2.6.35+ kernels;
233and not at all by the ext2 and ext3 file system drivers.
234.TP
Theodore Ts'o6cb27402008-01-26 19:06:35 -0500235.B test_fs
236Set a flag in the filesystem superblock indicating that it may be
237mounted using experimental kernel code, such as the ext4dev filesystem.
238.TP
239.B ^test_fs
240Clear the test_fs flag, indicating the filesystem should only be mounted
241using production-level filesystem code.
242.RE
243.TP
Theodore Ts'o177ab2b2002-01-27 18:23:49 -0500244.B \-f
245Force the tune2fs operation to complete even in the face of errors. This
246option is useful when removing the
247.B has_journal
248filesystem feature from a filesystem which has
249an external journal (or is corrupted
250such that it appears to have an external journal), but that
251external journal is not available.
252.sp
253.B WARNING:
254Removing an external journal from a filesystem which was not cleanly unmounted
255without first replaying the external journal can result in
256severe data loss and filesystem corruption.
257.TP
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +0000258.BI \-g " group"
Theodore Ts'ofebac232007-07-11 23:20:17 -0400259Set the group which can use the reserved filesystem blocks.
Theodore Ts'oce57f142001-04-26 04:25:39 +0000260The
Theodore Ts'of3db3561997-04-26 13:34:30 +0000261.I group
Theodore Ts'oce57f142001-04-26 04:25:39 +0000262parameter can be a numerical gid or a group name. If a group name is given,
Theodore Ts'oe1c6b2f2000-12-02 06:19:33 +0000263it is converted to a numerical gid before it is stored in the superblock.
Theodore Ts'of3db3561997-04-26 13:34:30 +0000264.TP
Theodore Ts'oce57f142001-04-26 04:25:39 +0000265.B \-i " \fIinterval-between-checks\fR[\fBd\fR|\fBm\fR|\fBw\fR]"
266Adjust the maximal time between two filesystem checks.
Theodore Ts'oc5fbf382009-10-24 14:25:39 -0400267No suffix or
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +0000268.B d
Theodore Ts'oc5fbf382009-10-24 14:25:39 -0400269will interpret the number
270.I interval-between-checks
271as days,
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +0000272.B m
Theodore Ts'oc5fbf382009-10-24 14:25:39 -0400273as months, and
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +0000274.B w
Theodore Ts'oc5fbf382009-10-24 14:25:39 -0400275as weeks. A value of zero will disable the time-dependent checking.
Theodore Ts'o66cf2f62001-06-14 06:42:44 +0000276.sp
277It is strongly recommended that either
278.B \-c
279(mount-count-dependent) or
280.B \-i
281(time-dependent) checking be enabled to force periodic full
282.BR e2fsck (8)
283checking of the filesystem. Failure to do so may lead to filesystem
Theodore Ts'o9a85c2a2006-09-12 02:33:08 -0400284corruption (due to bad disks, cables, memory, or kernel bugs) going
285unnoticed, ultimately resulting in data loss or corruption.
Theodore Ts'o3839e651997-04-26 13:21:57 +0000286.TP
Theodore Ts'o66cf2f62001-06-14 06:42:44 +0000287.B \-j
Theodore Ts'oce57f142001-04-26 04:25:39 +0000288Add an ext3 journal to the filesystem. If the
Theodore Ts'odc2ec522001-01-18 01:51:15 +0000289.B \-J
Theodore Ts'o8d641742001-05-14 04:12:27 +0000290option is not specified, the default journal parameters will be used to create
Theodore Ts'odc2ec522001-01-18 01:51:15 +0000291an appropriately sized journal (given the size of the filesystem)
Theodore Ts'oce57f142001-04-26 04:25:39 +0000292stored within the filesystem. Note that you must be using a kernel
293which has ext3 support in order to actually make use of the journal.
Theodore Ts'o91d71c42004-09-19 07:34:35 -0400294.IP
295If this option is used to create a journal on a mounted filesystem, an
296immutable file,
297.BR .journal ,
298will be created in the top-level directory of the filesystem, as it is
299the only safe way to create the journal inode while the filesystem is
300mounted. While the ext3 journal is visible, it is not safe to
301delete it, or modify it while the filesystem is mounted; for this
302reason the file is marked immutable.
303While checking unmounted filesystems,
304.BR e2fsck (8)
305will automatically move
306.B .journal
307files to the invisible, reserved journal inode. For all filesystems
308except for the root filesystem, this should happen automatically and
309naturally during the next reboot cycle. Since the root filesystem is
310mounted read-only,
311.BR e2fsck (8)
312must be run from a rescue floppy in order to effect this transition.
313.IP
314On some distributions, such as Debian, if an initial ramdisk is used,
315the initrd scripts will automatically convert an ext2 root filesystem
316to ext3 if the
317.BR /etc/fstab
318file specifies the ext3 filesystem for the root filesystem in order to
319avoid requiring the use of a rescue floppy to add an ext3 journal to
320the root filesystem.
Theodore Ts'odc2ec522001-01-18 01:51:15 +0000321.TP
Theodore Ts'o8d641742001-05-14 04:12:27 +0000322.BR \-J " journal-options"
Theodore Ts'oce57f142001-04-26 04:25:39 +0000323Override the default ext3 journal parameters. Journal options are comma
Theodore Ts'o08dd8302001-01-14 16:25:58 +0000324separated, and may take an argument using the equals ('=') sign.
Theodore Ts'oce57f142001-04-26 04:25:39 +0000325The following journal options are supported:
326.RS 1.2i
Theodore Ts'odc2ec522001-01-18 01:51:15 +0000327.TP
Theodore Ts'oce57f142001-04-26 04:25:39 +0000328.BI size= journal-size
Theodore Ts'odc2ec522001-01-18 01:51:15 +0000329Create a journal stored in the filesystem of size
Theodore Ts'o251395d2001-05-14 04:43:05 +0000330.I journal-size
331megabytes. The size of the journal must be at least 1024 filesystem blocks
332(i.e., 1MB if using 1k blocks, 4MB if using 4k blocks, etc.)
333and may be no more than 102,400 filesystem blocks.
334There must be enough free space in the filesystem to create a journal of
Theodore Ts'odc2ec522001-01-18 01:51:15 +0000335that size.
Theodore Ts'ob8182052014-01-28 12:58:56 -0500336.TP
337.BI location =journal-location
338Specify the location of the journal. The argument
339.I journal-location
340can either be specified as a block number, or if the number has a units
341suffix (e.g., 'M', 'G', etc.) interpret it as the offset from the
342beginning of the file system.
Theodore Ts'oce57f142001-04-26 04:25:39 +0000343@JDEV@.TP
344@JDEV@.BI device= external-journal
Theodore Ts'o251395d2001-05-14 04:43:05 +0000345@JDEV@Attach the filesystem to the journal block device located on
346@JDEV@.IR external-journal .
Theodore Ts'oce57f142001-04-26 04:25:39 +0000347@JDEV@The external
348@JDEV@journal must have been already created using the command
Theodore Ts'o251395d2001-05-14 04:43:05 +0000349@JDEV@.IP
Theodore Ts'oce57f142001-04-26 04:25:39 +0000350@JDEV@.B mke2fs -O journal_dev
Theodore Ts'oe9a2d072001-06-14 07:15:02 +0000351@JDEV@.I external-journal
Theodore Ts'o251395d2001-05-14 04:43:05 +0000352@JDEV@.IP
353@JDEV@Note that
354@JDEV@.I external-journal
355@JDEV@must be formatted with the same block
356@JDEV@size as filesystems which will be using it.
Theodore Ts'o3024d882006-03-27 11:53:00 -0500357@JDEV@In addition, while there is support for attaching
358@JDEV@multiple filesystems to a single external journal,
359@JDEV@the Linux kernel and
360@JDEV@.BR e2fsck (8)
361@JDEV@do not currently support shared external journals yet.
Andreas Dilger2d155762001-08-17 03:48:11 -0600362@JDEV@.IP
363@JDEV@Instead of specifying a device name directly,
364@JDEV@.I external-journal
365@JDEV@can also be specified by either
366@JDEV@.BI LABEL= label
367@JDEV@or
368@JDEV@.BI UUID= UUID
369@JDEV@to locate the external journal by either the volume label or UUID
370@JDEV@stored in the ext2 superblock at the start of the journal. Use
371@JDEV@.BR dumpe2fs (8)
372@JDEV@to display a journal device's volume label and UUID. See also the
373@JDEV@.B -L
374@JDEV@option of
375@JDEV@.BR tune2fs (8).
Theodore Ts'oce57f142001-04-26 04:25:39 +0000376.RE
377@JDEV@.IP
378@JDEV@Only one of the
379@JDEV@.BR size " or " device
380@JDEV@options can be given for a filesystem.
Theodore Ts'o08dd8302001-01-14 16:25:58 +0000381.TP
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +0000382.B \-l
Theodore Ts'oc927bec2009-04-18 11:39:22 -0400383List the contents of the filesystem superblock, including the current
384values of the parameters that can be set via this program.
Theodore Ts'o1e3472c1997-04-29 14:53:37 +0000385.TP
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +0000386.BI \-L " volume-label"
Theodore Ts'oce57f142001-04-26 04:25:39 +0000387Set the volume label of the filesystem.
Theodore Ts'oa789d841998-03-30 01:20:55 +0000388Ext2 filesystem labels can be at most 16 characters long; if
389.I volume-label
390is longer than 16 characters,
391.B tune2fs
Andreas Dilger2d155762001-08-17 03:48:11 -0600392will truncate it and print a warning. The volume label can be used
393by
394.BR mount (8),
395.BR fsck (8),
396and
397.BR /etc/fstab (5)
398(and possibly others) by specifying
399.BI LABEL= volume_label
400instead of a block special device name like
401.BR /dev/hda5 .
Theodore Ts'oce57f142001-04-26 04:25:39 +0000402.TP
403.BI \-m " reserved-blocks-percentage"
Theodore Ts'ofebac232007-07-11 23:20:17 -0400404Set the percentage of the filesystem which may only be allocated
405by privileged processes. Reserving some number of filesystem blocks
406for use by privileged processes is done
407to avoid filesystem fragmentation, and to allow system
408daemons, such as
409.BR syslogd (8),
410to continue to function correctly after non-privileged processes are
411prevented from writing to the filesystem. Normally, the default percentage
412of reserved blocks is 5%.
Theodore Ts'o1e3472c1997-04-29 14:53:37 +0000413.TP
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +0000414.BI \-M " last-mounted-directory"
Theodore Ts'oce57f142001-04-26 04:25:39 +0000415Set the last-mounted directory for the filesystem.
Theodore Ts'o1e3472c1997-04-29 14:53:37 +0000416.TP
Theodore Ts'oa0c3fd52002-10-15 17:43:43 -0400417.BR \-o " [^]\fImount-option\fR[,...]"
418Set or clear the indicated default mount options in the filesystem.
Theodore Ts'o81393672005-04-16 14:05:09 -0400419Default mount options can be overridden by mount options specified
Theodore Ts'oa0c3fd52002-10-15 17:43:43 -0400420either in
421.BR /etc/fstab (5)
422or on the command line arguments to
423.BR mount (8).
424Older kernels may not support this feature; in particular,
425kernels which predate 2.4.20 will almost certainly ignore the
426default mount options field in the superblock.
427.IP
428More than one mount option can be cleared or set by separating
429features with commas. Mount options prefixed with a
430caret character ('^') will be cleared in the filesystem's superblock;
431mount options without a prefix character or prefixed with a plus
432character ('+') will be added to the filesystem.
433.IP
434The following mount options can be set or cleared using
435.BR tune2fs :
436.RS 1.2i
437.TP
438.B debug
439Enable debugging code for this filesystem.
440.TP
441.B bsdgroups
Theodore Ts'o585545e2012-07-14 19:58:06 -0400442Emulate BSD behavior when creating new files: they will take the group-id
443of the directory in which they were created. The standard System V behavior
Theodore Ts'o77be4d22003-03-06 12:39:55 -0500444is the default, where newly created files take on the fsgid of the current
Theodore Ts'o81393672005-04-16 14:05:09 -0400445process, unless the directory has the setgid bit set, in which case it takes
Theodore Ts'oa0c3fd52002-10-15 17:43:43 -0400446the gid from the parent directory, and also gets the setgid bit set if it is
Theodore Ts'o9a85c2a2006-09-12 02:33:08 -0400447a directory itself.
Theodore Ts'oa0c3fd52002-10-15 17:43:43 -0400448.TP
449.B user_xattr
450Enable user-specified extended attributes.
451.TP
452.B acl
453Enable Posix Access Control Lists.
454.TP
455.B uid16
456Disables 32-bit UIDs and GIDs. This is for interoperability with
457older kernels which only store and expect 16-bit values.
Theodore Ts'o2bae5432002-10-25 16:21:03 -0400458.TP
459.B journal_data
460When the filesystem is mounted with journalling enabled, all data
461(not just metadata) is committed into the journal prior to being written
462into the main filesystem.
463.TP
464.B journal_data_ordered
465When the filesystem is mounted with journalling enabled, all data is forced
Theodore Ts'occdd1d62004-04-11 17:02:44 -0400466directly out to the main file system prior to its metadata being committed
Theodore Ts'o2bae5432002-10-25 16:21:03 -0400467to the journal.
468.TP
469.B journal_data_writeback
470When the filesystem is mounted with journalling enabled, data may be
Theodore Ts'occdd1d62004-04-11 17:02:44 -0400471written into the main filesystem after its metadata has been committed
Theodore Ts'o2bae5432002-10-25 16:21:03 -0400472to the journal. This may increase throughput, however, it may allow old
473data to appear in files after a crash and journal recovery.
Theodore Ts'o9345f022010-09-18 19:38:22 -0400474.TP
475.B nobarrier
476The file system will be mounted with barrier operations in the journal
477disabled. (This option is currently only supported by the ext4 file
478system driver in 2.6.35+ kernels.)
479.TP
480.B block_validity
481The file system will be mounted with the block_validity option enabled,
482which causes extra checks to be performed after reading or writing from
483the file system. This prevents corrupted metadata blocks from causing
484file system damage by overwriting parts of the inode table or block
485group descriptors. This comes at the cost of increased memory and CPU
486overhead, so it is enabled only for debugging purposes. (This option is
487currently only supported by the ext4 file system driver in 2.6.35+
488kernels.)
489.TP
490.B discard
Theodore Ts'o585545e2012-07-14 19:58:06 -0400491The file system will be mounted with the discard mount option. This will
Theodore Ts'o9345f022010-09-18 19:38:22 -0400492cause the file system driver to attempt to use the trim/discard feature
493of some storage devices (such as SSD's and thin-provisioned drives
494available in some enterprise storage arrays) to inform the storage
495device that blocks belonging to deleted files can be reused for other
496purposes. (This option is currently only supported by the ext4 file
497system driver in 2.6.35+ kernels.)
498.TP
499.B nodelalloc
500The file system will be mounted with the nodelalloc mount option. This
501will disable the delayed allocation feature. (This option is currently
502only supported by the ext4 file system driver in 2.6.35+ kernels.)
Theodore Ts'oa0c3fd52002-10-15 17:43:43 -0400503.RE
504.TP
Theodore Ts'o251395d2001-05-14 04:43:05 +0000505.BR \-O " [^]\fIfeature\fR[,...]"
506Set or clear the indicated filesystem features (options) in the filesystem.
Theodore Ts'oce57f142001-04-26 04:25:39 +0000507More than one filesystem feature can be cleared or set by separating
508features with commas. Filesystem features prefixed with a
509caret character ('^') will be cleared in the filesystem's superblock;
510filesystem features without a prefix character or prefixed with a plus
Theodore Ts'o3c22bf72013-12-24 15:15:31 -0500511character ('+') will be added to the filesystem. For a detailed
512description of the file system features, please see the man page
513.BR ext4 (5).
Theodore Ts'oce57f142001-04-26 04:25:39 +0000514.IP
515The following filesystem features can be set or cleared using
Theodore Ts'o251395d2001-05-14 04:43:05 +0000516.BR tune2fs :
Theodore Ts'oce57f142001-04-26 04:25:39 +0000517.RS 1.2i
518.TP
Theodore Ts'occbed852003-04-11 13:32:31 -0400519.B dir_index
Theodore Ts'o3c22bf72013-12-24 15:15:31 -0500520Use hashed b-trees to speed up lookups for large directories.
Theodore Ts'oce57f142001-04-26 04:25:39 +0000521.TP
Andreas Dilger25bc8c72011-06-11 11:29:54 -0400522.B dir_nlink
523Allow more than 65000 subdirectories per directory.
524.TP
Theodore Ts'o3c22bf72013-12-24 15:15:31 -0500525.B extent
526Enable the use of extent trees to store the location of data blocks in inodes.
527.TP
528.B extra_isize
529Enable the extended inode fields used by ext4.
530.TP
Theodore Ts'oce57f142001-04-26 04:25:39 +0000531.B filetype
Theodore Ts'o251395d2001-05-14 04:43:05 +0000532Store file type information in directory entries.
Theodore Ts'oce57f142001-04-26 04:25:39 +0000533.TP
Theodore Ts'o73ebdf92009-09-07 14:53:44 -0400534.B flex_bg
535Allow bitmaps and inode tables for a block group to be placed
Theodore Ts'o7a9f0552009-09-07 15:17:51 -0400536anywhere on the storage media. \fBTune2fs\fR will not reorganize
537the location of the inode tables and allocation bitmaps, as
538.BR mke2fs (8)
Theodore Ts'o585545e2012-07-14 19:58:06 -0400539will do when it creates a freshly formatted file system with
Theodore Ts'o7a9f0552009-09-07 15:17:51 -0400540.B flex_bg
541enabled.
Theodore Ts'o73ebdf92009-09-07 14:53:44 -0400542.TP
Theodore Ts'oce57f142001-04-26 04:25:39 +0000543.B has_journal
Theodore Ts'o82b39c92002-09-29 19:08:38 -0400544Use a journal to ensure filesystem consistency even across unclean shutdowns.
545Setting the filesystem feature is equivalent to using the
Theodore Ts'oce57f142001-04-26 04:25:39 +0000546.B \-j
Theodore Ts'o82b39c92002-09-29 19:08:38 -0400547option.
Theodore Ts'occbed852003-04-11 13:32:31 -0400548.TP
Theodore Ts'o3c22bf72013-12-24 15:15:31 -0500549.B huge_file
550Support files larger than 2 terabytes in size.
551.TP
Theodore Ts'o73ebdf92009-09-07 14:53:44 -0400552.B large_file
Theodore Ts'o3c22bf72013-12-24 15:15:31 -0500553Filesystem can contain files that are greater than 2GB.
Theodore Ts'o037914e2008-02-26 17:31:06 -0500554.TP
555.B resize_inode
556Reserve space so the block group descriptor table may grow in the
557future.
558.B Tune2fs
559only supports clearing this filesystem feature.
Jose R. Santos4e988cb2007-10-21 21:03:41 -0500560.TP
Andreas Dilger0f5eba72011-09-24 13:48:55 -0400561.B mmp
Theodore Ts'o3c22bf72013-12-24 15:15:31 -0500562Enable or disable multiple mount protection (MMP) feature.
563@QUOTA_MAN_COMMENT@.TP
564@QUOTA_MAN_COMMENT@.B quota
565@QUOTA_MAN_COMMENT@Enable internal file system quota inodes.
Andreas Dilger0f5eba72011-09-24 13:48:55 -0400566.TP
Theodore Ts'o73ebdf92009-09-07 14:53:44 -0400567.B sparse_super
568Limit the number of backup superblocks to save space on large filesystems.
569.TP
Theodore Ts'o2930dad2008-04-17 23:31:44 -0400570.B uninit_bg
Theodore Ts'o3c22bf72013-12-24 15:15:31 -0500571Allow the kernel to initialize bitmaps and inode tables lazily, and to
572keep a high watermark for the unused inodes in a filesystem, to reduce
Jose R. Santos4e988cb2007-10-21 21:03:41 -0500573.BR e2fsck (8)
Andreas Dilger4237c732008-03-30 14:13:03 -0400574time. This first e2fsck run after enabling this feature will take the
575full time, but subsequent e2fsck runs will take only a fraction of the
576original time, depending on how full the file system is.
Theodore Ts'oce57f142001-04-26 04:25:39 +0000577.RE
578.IP
Theodore Ts'o39567c42001-09-19 15:28:21 -0400579After setting or clearing
Theodore Ts'o037914e2008-02-26 17:31:06 -0500580.BR sparse_super ,
Theodore Ts'o2930dad2008-04-17 23:31:44 -0400581.BR uninit_bg ,
Theodore Ts'o037914e2008-02-26 17:31:06 -0500582.BR filetype ,
583or
584.B resize_inode
Theodore Ts'o39567c42001-09-19 15:28:21 -0400585filesystem features,
Theodore Ts'oce57f142001-04-26 04:25:39 +0000586.BR e2fsck (8)
Theodore Ts'o251395d2001-05-14 04:43:05 +0000587must be run on the filesystem to return the filesystem to a consistent state.
Theodore Ts'o39567c42001-09-19 15:28:21 -0400588.B Tune2fs
589will print a message requesting that the system administrator run
590.BR e2fsck (8)
Theodore Ts'o45e18ad2004-09-17 17:31:16 -0400591if necessary. After setting the
592.B dir_index
593feature,
594.B e2fsck -D
595can be run to convert existing directories to the hashed B-tree format.
Andreas Dilger4237c732008-03-30 14:13:03 -0400596Enabling certain filesystem features may prevent the filesystem from being
Theodore Ts'o73ebdf92009-09-07 14:53:44 -0400597mounted by kernels which do not support those features. In particular, the
Theodore Ts'o2930dad2008-04-17 23:31:44 -0400598.BR uninit_bg
Andreas Dilger4237c732008-03-30 14:13:03 -0400599and
600.BR flex_bg
601features are only supported by the ext4 filesystem.
Theodore Ts'oce57f142001-04-26 04:25:39 +0000602.TP
Andreas Dilger0f5eba72011-09-24 13:48:55 -0400603.BI \-p " mmp_check_interval"
604Set the desired MMP check interval in seconds. It is 5 seconds by default.
605.TP
Theodore Ts'oce57f142001-04-26 04:25:39 +0000606.BI \-r " reserved-blocks-count"
607Set the number of reserved filesystem blocks.
608.TP
Aditya Kali771e8db2011-07-20 11:40:05 -0700609.BI \-Q " quota-options"
610Sets 'quota' feature on the superblock and works on the quota files for the
611given quota type. Quota options could be one or more of the following:
612.RS 1.2i
613.TP
614.BR [^]usrquota
615Sets/clears user quota inode in the superblock.
David Prévotb75a4ce2012-03-26 10:45:51 -0700616.TP
617.BR [^]grpquota
Aditya Kali771e8db2011-07-20 11:40:05 -0700618Sets/clears group quota inode in the superblock.
Aditya Kalia99145e2012-04-24 14:26:13 -0400619.RE
Aditya Kali771e8db2011-07-20 11:40:05 -0700620.TP
Theodore Ts'od4de4aa2001-12-26 08:58:01 -0500621.BI \-T " time-last-checked"
622Set the time the filesystem was last checked using
623.BR e2fsck .
Theodore Ts'o402b95d2008-03-21 09:25:23 -0400624The time is interpreted using the current (local) timezone.
Theodore Ts'od4de4aa2001-12-26 08:58:01 -0500625This can be useful in scripts which use a Logical Volume Manager to make
626a consistent snapshot of a filesystem, and then check the filesystem
627during off hours to make sure it hasn't been corrupted due to
628hardware problems, etc. If the filesystem was clean, then this option can
629be used to set the last checked time on the original filesystem. The format
630of
631.I time-last-checked
632is the international date format, with an optional time specifier, i.e.
Theodore Ts'o9a85c2a2006-09-12 02:33:08 -0400633YYYYMMDD[HH[MM[SS]]]. The keyword
Theodore Ts'od4de4aa2001-12-26 08:58:01 -0500634.B now
635is also accepted, in which case the last checked time will be set to the
636current time.
637.TP
Theodore Ts'oce57f142001-04-26 04:25:39 +0000638.BI \-u " user"
639Set the user who can use the reserved filesystem blocks.
640.I user
641can be a numerical uid or a user name. If a user name is given, it
642is converted to a numerical uid before it is stored in the superblock.
Theodore Ts'o896938d1999-10-23 01:04:50 +0000643.TP
Theodore Ts'ocaf8ce41999-10-21 19:56:34 +0000644.BI \-U " UUID"
Theodore Ts'o8d641742001-05-14 04:12:27 +0000645Set the universally unique identifier (UUID) of the filesystem to
Theodore Ts'oce57f142001-04-26 04:25:39 +0000646.IR UUID .
Theodore Ts'of044b4d2002-08-17 13:32:21 -0400647The format of the UUID is a series of hex digits separated by hyphens,
Theodore Ts'oce57f142001-04-26 04:25:39 +0000648like this:
649"c1b9d5a2-f162-11cf-9ece-0020afc76f16".
650The
651.I UUID
652parameter may also be one of the following:
653.RS 1.2i
654.TP
655.I clear
656clear the filesystem UUID
657.TP
658.I random
659generate a new randomly-generated UUID
660.TP
661.I time
662generate a new time-based UUID
663.RE
664.IP
Andreas Dilger2d155762001-08-17 03:48:11 -0600665The UUID may be used by
666.BR mount (8),
667.BR fsck (8),
668and
669.BR /etc/fstab (5)
670(and possibly others) by specifying
671.BI UUID= uuid
672instead of a block special device name like
673.BR /dev/hda1 .
674.IP
Theodore Ts'oce57f142001-04-26 04:25:39 +0000675See
676.BR uuidgen (8)
677for more information.
678If the system does not have a good random number generator such as
679.I /dev/random
680or
681.IR /dev/urandom ,
682.B tune2fs
683will automatically use a time-based UUID instead of a randomly-generated UUID.
Theodore Ts'o3839e651997-04-26 13:21:57 +0000684.SH BUGS
Theodore Ts'o63985322001-01-03 17:02:13 +0000685We haven't found any bugs yet. That doesn't mean there aren't any...
Theodore Ts'o3839e651997-04-26 13:21:57 +0000686.SH AUTHOR
687.B tune2fs
Theodore Ts'o2e5a1b92004-01-31 20:27:36 -0500688was written by Remy Card <Remy.Card@linux.org>. It is currently being
689maintained by Theodore Ts'o <tytso@alum.mit.edu>.
Theodore Ts'o3839e651997-04-26 13:21:57 +0000690.B tune2fs
Theodore Ts'oa418d3a1997-04-26 14:00:26 +0000691uses the ext2fs library written by Theodore Ts'o <tytso@mit.edu>.
Theodore Ts'o3839e651997-04-26 13:21:57 +0000692This manual page was written by Christian Kuhtz <chk@data-hh.Hanse.DE>.
Theodore Ts'o66cf2f62001-06-14 06:42:44 +0000693Time-dependent checking was added by Uwe Ohse <uwe@tirka.gun.de>.
Theodore Ts'o3839e651997-04-26 13:21:57 +0000694.SH AVAILABILITY
695.B tune2fs
Theodore Ts'o12da49c2001-05-12 15:49:17 +0000696is part of the e2fsprogs package and is available from
Theodore Ts'o348e43d2001-05-03 14:43:43 +0000697http://e2fsprogs.sourceforge.net.
Theodore Ts'o3839e651997-04-26 13:21:57 +0000698.SH SEE ALSO
Andreas Mohr0fd2f902008-02-28 20:50:05 -0500699.BR debugfs (8),
Theodore Ts'o3839e651997-04-26 13:21:57 +0000700.BR dumpe2fs (8),
701.BR e2fsck (8),
Theodore Ts'o3c22bf72013-12-24 15:15:31 -0500702.BR mke2fs (8),
703.BR ext4 (5)