Bienvenido! - Willkommen! - Welcome!

Bitácora Técnica de Tux&Cía., Santa Cruz de la Sierra, BO
Bitácora Central: Tux&Cía.
Bitácora de Información Avanzada: Tux&Cía.-Información
May the source be with you!

Tuesday, May 19, 2009

RAID types

Source

RAID 0 – Striped Set

RAID 0 optimizes drive space and disk I/O but has no data redundancy. RAID 0 writes alternate blocks of data on each drive using a defined stripe size. Not only do you get the full use of all disk space but I/O is spread across all the drives in the array. This makes for faster reads and writes.

In order for a recovery from this type to be successful all the drives must have the capability of being addressed.

Standard stripe size is 128K, 256K.

RAID 1 – Mirrored Set.

RAID one is a popular configuration for end users. It allows for total data redundancy with a minimum of performance degradation. The theory is that if one of the drives in the array degrades the other drive takes over totally and the user is notified with either an alarm from the card and possibly an email.

The problems we at DTI have seen when recovering a mirrored set are as follows.

1. Mirrors get corrupted. Bad data from one drive may propagate itself onto the mirror.

2. Mirror breaks and try to boot from single drive. Operating system still does not boot due to mirror meta data.

3. Upon a rebuild the wrong drive is pointed to on the rebuild.

Standard block size is 64K, 128K

RAID 5 – Alternating parity

RAID 5 optimizes drive space and allows for a great deal of data redundancy. There is a throughput bonus since there are multiple disks, but there are some calculations that are made in order to create a parity block.

RAID 5 uses a stripe, broken into blocks. One block in each stripe is not a data block, it is a parity block. Using XOR mathematics it is possible to lose one drive and still run. Once a second drive is lost the array fails.

There are several problems involved in this type of RAID recovery.

1. One drive is marked as drive by the card as bad and the array is degraded. The drive is forced online and the data gets corrupted.

2. One drive is marked by card as bad and the array is degraded. Drive is not replaced and the array continues to function. Second drive goes down and array goes down. It is not clear which drive went down first and it becomes difficult to determine which drive has stale data.

3. An automatic rebuild is started and the wrong drive is used as a rebuild point.

4. Drives are taken out of array and put back in enclosure out of order.

There are many other problems associated with RAID 5 data recovery, but the above are the most prevalent.

What a RAID (Redundant Array of Independent Disks) is:

RAID 0 Striped Set:

All the disk devices are organized alternatively so that blocks are taken equally from all disks alternatively, in order to reach higher efficiency. Since the probability of finding a block of a file is identical for all disks, there are force to work simultaneously thus making the performance of the meta disk almost 10 times that of a single disk.

RAID 1 Mirror:

In this mode, the goal is to reach the highest security of the data. Blocks of data are duplicated in all physical disks (each block of the virtual disk has a duplicate in each of the physical disks). This configuration provides 10 times the reading performance of a single device, but it degrades writing operations. Read operations can be organized to read 10 blocks simultaneously, one from each device at a time. Similarly when writing 1 block it has to be duplicated 10 times, one for each physical device. There is no advantage in this configuration regarding storage capacity.

RAID 4:

In this mode the ultimate goal is to balance the advantages of the type RAID 0 and RAID 1. Data is organized mixing both methods. The physical 1 to N-1 are organized in striping mode (RAID0) and the Nth stores the parity of the individual bits corresponding to blocks 1 to N-1. If any of the disks fails, it is possible to recover by using the parity information on the Nth hard disk. Efficiency during read operations is N-1 and during write operations is 1/2 (because writing a data block now involves writing also to the parity disk). In order to restore a broken hard disk, one only has to re-read the information and re-write it (it reads from the parity disk but it writes to the newly install hard disk).

RAID 5:

This type is similar to RAID 4, except that now the information of the parity disk is spread over all the hard disks (no parity disk exists). It allows to reduce the work load of the parity disk, that in RAID 4 it had to be accessed for every write operation (now the disk where parity information for a track is stored differs for every track)

Why should I not use RAID 5?

1 comment:

Anonymous said...

I believe HP uses a different type of raid 5 config. It is called RAID 5E. My understanding is this enhances performance and may be more reliable. However, it seems because of the more complex parity scheme if the raid fails you will need to send it to a specialist fimiliar with this type of structure.