Difference between revisions of "Tune2fs"

From wikieduonline
Jump to navigation Jump to search
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
<code>[[tune2fs]]</code> used to modify file system parameters
+
<code>[[tune2fs]]</code><ref>https://linux.die.net/man/8/tune2fs</ref> used to show or modify file system parameters on [[ext4]] filesystems
 
:To modify [[ext4]] for metadata checksums <code>tune2fs -O metadata_csum</code>
 
:To modify [[ext4]] for metadata checksums <code>tune2fs -O metadata_csum</code>
 
:To disable ext4 metadata checksum: <code> tune2fs -O ^metadata_csum</code>
 
:To disable ext4 metadata checksum: <code> tune2fs -O ^metadata_csum</code>
Line 5: Line 5:
  
  
Show [[file system]] characteristics
+
Show [[file system]] characteristics, use <code>-l</code> to show contents of [[superblock]]
 
<pre>
 
<pre>
 
# tune2fs -l /path/to/device  
 
# tune2fs -l /path/to/device  
 
# tune2fs -l /dev/sda25
 
# tune2fs -l /dev/sda25
 
# tune2fs -l /dev/[[cciss]]/c1d1p1
 
# tune2fs -l /dev/[[cciss]]/c1d1p1
 +
# tune2fs -l /dev/VG_NAME/LV_NAME
 
# tune2fs -l /dev/mapper/dm-path-name
 
# tune2fs -l /dev/mapper/dm-path-name
 
</pre>
 
</pre>
  
 +
<pre>
 +
tune2fs
 +
tune2fs 1.44.1 (24-Mar-2018)
 +
Usage: tune2fs [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]
 +
[-i interval[d|m|w]] [-j] [-J journal_options] [-l]
 +
[-m reserved_blocks_percent] [-o [^]mount_options[,...]]
 +
[-r reserved_blocks_count] [-u user] [-C mount_count]
 +
[-L volume_label] [-M last_mounted_dir]
 +
[-O [^]feature[,...]] [-Q quota_options]
 +
[-E extended-option[,...]] [-T last_check_time] [-U UUID]
 +
[-I new_inode_size] [-z undo_file] device
 +
</pre>
 +
 +
== '''Change [[reservation percentage]]''' ==
 +
tune2fs -l /path/to/device | egrep "Reserved block count|[[Block]] size"
 +
tune2fs '''-m 0''' /path/to/device
 +
 +
Filesystem state:        clean
 +
Filesystem state:        clean with errors
 +
FS Error count:          61
 +
 +
<pre>
 +
First error time:        Wed Dec 11 15:40:41 2019
 +
First error function:    htree_dirblock_to_tree
 +
First error line #:      994
 +
First error inode #:      2
 +
First error block #:      0
 +
Last error time:          Sun Dec 15 12:36:44 2019
 +
Last error function:      ext4_find_entry
 +
Last error line #:        1465
 +
Last error inode #:      2
 +
Last error block #:      0
 +
</pre>
 +
 +
== Related terms ==
 +
* <code>[[df -kh]]</code>
 +
* <code>[[fsck]]</code>
 +
* <code>-c</code>max-[[mount]]-counts
 +
* [[dumpe2fs]]
  
 
== See also ==
 
== See also ==
 +
* {{tune2fs}}
 +
* {{du}}
 +
* {{files}}
 
* {{filesystems}}
 
* {{filesystems}}
  
 
+
[[Category:File systems]]
 
[[Category:Linux]]
 
[[Category:Linux]]

Latest revision as of 10:28, 28 July 2021

tune2fs[1] used to show or modify file system parameters on ext4 filesystems

To modify ext4 for metadata checksums tune2fs -O metadata_csum
To disable ext4 metadata checksum: tune2fs -O ^metadata_csum


Show file system characteristics, use -l to show contents of superblock

# tune2fs -l /path/to/device 
# tune2fs -l /dev/sda25
# tune2fs -l /dev/[[cciss]]/c1d1p1
# tune2fs -l /dev/VG_NAME/LV_NAME
# tune2fs -l /dev/mapper/dm-path-name
tune2fs
tune2fs 1.44.1 (24-Mar-2018)
Usage: tune2fs [-c max_mounts_count] [-e errors_behavior] [-f] [-g group]
	[-i interval[d|m|w]] [-j] [-J journal_options] [-l]
	[-m reserved_blocks_percent] [-o [^]mount_options[,...]]
	[-r reserved_blocks_count] [-u user] [-C mount_count]
	[-L volume_label] [-M last_mounted_dir]
	[-O [^]feature[,...]] [-Q quota_options]
	[-E extended-option[,...]] [-T last_check_time] [-U UUID]
	[-I new_inode_size] [-z undo_file] device

Change reservation percentage[edit]

tune2fs -l /path/to/device | egrep "Reserved block count|Block size"
tune2fs -m 0 /path/to/device
Filesystem state:         clean
Filesystem state:         clean with errors
FS Error count:           61
First error time:         Wed Dec 11 15:40:41 2019
First error function:     htree_dirblock_to_tree
First error line #:       994
First error inode #:      2
First error block #:      0
Last error time:          Sun Dec 15 12:36:44 2019
Last error function:      ext4_find_entry
Last error line #:        1465
Last error inode #:       2
Last error block #:       0

Related terms[edit]

See also[edit]

  • https://linux.die.net/man/8/tune2fs
  • Advertising: