Introduction to the File System ReiserFS

The GNU/Linux operating system (for convenience, in this article, we will call only Linux) is very comprehensive in relation to the compatibility with filesystems (or filesystems) varied. The majority of Linux users the install on partitions ext3 and ReiserFS (in addition to other less well-known), being that the latter has been gaining each time more notoriety. Proof of this is that he already has until a successor, Reiser4. But, what is ReiserFS has win-win? What are their main characteristics? What are the disadvantages? The answers to these questions you is in the course of this article.

What is a file system?

Before knowing the ReiserFS file system in itself, it is convenient to know that it is a system file. In a nutshell, it is a structure that indicates how the data should be recorded on recording devices. Is in accordance with the features offered by this structure that is possible to determine the space available and occupied disk, and manage how portions of a file may be “distributed” in the storage areas. It is also the system of files that determines how the data can be accessed, copied, moved,renamed, protected and disposed of. Therefore, without a file system, it is impossible to use a hard drive (and other devices) for storage of information.

The ReiserFS file system

Main features

The ReiserFS file system had its first appearance in the year 2001 by the hands of Hans Reiser (hence the pattern name), which also set up a team name NAMESYS to manage the work of the project. Since then, the ReiserFS is being increasingly used, mainly for being available as standard in many Linux distributions, making front of the file system ext3.

The good acceptance of the ReiserFS is due to your set of features, that make it a secure file system,efficient, fast and reliable. Among its main features, we have:

– Journaling, a feature that helps to maintain the integrity of the data in case of errors in the system caused by improper shutdown or certain hardware failures, for example. The journaling is one of the most important features of ReiserFS, and the reason for which is explained in more detail later;

– Support for files larger than 2 GB (limitation existing in some filesystems);

– Organization of the file system objects in a data structure called B+Trees (B+ trees). In this scheme,the data are set at positions arranged by splits are called the leaves. In turn, the leaves are organized by us, or pointers called sub-trees, that are connected to a root node (see illustration below to understand better). This organizational process requires algorithms more complex, but shows superior performance in the recording and in the access to the data, compared to other file systems;

– Dynamic allocation of inodes (in a few words, inodes are structures that contains information about the files), by decreasing the waste of space. Other file systems have fixed-size blocks for allocation,so, if it is not necessary to use an entire block, the space the rest is in disrepair. In ReiserFS, the allocation is made based on the size of the file.

Organization

ReiserFS has reference to the already mentioned scheme B+Trees to organize and locate the items that compose it, in its essence, all the system files, that is, the data itself and the information the associated (creation date, access permissions, owner, etc.). Basically, all of these items are classified in directories (directory item), data blocks direct and indirect (direct items / indirect items) and inode (stat data items).

In the inodes that are classified information for each file, that is, the metadata. The direct items are the files themselves, but when stored in the “leaves” of the sub-trees and, although they have variable size, are composed of blocks of data small. The direct items are next to the metadata, since both one and the other are arranged in the trees. Already the larger blocks, that is, the indirect items, are not included in the trees (for they receive this name), and are “localizable” by pointers that indicate where they are stored.

This whole scheme ends up doing with that disk space is best experienced in the ReiserFS. On the other hand, there is also disadvantages, as it can cause increased fragmentation data, as well as requiring more processing resources.

 

What is Journaling?

One of the features that makes ReiserFS to be quite safe is the feature Journaling (also present in other file systems, as the ext3 file system). With it, the file system passes the register in a a special area called “journal” or “log” the actions that will be made in the files (recording to or alteration of data, for example) before the execution in and of itself. After the execution, the operations recorded in the log are considered as completed and, therefore, deleted. Note that this entire procedure happens extremely fast.

But what, exactly, the Journaling shows to be advantageous? The records log are written before the changes actually occur in the file system. These records are only deleted when changes are performed. If, for example, the computer is shut down suddenly, (as occurs in lack of electrical power), the file system will check the existing records in the journal and will execute the stuff that is marked as not done. This causes the risk of data loss decrease drastically, already the operating system will know “where it stopped”.

It is important to note that, in the case of ReiserFS, the techniques of Journaling only the meta data (sets of information about files, such as size, owner, permissions, change date, etc.), making with that this filesystem is efficient in the recovery of the operating system as a whole in case of problems. On the other hand, the ext3 file system is able to use Journaling preserving meta data, and the information of the files themselves, but this can cause the performance of the system of files decrease.

Reiser4

The Reiser4 is a new implementation of ReiserFS, that is, it is a successor natural. Your proposal is the offer, among other features, the following:

– Journaling more efficient;
– Better support for large amounts of small files;
– Management faster for directories with many files (in the thousands);
– File structure dynamically optimized;
– Atomic transactions in the modification of the file system. In this case, an operation of only can be taken as completed if executed in full, or is, there is no middle ground: either it is done or not.

The Reiser4 is a project that took some years to be realized and, although he has already a stable version available to use, its adoption is very slow due to some barriers, one of them being, at the time of its inclusion in the kernel. These issues are still being addressed.

Ending

When the issue is file system in Linux, it is inevitable the comparisons between the ReiserFS and ext3, in addition to other less used, such as XFS. Nothing more natural, after all, each user seeks the best for the your computer. But the point which really is best not to it is an easy task. There are several comparative on the Internet that try to offer that answer, but, here in the AbbreviationFinder, we are of the opinion that the best thing to do is to test the file systems that you were attracted to define what is more you like the best.

Introduction to the File System ReiserFS 1