Free Software

http://www.linux-mag.com/

Linux comes with software-based RAID that can be used to provide either a performance boost or add a degree of data protection. This article gives a quick introduction to Linux software RAID and walks through how to create a simple RAID-1 array.

There is an old phrase about wearing a belt and a pair of suspenders if you want to make sure your pants stay up (why haven’t plumbers figured that out?). The point of the phrase is that if you want to be sure that your plans will happen you should have a backup plan as well. In the case of file systems this is literally the truth. If you want to make sure you don’t lose any data, do backups as well as provide some other form of data protection. That something else for data protection is RAID (Redundant Array of Inexpensive Disks).

This article is a brief introduction to software RAID, which is really md (Multiple Device Driver) for Linux. As with the article on LVM, this article is just a quick introduction and not a deep tutorial. The intent is to quickly demonstrate Linux software RAID using md and mdadm. Perhaps this article will show you how easy it is to add software RAID to your repertoire to either help improve performance or provide extra protection. In essence, this article will introduce you to Linux software RAID becoming the “suspenders” to the “belt” of backups.

Quick Introduction

The original intent of RAID was to improve IO performance as well as using smaller disks to create larger virtual disks (although the phrase “virtual” disk was not originally used, in this age of “virtual-everything” it seems appropriate). The basic concept was then embraced and developed from the 1987 inception to today.

RAID has evolved into a technology that is ubiquitous as storage drives themselves. It allows system designers to add in performance while also providing some additional data protection (don’t forget to wear your “belt”). There are many choices with RAID such as various RAID levels and software and/or hardware RAID. Software RAID means the RAID functionality is provided in software by the OS. Hardware RAID means the RAID functionality is provided by a card, usually in a PCI or PCIe slot. There a couple of articles that can present the pros and cons of the various RAID options, here and here. But this article will focus on software RAID with Linux using the md capability of Linux.

It’s beyond the scope of this article to discuss the various RAID level options. There are better articles for this (it may be wikipedia, but it’s a good introduction to the various RAID levels). Instead this article will go through the creation of a simple RAID-1 setup. RAID-1 mirrors disks (actually disk partitions) so if you write to one, the data is copied to the other disk(s). This is a simple way to provide some data protection because you can lose a single disk without losing any data (but it is not a substitute for real backups). So what is a good way to create and manage RAID arrays on Linux?

To read more, go to:

http://www.linux-mag.com/cache/7475/1.html