Jump to content

ReiserFS: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
JoeBot (talk | contribs)
m typo fix: the word "disappear" and its derivatives using AWB
SHayter (talk | contribs)
m 'de' prefix removed where unnecessary
Line 42: Line 42:
*[http://rfsd.sourceforge.net ReiserDriver] - A read-only file system driver to access ReiserFS partitions under Windows (currently in development).
*[http://rfsd.sourceforge.net ReiserDriver] - A read-only file system driver to access ReiserFS partitions under Windows (currently in development).
*[http://www.crossmeta.com/ CrossMeta] - Contains support for ReiserFS partitions on Windows (download link disappeared somewhere in 2005 due to GPL issue (they did not provide source for their driver).
*[http://www.crossmeta.com/ CrossMeta] - Contains support for ReiserFS partitions on Windows (download link disappeared somewhere in 2005 due to GPL issue (they did not provide source for their driver).
*[http://forums.gentoo.org/viewtopic-p-3081971.html Gentoo Forum Link] - Contains an interesting discussion of fragmentation in reiserFS, includes a script which measures defragmentation and links to a script that defragments quite well.
*[http://forums.gentoo.org/viewtopic-p-3081971.html Gentoo Forum Link] - Contains an interesting discussion of fragmentation in reiserFS, includes a script which measures fragmentation and links to a script that defragments quite well.


[[Category:Disk file systems]]
[[Category:Disk file systems]]

Revision as of 22:45, 17 April 2006

The ReiserFS is a general-purpose computer file system designed and implemented by a team at Namesys led by Hans Reiser, who is referred to as the project's Benevolent Dictator for Life. It is currently supported for GNU/Linux and may be included in other operating systems in the future. Introduced with version 2.4.1 of the Linux kernel, it was the first journaling file system to be included in the standard kernel. ReiserFS is the default filesystem on the Slackware, SuSE, Xandros, Yoper, Linspire, Kurumin Linux, FTOSX and Libranet Linux distributions.

With the exception of security updates and critical bug fixes, Namesys has ceased development on ReiserFS (now occasionally referred to as Reiser3) to concentrate on its successor, Reiser4.

Features

At the time of its introduction, ReiserFS offered features then-unseen in existing GNU/Linux filesystems:

  • Metadata-only journaling, its most-publicised advantage over what was the stock GNU/Linux file system at the time, ext2.
  • Online resizing (growth only), with an underlying volume manager such as LVM. Since then, Namesys has also provided tools to resize (both grow and shrink) ReiserFS filesystems offline.
  • Tail packing, a scheme to reduce internal fragmentation. Tail packing, however, has a significant performance impact; Namesys recommends disabling the feature in performance-critical applications.

Performance

Compared to ext2 and ext3 in 2.4, when dealing with files under 4k and with tail packing enabled, ReiserFS is often faster by a factor of 10–15. This is of great benefit in Usenet news spools, HTTP caches, mail delivery systems and other applications where performance with small files is critical.

Disadvantages

ReiserFS v3 may become corrupt when its tree is rebuilt during a filesystem check. Rebuilding the tree is necessary only if filesystem metadata is badly damaged; it is not part of normal operation. Nevertheless it is recommended not to store ReiserFS v3 images on a ReiserFS v3 partition (e.g. backups, disk images for emulators) without first transforming them to a form that won't confuse the filesystem checker. This can be done by compressing or encrypting the image file. Reformatting an existing ReiserFS v3 partition may also leave data behind that could confuse the filesystem checker, resulting e.g. in files from the old filesystem reappearing after a tree rebuild. As such the metadata is always in a consistent state after a filesystem check, "corruption" here means it being merged in interesting ways with the contained filesystem's metadata. ReiserFS v4 fixes this problem. Note that this means that rebuilding the tree is inadvisable in systems where the users can't be trusted.

ReiserFS in versions of the Linux kernel before 2.4.10 were considered unstable by Namesys and not recommended for production use, especially in conjunction with NFS.

Some file operations (including unlink(2)) are not synchronous on ReiserFS, which can cause some subtle breakage in applications relying heavily on file-based locks.

There is no known way to defragment a ReiserFS filesystem, aside from a full dump and restore. However ReiserFS v4 has a repacker that takes care of file fragmentation.[1]

Early implementations of ReiserFS (prior to that in Linux 2.6.2) were also susceptible to out-of-order write hazards (files being appended to during a crash, for example, would gain a tail of garbage upon next mount). The current journaling implementation in ReiserFS, however, is now on par with that of ext3's "ordered" journaling level.

Design

ReiserFS stores file metadata ("stat items"), directory entries ("directory items"), inode block lists ("indirect items") and tails of files ("direct items") in a single, combined B+ tree keyed by a universal object id. Disk blocks allocated to nodes of the tree are "formatted internal blocks". Blocks for leaf nodes (in which items are packed end-to-end) are "formatted leaf blocks". All other blocks are "unformatted blocks" containing file contents. Directory items with too many entries or indirect items which are too long to fit into a node spill over into the right leaf neighbour. Block allocation is tracked by free space bitmaps in fixed locations.

By contrast, ext2 and other Berkeley FFS-like filesystems simply use a fixed formula for computing inode locations, hence limiting the number of files they may contain. Most such filesystems also store directories as simple lists of entries, which makes directory lookups and updates linear-time operations and degrades performance on very large directories. The single B+ tree design in ReiserFS was intended to avoid both of these problems.

See also

  • Namesys
  • Theodore Tso critiques the ReiserFS block journaling implementation
  • convertfs, a utility which performs in-place conversion between any two filesystems with sparse file support
  • An overview of the ReiserFS on-disk format
  • Florian Buchholz's The structure of the Reiser file system, a very detailed description of the ReiserFS disk structures.
  • rfstool - Limited Windows access for ReiserFS partitions.
  • rfsgui - Windows GUI developed from rfstool code; Win32 and x64 builds available.
  • YAReG - Windows GUI using rfstool; read ReiserFS partitions in Windows
  • ReiserDriver - A read-only file system driver to access ReiserFS partitions under Windows (currently in development).
  • CrossMeta - Contains support for ReiserFS partitions on Windows (download link disappeared somewhere in 2005 due to GPL issue (they did not provide source for their driver).
  • Gentoo Forum Link - Contains an interesting discussion of fragmentation in reiserFS, includes a script which measures fragmentation and links to a script that defragments quite well.