Module – 5 RAID – Redundant Array of Inexpensive (Independent) Disks

What is RAID?

Short for Redundant Array of Inexpensive Disks, RAID is an assortment of hard drives connected and setup in ways to help protect or speed up the performance of a computer’s disk storage.

RAID is commonly used on servers and high performance computers.

Types of RAID

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)







Let us create RAID in our LAB:

 To Install RAID Utility

rpm -ivh install mdadm*

To Create RAID-0 (Stripe)

mdadm --create /dev/md0 --level=stripe --raid-devices=2 /dev/sdb /dev/sdc

mdadm -Cv /dev/md0 -l1 -n2 /dev/sd[ab]1

 To create RAID-1 (Mirror)

mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/sdb /dev/sdc

 To create RAID-5

mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sdb /dev/sdc /dev/sdd 

 To create RAID-10

mdadm --create /dev/md0 --level=raid10 --raid-disks=4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1

Save your RAID configuration after you create & update.

mdadm --detail --scan >> /etc/mdadm.conf

Use RAID device as regular device for LVM & file system creation

  • Example to use your RAID device:
  • pvcreate /dev/md0
  • vgcreate raidvg /dev/md0
  • Lvcreate –n raid-lv –size 1G raidvg
  • mkfs –t ext4 /dev/raidvg/raid-lv
  • mkdir /raid
  • mount –t ext4 /dev/raidvg/raid-lv
To fail a disk in RAID:

mdadm --fail /dev/md0 /dev/sda1

To remove a failed Disk from RAID:

mdadm --remove /dev/md0 /dev/sda1

Or you can do it in single step:

mdadm /dev/md0 --fail /dev/sda1 --remove /dev/sda1

To Add a disk to existing RAID:
mdadm --add /dev/md0 /dev/sdb1

To Verify:

cat /proc/mdstat

mdadm --detail /dev/md0

To Completely Remove RAID:
mdadm --stop /dev/md0
mdadm --remove /dev/md0

Are you looking for "macmall discounts"? Check out dealectronic The passionate experts in this field are ready to answer all of your requests.

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>