Thursday, July 22, 2010


How to Implement RAID0?

How to Unconfiguring RAID0?

How to Implement RAID1?

How to Unconfiguring RAID1?

How to Implement RAID5?

How to Unconfiguring RAID5?

How to implement RAID10

RAID10 can be implemented by first implement RAID1(ie mirring) then implementing RAID0(stripeset on different disks) on it.

Configuring RAID10
Step1:Get the info who many devices are participating, for example here we taken 4 disks(/dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1).
Step2:Implement RAID1 on four drives(taking 2 each)

#mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sd[ab]1
#mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/sd[cd]1
Step3:Now implement RAID0 on two of RAID1 devices(/dev/md0,/dev/md1)

#mdadm --create /dev/md2 --chunk=64 --level=0 --raid-devices=2 /dev/md[01]
Step4:Format the RAID10 device with ext3 and mount the device
#mke2fs -j /dev/md2
#mkdir /store
#mount /dev/md2 /store
Unconfiguring RAID10
Step1:Unmount the RAID device /dev/md2
#umount /dev/md2 or #umount /store
Step2:Stop the RAID device
#mdadm --manage /dev/md2 --stop
#mdadm --manage /dev/md1 --stop
#mdadm --manage /dev/md0 --stop
Step3:Remove the Disks(/dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1) by using fdisk utility


So what is the difference between RAID01 and RAID10?
This is bit tricky question, Recently I came to know about this one in an interview. so do both are same?
No both are not same.
When we are dealing with RAID01 we are actually implementing RAID0 first then RAID1 on it. Ok little bit confused?
Let me put it in this way RAID0 is nothing but stripeset writing of data and RAID1 is Mirring of data on to disks.For example lets take 8 disks, so first we are writing whole data on 4 disks then we are mirring it on to remaining disks.
Where as in RAID10 we are first mirring disk and then striping data on mirrered disks
In general RAID01 is "a mirrior of 2 strips" and RIAD10 is "a single strip on mirrered disks"

So here one more question arises... which one is good?
RAID10 is good, the difference is that the chance of system failure with two drive failures in a RAID 0+1 system with two sets of drives is (n/2)/(n - 1) where "n" is the total number of drives in the system. The chance of system failure in a RAID 1+0 system with two drives per mirror is 1/(n - 1). So, using the 8 drive systems shown in the diagrams, the chance that loosing a second drive would bring down the RAID system is 4/7 with a RAID 0+1system and 1/7 with a RAID 1+0 system.

RAID is a technology that is used to increase the performance and/or reliability of data storage. The abbreviation stands for Redundant Array of Inexpensive Disks. A RAID system consists of two or more disks working in parallel. These disks can be hard discs but there is a trend to also use the technology for solid state drives.
The software to perform the RAID-functionality and control the hard disks can either be located on a separate controller card (a hardware RAID controller) or it can simply be a driver. Some versions of Windows, such as Windows Server 2003, as well as Mac OS X include software RAID functionality. Hardware RAID controllers cost more than pure software but they also offer better performance.
RAID-systems can be based with an number of interfaces, including SCSI, IDE, SATA or FC (fibre channel.) There are systems that use SATA disks internally but that have a FireWire or SCSI-interface for the host system.
There are different RAID levels, each suiting specific situations. RAID levels are not standardized by an industry group. This explains why companies are sometimes creative and come up with their own unique implementations.
Sometimes disks in a RAID system are defined as JBOD, which stands for ‘Just a Bunch Of Disks’. This means that those disks do not use a specific RAID level and are used as if they were stand-alone disks. This is often done for disks that contain swap files or spooling data.
Below is an overview of the most popular levels:

RAID 0: striping

In a RAID 0 system, data are split up in blocks that get written across all the drives in the array. By using multiple disks (at least 2) at the same time, RAID 0 offers superior I/O performance. This performance can be enhanced further by using multiple controllers, ideally one controller per disk.


  • RAID 0 offers great performance, both in read and write operations. There is no overhead caused by parity controls.
  • All storage capacity can be used, there is no disk overhead.
  • The technology is easy to implement.


RAID 0 is not fault-tolerant. If one disk fails, all data in the RAID 0 array are lost. It should not be used on mission-critical systems.

Ideal use

RAID 0 is ideal for non-critical storage of data that have to be read/written at a high speed, e.g. on a Photoshop image retouching station.

RAID 1: mirroring

Data are stored twice by writing them to both the data disk (or set of data disks) and a mirror disk (or set of disks) . If a disk fails, the controller uses either the data drive or the mirror drive for data recovery and continues operation. You need at least 2 disks for a RAID 1 array.
RAID 1 systems are often combined with RAID 0 to improve performance. Such a system is sometimes referred to by the combined number: a RAID 10 system.


  • RAID 1 offers excellent read speed and a write-speed that is comparable to that of a single disk.
  • In case a disk fails, data do not have to be rebuild, they just have to be copied to the replacement disk.
  • RAID 1 is a very simple technology.


  • The main disadvantage is that the effective storage capacity is only half of the total disk capacity because all data get written twice.
  • Software RAID 1 solutions do not always allow a hot swap of a failed disk (meaning it cannot be replaced while the server keeps running). Ideally a hardware controller is used.

Ideal use

RAID-1 is ideal for mission critical storage, for instance for accounting systems. It is also suitable for small servers in which only two disks will be used.


On RAID 3 systems, datablocks are subdivided (striped) and written in parallel on two or more drives. An additional drive stores parity information. You need at least 3 disks for a RAID 3 array.
Since parity is used, a RAID 3 stripe set can withstand a single disk failure without losing data or access to data.


  • RAID-3 provides high throughput (both read and write) for large data transfers.
  • Disk failures do not significantly slow down throughput.


  • This technology is fairly complex and too resource intensive to be done in software.
  • Performance is slower for random, small I/O operations.

Ideal use

RAID 3 is not that common in prepress.


RAID 5 is the most common secure RAID level. It is similar to RAID-3 except that data are transferred to disks by independent read and write operations (not in parallel). The data chunks that are written are also larger. Instead of a dedicated parity disk, parity information is spread across all the drives. You need at least 3 disks for a RAID 5 array.
A RAID 5 array can withstand a single disk failure without losing data or access to data. Although RAID 5 can be achieved in software, a hardware controller is recommended. Often extra cache memory is used on these controllers to improve the write performance.


Read data transactions are very fast while write data transaction are somewhat slower (due to the parity that has to be calculated).


  • Disk failures have an effect on throughput, although this is still acceptable.
  • Like RAID 3, this is complex technology.

Ideal use

RAID 5 is a good all-round system that combines efficient storage with excellent security and decent performance. It is ideal for file and application servers.

RAID 10: a mix of RAID 0 & RAID 1

RAID 10 combines the advantages (and disadvantages) of RAID 0 and RAID 1 in a single system. It provides security by mirroring all data on a secondary set of disks (disk 3 and 4 in the drawing below) while using striping across each set of disks to speed up datatransfers.

What about RAID 2, 4, 6 or 7?

These levels do exist but are not that common, at least not in prepress environments. This is just a simple introduction to RAID-system. You can find more in-depth information on this url :

RAID 2 = bit level striping
RAID 3 = byte level striping
RAID 4 = block level striping
RAID 5 = block level striping with distributed parity