Journaling promises to increase server and desktop efficiency. Linux Advisor hed: It’s all in the journal dek: Journaling promises to increase server and desktop efficiency. blurb: Journaling promises to increase server and desktop efficiency. number of pages:1 by Maggie Biggs
Quite often, we focus on visible things when measuring the growth and usability of Linux and open-source solutions for businesses. Front and center are gains like a choice of graphical interfaces and business application growth, including financial applications, databases, business intelligence tools, and application serving technology.
Yet if we look under the covers a bit, it is obvious that Linux and open source are gaining maturity in other ways that will improve their viability in business settings. One example of this growth can be found in the area of file system enhancements–specifically, adding journaling capabilities to Linux file systems.
It may not be readily apparent why adding journaling capabilities to your file system is an important enhancement for businesses (and individuals). So let’s examine what journaling is and how it affects your data.
As you probably know, your file system exists to help you store, access, and modify data. To support your data, your file system has to maintain an internal structure that keeps track of your data. This is called the file system metadata.
A business or home user of Linux will not interact with the file system metadata directly, but instead relies on operating-system drivers that navigate the metadata. This is a fine arrangement as long as the metadata stays organized. If for some reason your file system metadata becomes corrupted, the operating-system driver cannot figure out what is going on and you’ll have trouble accessing your data.
This is when you need the process known as fsck. You might notice that fsck runs when you boot up a Linux server or desktop. It’s checking the metadata of any file system you will use. It does this to be certain that it is usable before giving you access to the disk.
If the fsck process notes any problems with the file system metadata, it performs an exhaustive check of the metadata and corrects any organizational problems it finds. The file system is then accessible.
This is all well and good. However, it is not an optimal solution. The fsck process must scan the entire file system metadata to seek out and correct problems. This can be a time-consuming process, especially given the ever-growing size of business and personal disk drives.
This is where journaling comes in. Journaling file systems add a new structure–not surprisingly called a journal–to your disk. Before the operating-system driver makes any additions or changes to your disk’s metadata, it writes an entry in the journal. You might think of a file system journal as kind of a change log–it keeps track of changes made to the way your data is organized on disk.
The usefulness of journaling really comes into play when your file system metadata becomes disorganized. For example, perhaps you have a server that has gone down due to a power failure. At the time of the server outage, one or more disk operations were likely in progress.
If you did not have a journaling file system, the fsck process would need to check the entire file system metadata upon rebooting your server. By contrast, if you are running a journaling file system, the operating-system driver simply examines the journal’s chronological entries and corrects organizational issues in metadata for recently modified entries only. In this way, the journal allows servers that might have hundreds of gigabytes of storage to come online almost instantly.
The principal benefit of journaling file systems is the increase in file system availability. But journaling file systems have other benefits, too. Chief among these is faster disk access and improvements in the way data is organized and stored on disk.
With version 2.4 of the Linux kernel comes the availability of a bevy of journaling file system choices, including ReiserFS, XFS, JFS, GFS, and ext3. If you’re setting up a new Linux installation, you’ll not have any trouble installing and using one of these new choices.
For example, the SuSE 7.2 Linux distribution supports the ReiserFS journaling file system right out of the box. I’ve found it as easy to set up as any other file system. And, I’ve noted faster boot up times and rapid disk access times, especially for smaller files.
But if you’re running a pre-2.4 Linux kernel or the 2.4 Linux kernel with a nonjournaling file system, you might be concerned about how to add journaling file system capabilities. Most Linux file system providers have good documentation that will help you get through the process fairly painlessly. Otherwise, you might consult the documentation for your Linux distribution for instructions on how to do the upgrade.
For example, the ReiserFS team supplies instructions for the 2.4 kernel and 2.2 kernel users. Likewise, you can locate materials on how to set up the ext3 journaling file system. Information is also included to help those currently running the widely used ext2 file system to covert to ext3 or to be able to switch between ext2 and ext3.
In addition, Linux distribution providers Red Hat and SuSE supply information on file system configuration via their manuals. Moreover, detailed technical information on journaling and new file system capabilities can be found on IBM’s DeveloperWorks.
Whether you are a technical pro or a business leader, changes such as the move to a Linux-based journaling file system make good sense. Good business and technical value can be found by reducing downtime, increasing disk access, and improving the way data is stored and retrieved.