facebook rss twitter


by Parm Mann on 14 June 2008, 00:00

Quick Link: HEXUS.net/qasmo

Add to My Vault: x

RAID 0, 1, 2 and 3

RAID 0: Striping

Striping is a method of decreasing the amount of time taken to write data to the drives. If one imagines a large tank of water containing 1,000l of water with a tap at the base. Emptying that water into a 5,000l swimming pool will take a set amount of time. If however, a second tap is installed into the tank and it is used to fill two 5,000l swimming pools then the amount of time taken to will be halved.

Similarly, a hard drive has a maximum read/write speed, so writing a 1GiB file to a single drive will take a set amount of time. However, when writing that data to a striped array with 2 disks, you are writing 500MiB to each drive, theoretically halving the amount of time taken to write the data. With four disks in the array 250MiB is written to each disk, again decreasing the total amount of time taken for the data to be written. In this scenario, files are split into stripes of a pre-determined size and spread over the drives in the array rather than some files going on one drive in their entirety and others on another.

Striping, however, does not provide any method of redundancy. Should one disk fail all the data stored on the array will be lost. If you lose a single disk from a two disk array, you have essentially lost half the data making up the files stored on the array, with no means of reconstructing the lost data. This type of array is best where read and write speeds are paramount, either for an intensive procedure such as video or graphics editing or where data is infrequently changed but regularly backed up by external means.

RAID 1: Mirroring

Mirroring is one method of improving reliability of data storage (the other being parity), the idea is to build in redundancy by writing data to two or more disks simultaneously, hence the term “mirror”. Not only does mirroring provide 100% redundancy in case of disk failure but recovery is fairly swift should a disk fail because all the data is immediately accessible from another disk. Generally, performance is adversely affected by using a mirrored array; some forms of read performance are increased but write performance is decreased as the data is written more than once.

The major drawback for a mirrored array is the overheads in disk space wastage; half the total capacity of the hard drives is lost in providing redundancy, although with hard drives prices falling all the time a fairly large mirrored array can be obtained for a reasonable cost. Newer SATA drives and SCSI drives with hotplug ability mean that should a drive fail under RAID 1 the faulty drive can be removed and replaced without shutting down the entire system, which is very useful where large quantities of data are stored and uptime is important.

RAID 2: Bit-level striping with Hamming code ECC

RAID 2 is no longer used in modern systems and never caught on commercially as it was cripplingly expensive, interesting only in that it did not fully subscribe to standards for other RAID types, another reason perhaps for its demise.

RAID 3: Byte level Striping with Dedicated Parity Drive

Used very rarely, data is striped on the drives at the byte level rather than the block level. Generally used for applications where speed is paramount but where fault tolerance must be maintained, now superseded by RAID 5.