Difference between revisions of "How should I format additional hard drives?"
From LinuxMCE
Line 23: | Line 23: | ||
to set the reserved fraction to 1 percent. | to set the reserved fraction to 1 percent. | ||
+ | |||
+ | Then if you want a journaling (ext3) filesystem: | ||
+ | |||
+ | mke2fs -b 4096 -m 1 -j /dev/whatever | ||
Note, no further configuration should be necessary as new drives will be auto-discovered. | Note, no further configuration should be necessary as new drives will be auto-discovered. |
Revision as of 20:51, 18 June 2008
From "blog gelusi: Linux Tuning Guide" (http://gelusi.blogspot.com/2008/02/linux-tuning-guide.html)
1. Filesystem Block sizes For filesystems dedicated to serving fairly large files, adopting a larger than default 1024 byte block size may yield significant performance gains. Recent transactions on the linux kernel list suggest that setting the block sizein an ext2 file system to 4096 instead of the default 1024 will result in less file fragmentation, faster fsck's, faster deletes and faster raw read speed, due to the reduced number of seeks. Unfortunately this cannot be changed on the fly. Only a reformat will make this so. The command to format a file system with 4096 byte blocks is: mke2fs -b 4096 /dev/whatever Additionally, on any filesystems except those used for logfiles, the default of 5% reserved for root use is excessive for large file systems, so the command to make the filesystem can be augmented to mke2fs -b 4096 -m 1 /dev/whatever to set the reserved fraction to 1 percent.
Then if you want a journaling (ext3) filesystem:
mke2fs -b 4096 -m 1 -j /dev/whatever
Note, no further configuration should be necessary as new drives will be auto-discovered.