1 .\" Revision 1.0 93/06/3 23:00 chk
5 .TH TUNE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
7 tune2fs \- adjust tunable filesystem parameters on second extended filesystems
26 .I interval-between-checks
37 .I reserved-blocks-percentage
41 .RI [^] mount-options [,...]
46 .I reserved-blocks-count
70 .I last-mounted-directory
74 .RI [^] feature [,...]
87 adjusts tunable filesystem parameters on a Linux second extended filesystem.
90 .BI \-c " max-mount-counts"
91 Adjust the maximal mounts count between two filesystem checks. If
93 is 0 then the number of times the filesystem is mounted will be disregarded
98 Staggering the mount-counts at which filesystems are forcibly
99 checked will avoid all filesystems being checked at one time
100 when using journaled filesystems.
102 You should strongly consider the consequences of disabling
103 mount-count-dependent checking entirely. Bad disk drives, cables,
104 memory, and kernel bugs could all corrupt a filesystem without
105 marking the filesystem dirty or in error. If you are using
106 journaling on your filesystem, your filesystem will
108 be marked dirty, so it will not normally be checked. A
109 filesystem error detected by the kernel will still force
110 an fsck on the next reboot, but it may already be too late
111 to prevent data loss at that point.
115 option for time-dependent checking.
117 .BI \-C " mount-count"
118 Set the number of times the filesystem has been mounted.
119 Can be used in conjunction with -c to force an fsck on
120 the filesystem at the next reboot.
122 .BI \-e " error-behavior"
123 Change the behavior of the kernel code when errors are detected.
124 In all cases, a filesystem error will cause
126 to check the filesystem on the next boot.
128 can be one of the following:
132 Continue normal execution.
135 Remount filesystem read-only.
138 Cause a kernel panic.
142 Force the tune2fs operation to complete even in the face of errors. This
143 option is useful when removing the
145 filesystem feature from a filesystem which has
146 an external journal (or is corrupted
147 such that it appears to have an external journal), but that
148 external journal is not available.
151 Removing an external journal from a filesystem which was not cleanly unmounted
152 without first replaying the external journal can result in
153 severe data loss and filesystem corruption.
156 Set the group which can use reserved filesystem blocks.
159 parameter can be a numerical gid or a group name. If a group name is given,
160 it is converted to a numerical gid before it is stored in the superblock.
162 .B \-i " \fIinterval-between-checks\fR[\fBd\fR|\fBm\fR|\fBw\fR]"
163 Adjust the maximal time between two filesystem checks.
170 in weeks. A value of zero will disable the time-dependent checking.
172 It is strongly recommended that either
174 (mount-count-dependent) or
176 (time-dependent) checking be enabled to force periodic full
178 checking of the filesystem. Failure to do so may lead to filesystem
179 corruption due to bad disks, cables, memory, or kernel bugs to go
180 unnoticed until they cause data loss or corruption.
183 Add an ext3 journal to the filesystem. If the
185 option is not specified, the default journal parameters will be used to create
186 an appropriately sized journal (given the size of the filesystem)
187 stored within the filesystem. Note that you must be using a kernel
188 which has ext3 support in order to actually make use of the journal.
190 .BR \-J " journal-options"
191 Override the default ext3 journal parameters. Journal options are comma
192 separated, and may take an argument using the equals ('=') sign.
193 The following journal options are supported:
196 .BI size= journal-size
197 Create a journal stored in the filesystem of size
199 megabytes. The size of the journal must be at least 1024 filesystem blocks
200 (i.e., 1MB if using 1k blocks, 4MB if using 4k blocks, etc.)
201 and may be no more than 102,400 filesystem blocks.
202 There must be enough free space in the filesystem to create a journal of
205 @JDEV@.BI device= external-journal
206 @JDEV@Attach the filesystem to the journal block device located on
207 @JDEV@.IR external-journal .
209 @JDEV@journal must have been already created using the command
211 @JDEV@.B mke2fs -O journal_dev
212 @JDEV@.I external-journal
215 @JDEV@.I external-journal
216 @JDEV@must be formatted with the same block
217 @JDEV@size as filesystems which will be using it.
219 @JDEV@Instead of specifying a device name directly,
220 @JDEV@.I external-journal
221 @JDEV@can also be specified by either
222 @JDEV@.BI LABEL= label
225 @JDEV@to locate the external journal by either the volume label or UUID
226 @JDEV@stored in the ext2 superblock at the start of the journal. Use
227 @JDEV@.BR dumpe2fs (8)
228 @JDEV@to display a journal device's volume label and UUID. See also the
231 @JDEV@.BR tune2fs (8).
234 @JDEV@Only one of the
235 @JDEV@.BR size " or " device
236 @JDEV@options can be given for a filesystem.
239 List the contents of the filesystem superblock.
241 .BI \-L " volume-label"
242 Set the volume label of the filesystem.
243 Ext2 filesystem labels can be at most 16 characters long; if
245 is longer than 16 characters,
247 will truncate it and print a warning. The volume label can be used
253 (and possibly others) by specifying
254 .BI LABEL= volume_label
255 instead of a block special device name like
258 .BI \-m " reserved-blocks-percentage"
259 Set the percentage of reserved filesystem blocks.
261 .BI \-M " last-mounted-directory"
262 Set the last-mounted directory for the filesystem.
264 .BR \-o " [^]\fImount-option\fR[,...]"
265 Set or clear the indicated default mount options in the filesystem.
266 Default mount options can be overriden by mount options specified
269 or on the command line arguments to
271 Older kernels may not support this feature; in particular,
272 kernels which predate 2.4.20 will almost certainly ignore the
273 default mount options field in the superblock.
275 More than one mount option can be cleared or set by separating
276 features with commas. Mount options prefixed with a
277 caret character ('^') will be cleared in the filesystem's superblock;
278 mount options without a prefix character or prefixed with a plus
279 character ('+') will be added to the filesystem.
281 The following mount options can be set or cleared using
286 Enable debugging code for this filesystem.
289 Emulate BSD behaviour when creating new files: they will take the group-id
290 of the directory in which they were created. The standard System V behaviour
291 is the default, where newly created files take on the fsgid of the current
292 process, unless the directry has the setgid bit set, in which case it takes
293 the gid from the parent directory, and also gets the setgid bit set if it is
297 Enable user-specified extended attributes.
300 Enable Posix Access Control Lists.
303 Disables 32-bit UIDs and GIDs. This is for interoperability with
304 older kernels which only store and expect 16-bit values.
307 When the filesystem is mounted with journalling enabled, all data
308 (not just metadata) is committed into the journal prior to being written
309 into the main filesystem.
311 .B journal_data_ordered
312 When the filesystem is mounted with journalling enabled, all data is forced
313 directly out to the main file system prior to its metadata being commutted
316 .B journal_data_writeback
317 When the filesystem is mounted with journalling enabled, data may be
318 written into the main filesystem after its metadata has been commutted
319 to the journal. This may increase throughput, however, it may allow old
320 data to appear in files after a crash and journal recovery.
323 .BR \-O " [^]\fIfeature\fR[,...]"
324 Set or clear the indicated filesystem features (options) in the filesystem.
325 More than one filesystem feature can be cleared or set by separating
326 features with commas. Filesystem features prefixed with a
327 caret character ('^') will be cleared in the filesystem's superblock;
328 filesystem features without a prefix character or prefixed with a plus
329 character ('+') will be added to the filesystem.
331 The following filesystem features can be set or cleared using
336 Use hashed b-trees to speed up lookups in large directories.
339 Store file type information in directory entries.
342 Use a journal to ensure filesystem consistency even across unclean shutdowns.
343 Setting the filesystem feature is equivalent to using the
348 Limit the number of backup superblocks to save space on large filesystems.
351 After setting or clearing
357 must be run on the filesystem to return the filesystem to a consistent state.
359 will print a message requesting that the system administrator run
364 Linux kernels before 2.0.39 and many 2.1 series kernels do not support
365 the filesystems that use any of these features.
366 Enabling certain filesystem features may prevent the filesystem from
367 being mounted by kernels which do not support those features.
369 .BI \-r " reserved-blocks-count"
370 Set the number of reserved filesystem blocks.
373 Turn the sparse super feature off or on. Turning this feature on
374 saves space on really big filesystems. This is the same as using the
375 .B "\-O sparse_super"
379 Linux kernels before 2.0.39 do not support this feature. Neither do
380 all Linux 2.1 kernels; please don't use this unless you know what you're
381 doing! You need to run
383 on the filesystem after changing this feature in order to have a valid
386 .BI \-T " time-last-checked"
387 Set the time the filesystem was last checked using
389 This can be useful in scripts which use a Logical Volume Manager to make
390 a consistent snapshot of a filesystem, and then check the filesystem
391 during off hours to make sure it hasn't been corrupted due to
392 hardware problems, etc. If the filesystem was clean, then this option can
393 be used to set the last checked time on the original filesystem. The format
396 is the international date format, with an optional time specifier, i.e.
397 YYYYMMDD[[HHMM]SS]. The keyword
399 is also accepted, in which case the last checked time will be set to the
403 Set the user who can use the reserved filesystem blocks.
405 can be a numerical uid or a user name. If a user name is given, it
406 is converted to a numerical uid before it is stored in the superblock.
409 Set the universally unique identifier (UUID) of the filesystem to
411 The format of the UUID is a series of hex digits separated by hyphens,
413 "c1b9d5a2-f162-11cf-9ece-0020afc76f16".
416 parameter may also be one of the following:
420 clear the filesystem UUID
423 generate a new randomly-generated UUID
426 generate a new time-based UUID
429 The UUID may be used by
434 (and possibly others) by specifying
436 instead of a block special device name like
441 for more information.
442 If the system does not have a good random number generator such as
447 will automatically use a time-based UUID instead of a randomly-generated UUID.
449 We haven't found any bugs yet. That doesn't mean there aren't any...
452 was written by Remy Card <Remy.Card@linux.org>.
454 uses the ext2fs library written by Theodore Ts'o <tytso@mit.edu>.
455 This manual page was written by Christian Kuhtz <chk@data-hh.Hanse.DE>.
456 Time-dependent checking was added by Uwe Ohse <uwe@tirka.gun.de>.
459 is part of the e2fsprogs package and is available from
460 http://e2fsprogs.sourceforge.net.