Filesystems

From Linux 101, The beginner's guide to all things Linux.

Jump to: navigation, search

Filesystems are how operating systems store information onto permanent media like floppies, CD-ROM's and hard drives. With Linux the user can choose the file system based on their needs. One of the great hallmarks of a good operating system is flexibility and options. Linux provides this with filesystems.

Contents

[edit] Some common filesystems

Extended 2 or ext2 
the classic Linux filesystem. Its hallmarks are reliability and resistance to fragmentation. However, it is not a journaled filesystem like most modern ones.
Extended 3 or ext3 
is a more recent version of this. It is ext2 but it has journaling support, allowing for quicker recoveries when filesystems are not properly unmounted.
ReiserFS 
Reiser is a journalized filesystem and is extremely fast on small files (no greater than several hundred megabytes). Reiser's design can boast very incredible benchmarks.
Reiser4 
Reiser4 is an updated version of ReiserFS. It recently made it into the official kernel source tree. It boasts even faster performance than ReiserFS. This filesystem supports plug-ins, which could lead to some very interesting and cool developments.
XFS 
SGI's XFS provides full 64-bit file capabilities and easily scales from gigabytes to exabytes to handle extremely large files. The XFS file system integrates volume management, guaranteed rate I/O, and journaling technology for fast, reliable recovery. File systems can be backed up while still in use, significantly reducing administrative overhead.
JFS 
IBM's journaled file system technology, currently used in IBM enterprise servers, is designed for high-throughput server environments, key to running intranet and other high-performance e-business file servers.
ISO9660 
this is the CD-ROM filesystem.
UDF 
some DVD's use this format.
swap 
In Windows you have a swap file, but in Linux a seperate partition is best for performance. If you have a low amount of memory then you may need twice the amount of swap space but once you have more than 128MB to 512MB then your swap parition should equal your memory amount.

[edit] Filesystem utilities

There's no Linux equivalent to defrag—it does not need it. Linux filesystem formats are resistent to fragmentation.

However from time to time you may feel compelled to run a disk check on your system. And actually, Linux might run them on start up if it thinks there have been any problems or after every so often just as a good measure. The utility to do this is fsck, or FileSystem ChecK. General usage is:

# fsck <device|fstab entry>

Where device is something from the devices article or an fstab entry.

Note: fsck should only be run when the filesystem is unmounted or in read-only mode. You may want to keep a bootable Linux CD handy in the event your system cannot boot enough to check itself.

[edit] External Links

[edit] Homepages

Han Reiser's Reiser4 Site
IBM's JFS Site
SGI's XFS Site

[edit] Benchmarks

Mike Benoit's Filesystem Benchmarks
Linux Gazette's Benchmarks
Oregon State's Filesystem Benchmarks

[edit] References

Dr. Stephen Tweedie's talk on ext3
A paper on the design of ext2

Personal tools