Hack 68. Fine tune the partition using tune2fs

by Ramesh

Use the tune2fs –l /dev/sda1 to view the filesystem information as shown below.

  1. # tune2fs -l /dev/sda1
  2.  
  3. tune2fs 1.35 (28-Feb-2004)
  4. Filesystem volume name: /home/database
  5. Last mounted on:
  6. Filesystem UUID: f1234556-e123-1234-abcd-bbbbaaaaae11
  7. Filesystem magic number: 0xEF44
  8. Filesystem revision #: 1 (dynamic)
  9. Filesystem features: resize_inode filetype sparse_super
  10. Default mount options: (none)
  11. Filesystem state: not clean
  12. Errors behavior: Continue
  13. Filesystem OS type: Linux
  14. Inode count: 1094912
  15. Block count: 140138994
  16. Reserved block count: 0
  17. Free blocks: 16848481
  18. Free inodes: 1014969
  19. First block: 0
  20. Block size: 2048
  21. Fragment size: 2048
  22. Reserved GDT blocks: 512
  23. Blocks per group: 16384
  24. Fragments per group: 16384
  25. Inodes per group: 128
  26. Inode blocks per group: 8
  27. Filesystem created: Tue Jul 1 00:06:03 2008
  28. Last mount time: Thu Aug 21 05:58:25 2008
  29. Last write time: Fri Jan 2 15:40:36 2009
  30. Mount count: 2
  31. Maximum mount count: 20
  32. Last checked: Tue Jul 1 00:06:03 2008
  33. Check interval: 15552000 (6 months)
  34. Next check after: Sat Dec 27 23:06:03 2008
  35. Reserved blocks uid: 0 (user root)
  36. Reserved blocks gid: 0 (group root)
  37. First inode: 11
  38. Inode size: 128
  39. Default directory hash: tea
  40. Directory Hash Seed: 12345829-1236-4123-9aaa-ccccc123292b

You can also use the tune2fs to tune the ex2/ext3 filesystem parameter. For example, if you want to change the Filesystem volume name, you can do it as shown below.

  1. # tune2fs -l /dev/sda1 | grep volume
  2. Filesystem volume name: /home/database
  3.  
  4. # tune2fs -L database-home /dev/emcpowera1
  5. tune2fs 1.35 (28-Feb-2004)
  6.  
  7. # tune2fs -l /dev/sda1 | grep volume
  8. Filesystem volume name: database-home