logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

tune2fs.8 (25610B)


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