Journaling file systems

The risk of logical damage can be reduced by using NTFS 5.0, ext3, and XFS which are often called journaling file systems. A journaling file system writes down the changes that will be made in a journal (a circular log in a special area of the file system) before committing them to the main file system. These file systems can always be “rolled back” to a consistent state. The only data probably to be lost is what was in the drive’s cache at the time of the system failure. In case of system crashes or power failure, journal file systems are less likely to become corrupted.

When a system crash occurs, the recovery process involves reading the journal from the file system and replaying changes from this journal until the file system is consistent again. The changes are indivisible that means that they succeed or are skipped due to the fact of not completed yet (or written) to the journal before the crash occurred.

Some journaling file systems can enlarge the size of the journal or make it shrink, some of them put the journal in a contiguous area or a hidden file that is ensure not to change size while the file system is mounted.

Some journaling file systems allow external journals on a separate device, such as a solid-state disk or battery-backed non-volatile RAM.

Still regular system maintenance should include the use of a consistency checker. This checker can protect against bugs in the file system software and latent incompatibilities in the design of the storage hardware. Using disk controllers equipped with a battery backup will help to write the waiting data when the power failure occurs. It is also advised by specialists to provide the entire system with a battery backup that will help to keep the system on when power failures occur, or at least to give enough time to shut down properly.

Comments are closed.