Showing posts with label RAID Concepts. Show all posts
Showing posts with label RAID Concepts. Show all posts

RAID 0, RAID 1, RAID 5, RAID 10 Explained with Diagrams

RAID stands for Redundant Array of Inexpensive (Independent) Disks.
On most situations you will be using one of the following four levels of RAIDs.
  • RAID 0
  • RAID 1
  • RAID 5
  • RAID 10 (also known as RAID 1+0)
This article explains the main difference between these raid levels along with an easy to understand diagram.

In all the diagrams mentioned below:
  • A, B, C, D, E and F – represents blocks
  • p1, p2, and p3 – represents parity

RAID LEVEL 0


Following are the key points to remember for RAID level 0.
  • Minimum 2 disks.
  • Excellent performance ( as blocks are striped ).
  • No redundancy ( no mirror, no parity ).
  • Don’t use this for any critical system.

RAID LEVEL 1

Following are the key points to remember for RAID level 1.
  • Minimum 2 disks.
  • Good performance ( no striping. no parity ).
  • Excellent redundancy ( as blocks are mirrored ).

RAID LEVEL 5


Following are the key points to remember for RAID level 5.
  • Minimum 3 disks.
  • Good performance ( as blocks are striped ).
  • Good redundancy ( distributed parity ).
  • Best cost effective option providing both performance and redundancy. Use this for DB that is heavily read oriented. Write operations will be slow.

RAID LEVEL 10

Following are the key points to remember for RAID level 10.
  • Minimum 4 disks.
  • This is also called as “stripe of mirrors”
  • Excellent redundancy ( as blocks are mirrored )
  • Excellent performance ( as blocks are striped )
  • If you can afford the dollar, this is the BEST option for any mission critical applications (especially databases).

Software RAID Configuration

Tthe differences between Hardware and Software RAID, and the differences between RAID 0, 1, and 5.

Software RAID can be configured during the graphical installation of Red Hat Enterprise Linux or during a kickstart installation. This chapter discusses how to configure software RAID during installation, using the Disk Druid interface.

Before you can create a RAID device, you must first create RAID partitions, using the following step-by-step instructions:
  1. On the Disk Partitioning Setup screen, select Manually partition with Disk Druid.
  2. In Disk Druid, choose New to create a new partition.
  3. Choose software RAID from the File System Type pulldown menu as shown in Figure 12-1.

    Figure 12-1. Creating a New RAID Partition
  4. You will not be able to enter a mount point (you will be able to do that once you have created your RAID device). 
  5.  
  6.  A software RAID partition must be constrained to one drive. For Allowable Drives, select the drive on which RAID will be created. If you have multiple drives, all drives will be selected, and you must deselect all but one drive.  
  7. Enter the size that you want the partition to be.
  8. Select Fixed size to make the partition the specified size, select Fill all space up to (MB) and enter a size in MBs to give range for the partition size, or select Fill to maximum allowable size to make it grow to fill all available space on the hard disk. If you make more than one partition growable, they will share the available free space on the disk.
  9. Select Force to be a primary partition if you want the partition to be a primary partition.
  10. Click OK to return to the main screen.
Repeat these steps to create as many partitions as needed for your RAID setup. Notice that all the partitions do not have to be RAID partitions. For example, you can configure only the /home partition as a software RAID device.
Once you have all of your partitions created as software RAID partitions, follow these steps:
  1. Select the RAID button on the Disk Druid main partitioning screen (refer to Figure 12-4).
  2. Figure 12-2 will appear. Select Create a RAID device.

    Figure 12-2. RAID Options
  3. Next, Figure 12-3 will appear, where you can make a RAID device.

    Figure 12-3. Making a RAID Device
  4. Enter a mount point.
  5. Choose the file system type for the partition.
  6. Select a device name such as md0 for the RAID device.
  7. Choose your RAID level. You can choose from RAID 0, RAID 1, and RAID 5.
    NoteNote
    If you are making a RAID partition of /boot, you must choose RAID level 1, and it must use one of the first two drives (IDE first, SCSI second). If you are not creating a RAID partition of /boot, and you are making a RAID partition of /, it must be RAID level 1 and it must use one of the first two drives (IDE first, SCSI second).
  8. The RAID partitions you just created appear in the RAID Members list. Select which partitions of these partitions should be used to create the RAID device. 
  9. If configuring RAID 1 or RAID 5, specify the number of spare partitions. If a software RAID partition fails, the spare will automatically be used as a replacement. For each spare you want to specify, you must create an additional software RAID partition (in addition to the partitions for the RAID device). In the previous step, select the partitions for the RAID device and the partition(s) for the spare(s). 
  10. After clicking OK, the RAID device will appear in the Drive Summary list as shown in Figure 12-4. At this point, you can continue with your installation process. Refer to the Red Hat Enterprise Linux Installation Guide for further instructions.

Hardware RAID VS Software RAID

What is RAID?

RAID, an acronym for Redundant Arrays of Inexpensive Disks, is away to virtualize multiple, independent hard disk drives into one or more arrays to improve performance, capacity and reliability (availability). 

The total array capacity depends on the type of RAID array you build and the number and size of disk drives. This total array capacity is independent of whether you use software or hardware RAID. The following sections look at the different implementations, the strengths and weaknesses and their impact to system performance and effectiveness in enhancing data availability.

RAID is a method in which information is spread across several disks, using techniques such as disk striping (RAID Level 0), disk mirroring (RAID level 1), and disk striping with parity (RAID Level 5) to achieve redundancy, lower latency and/or increase bandwidth for reading or writing to disks, and maximize the ability to recover from hard disk crashes.

The underlying concept of RAID is that data may be distributed across each drive in the array in a consistent manner. To do this, the data must first be broken into consistently-sized chunks (often 32K or 64K in size, although different sizes can be used). Each chunk is then written to a hard drive in RAID according to the RAID level used. When the data is to be read, the process is reversed, giving the illusion that multiple drives are actually one large drive.

There are two possible RAID approaches: Hardware RAID and Software RAID.


1. Hardware RAID

The hardware-based system manages the RAID subsystem independently from the host and presents to the host only a single disk per RAID array.

An example of a Hardware RAID device would be one that connects to a SCSI controller and presents the RAID arrays as a single SCSI drive. An external RAID system moves all RAID handling "intelligence" into a controller located in the external disk subsystem. The whole subsystem is connected to the host via a normal SCSI controller and appears to the host as a single disk.

RAID controllers also come in the form of cards that act like a SCSI controller to the operating system but handle all of the actual drive communications themselves. In these cases, you plug the drives into the RAID controller just like you would a SCSI controller, but then you add them to the RAID controller's configuration, and the operating system never knows the difference.

2. Software RAID

Software RAID implements the various RAID levels in the kernel disk (block device) code. It offers the cheapest possible solution, as expensive disk controller cards or hot-swap chassis [1] are not required. Software RAID also works with cheaper IDE disks as well as SCSI disks. With today's fast CPUs, Software RAID performance can excel against Hardware RAID.

The MD driver in the Linux kernel is an example of a RAID solution that is completely hardware independent. The performance of a software-based array is dependent on the server CPU performance and load.

For information on configuring Software RAID during installation, refer to the Software RAID Configuration.

For those interested in learning more about what Software RAID has to offer, here is a brief list of the most important features:
  • Threaded rebuild process
  • Kernel-based configuration
  • Portability of arrays between Linux machines without reconstruction
  • Backgrounded array reconstruction using idle system resources
  • Hot-swappable drive support
  • Automatic CPU detection to take advantage of certain CPU optimizations