Book Review: Managing RAID on Linux

by Russell J.T. Dyer

Book Review: Managing RAID on Linux

Title:  Managing RAID on LinuxAuthor:  Derek VadalaPublisher:  O'Reilly & AssociatesISBN:  1-56592-730-3Price:  $39.95 US, $61.95 CAN

Almost every Linux system administrator probably is familiar with the concept of RAID (redundant array of independent disks), but most probably aren't too confident about setting one up on their own. Many may have muddled through the process by using minimal documents (that is, howtos and single chapters in general Linux books) or vendor specific documentation. In such situations, one can only hope for the best when arbitrarily choosing a RAID type and configuring it. Recently, though, O'Reilly has published a unique book called, Managing RAID on Linux, which focuses on RAID and related topics.

Understanding RAID

A RAID typically, by definition, involves redundant hard drives linked together by special hardware or software. "Using RAID has two basic advantages: redundancy, or the ability to survive a disk failure, and increased performance. Depending on which RAID level you choose, you get varying degrees of each of these features", writes Vadala. A RAID also can be used to link hard drives together to create a virtually larger hard drive that is seamless to the operating system and to the users. Some RAID can improve hard disk storage and retrieval speeds by breaking data up into blocks that are written to or retrieved from several drives simultaneously. Some RAIDS, however, cause a reduction in hard disk performance due to the redundancy, which is why it's important to understand hardware configuration with RAID. These possible gains make RAID an inviting feature to implement on busy servers.

Managing RAID on Linux is not very long by computer book standards--about 250 pages. There are only seven chapters, but most are quite hefty and in depth. The first chapter is brief, only ten pages, and it defines many RAID terms. If you're a system administrator, you might try getting your manager to read at least this first chapter, so you can talk the same language when the discussing hardware purchases necessary to build a hard drive array.

A manager who wants to understand more also might read the second chapter. It covers planning a RAID and goes a little deeper into the different types of RAIDs. Vadala provides some excellent straightforward examples of situations in which each RAID would be useful. There's also a section that illustrates the impact hardware makes on a RAID. Performance and dependability of a redundant hard drive system is greatly affected by hardware. I'm not necessarily referring to hardware-based RAID controllers but to types of hard drives, hard drive controllers, PCI bus rating of motherboards and so on. Vadala helps clarify several aspects of hardware related to RAID performance.

Building a RAID

The third and fourth chapters of Managing RAID on Linux deal with the process of constructing a software-based RAID. Vadala says, "There has been a long standing stigma against software RAID. However, software RAID on Linux performs exceptionally and it's reliable. It's comparable to using a decent hardware controller, and better-performing in some cases." In his book, he goes into reconfiguring the Linux kernel for a RAID. This is something most Linux fans cringe at the thought of attempting, but Vadala walks the reader through the process fairly painlessly. He then spells out how to create partitions and format drives for each RAID type. In the fourth chapter Vadala elaborates a little more on kernel options; he likes to hold back at times so as not to overwhelm the reader. As a result, you may want to read the entire book before jumping into installing a RAID on a production server. You may also want to experiment first with an old workstation and some spare parts, too.

Vadala's fifth chapter is dedicated to hardware RAIDs. He covers six popular types of RAID controllers that are offered by five different vendors. These hardware RAIDs are configured and administered by proprietary software. Vadala gives the reader some things to consider when purchasing a hardware RAID. And, he describes aspects of configuring a hardware RAID that are common to all of them. He then covers the details of each vendor RAID.

An aspect of RAIDs that is often overlooked is the value of an appropriate filesystem. In Vadala's sixth chapter he says that for larger, heavily used servers that have either extremely large files or thousands of smaller files, one should consider using a journaling filesystem, such as ext3 or ReiserFS. In this chapter he expounds on the merits of each of these and a few others.

Managing a RAID

In the second half of the fourth chapter of Managing RAID on Linux, Vadala presents a tutorial of sorts on some administrative tools (raidtools and mdadm) for pre- and post-installation maintenance of a software RAID. The raidtools package includes numerous commands: mkraid for creating a RAID; lsraid for listing status of RAIDs and other such information; and raidhotadd and raidhotremove for adding and removing drives to an array while the server is running--which is quite a trick. The mdadm tools work off of the one command but use different options and switches. It basically has the ability to make, manage and monitor RAIDs, like raidtools, but with more distinctions. Vadala says that mdadm is "simple, feature-rich, and it doesn't have a long-winded configuration file. And, it has a lot of features that raidtools does not have, like sharing spare disks, to boot." In his book he provides various mdadm command-line examples.

The final chapter of Managing RAID on Linux contains several miscellaneous topics that don't quite warrant chapters of their own. The potpourri of this last chapter touches on setting up logs, dealing with hard disk crashes and making low level adjustments to hard drive parameters. Vadala also explains how to convert an existing server to RAID without having to reformat all of the drives and start over.

Conclusion

For those who feel that installing a RAID is more trouble than its worth, consider that if you don't implement RAID on your servers, you risk losing data and hitting lengthy server down time that could result from a hard drive crash. Vadala says, "Rebuilding failed systems is a tedious process, even if you have decent backups." But, even if you run backups nightly, you still could lose a day's worth of data. "With RAID, you have a much better chance at keeping that system online when a disk fails. A system administrator only needs to replace the failed disk. If you bought the right hardware, you won't even have to take your system off-line to perform this task", he writes. On a server with a large number of users, any outages may be intolerable and even a few hours of data loss could mean huge labor or revenue losses. A RAID can improve system performance and is a good precaution that could save you time and money. To that end, Managing RAID on Linux, being the only book exclusively on RAID, is worth buying and reading.

Russell Dyer is a Perl programmer, a MySQL developer and a web designer living and working on a consulting basis in New Orleans. He has been working with Linux for six years now, and he welcomes reader responses to his articles.

Load Disqus comments

Firstwave Cloud