Personal tools
You are here: Home Members nigel Nigels Blog Archive 2006 June 05 Optimize your ext2/ext3 filesystem

Optimize your ext2/ext3 filesystem

This is a repost from here: http://blog.drinsama.de/erich/en/linux/2006060401-optimize-your-ext23-fs


...use tune2fs -l /dev/hda5 | grep features to get a list of your filesystem features. If you have "dir_index" in there then you're all set. Ignore any "needs_recovery" - that is good for mounted filesystems (it just means "not cleanly unmounted")

To add dir_index, do the following.

  • Unmount the filesystem. If this is your primary filesystem, use a bootable CD like Knoppix or some Linux install CD.
  • Make sure the filesystem is really not mounted. Just for safety of your data. Run e2fsck /dev/hda5 - this should take less than one second if your filesystem is clean and is needed anyway otherwise...
  • Execute tune2fs -O +dir_index /dev/hda5 to enable the feature for your filesystem
  • Execute e2fsck -Df /dev/hda5. This will force a filesystem check with directory optimization (!) on your filesystem.
  • Mount your system (or reboot, if you were using a live CD)
Posted by nigel on 2006-06-05 18:25

Trackback

The URI to TrackBack this entry is: #

Powered by Plone, the Open Source Content Management System