Using RAID Disks

RAID (Redundant Arrays of Independent Disks)spreads the data used on a computer across multiple disks, while appearing to the operating system as if it is dealing with a single disk partition. Using the different RAID specifications, you can achieve the following advantages:

■ Improved Disk Performance — RAID0 uses a feature called striping in which data is striped across multiple RAID partitions. Striping can improve disk performance by spread-ing the hits on a computer’s file system across multiple partitions, which are presumably on multiple hard disks. However, striping does not provide redundancy. If one disk fails, all the data is lost (not only the data on that disk).

clip_image002

■ Mirroring— RAID1 uses partitions from multiple hard disks as mirrors. That way, if one of the partitions becomes corrupted or the hard disk goes down, the data exists on a partition from another disk because it has continuously maintained an exact mirror image of the original partition.

clip_image004

■ Parity— Although striping can improve performance, it can increase the chance of data loss, since any hard-disk crash in the array can potentially cause the entire RAID device to fail. Using a feature called parity, information about the layout of the striped data is kept

so that data can be reconstructed if one of the disks in the array crashes. RAID3, 4, and 5 implement different levels of parity.

clip_image006

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
  • Minimum 2 disks.
  • Good performance ( no striping. no parity ).
  • Excellent redundancy ( as blocks are mirrored ).
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
  • 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).
FOR THE LINUX WE HAVE COMMAND
mdadm --create --verbose /dev/md0--level=raid1 --raid-devices=2 /dev/sda1 /dev/sdb1
mdadm --create --verbose /dev/md1--level=raid1 --raid-devices=2 /dev/sda2 /dev/sdb2
where /dev/md0 is RAID name, level is RAID level, devices is number partitions, /dev/sda1 and /dev/sdb1 is two different partitions.
Start the RAID devices:
raidstart /dev/md0
raidstart /dev/md1
See RAID rebuild status:
cat /proc/mdstat

Leave a Reply