Project 5 - RAID Arrays

RAID stands for Redudant Array of Inexpensive Disks, it can be incredibly useful for backing up your data, increaseing your disk speed and size, or both!

There are different types of RAID arrays, for more information consult this wiki

There are more types of raid than these, but these are the different types I used.

  • RAID0 - Two or more disks with stripped data.
  • RAID1 - Two or more disks with mirrored data.
  • RAID5 - Three or more disks with parity.
  • RAID6 - Four or more disks with parity.
  • RAID10 - Four or more disks mirrored then stripped.
  • RAID01 - Four or more disks stripped then mirrored.
  1. To setup your virtual disks on your VM, you'll need to be on your VM server (the VM server I used was named vmserver02).
    1. CD into /xen/conf and open up you're virtual machines .cfg file (my VM was named vm11)
    2. In your .cfg file you'll want to add disks. To do this; Under the “disk devices” section add..
      • 'file:/xen/domains/vm11/disk_1.img,xvda3,w',
      • 'file:/xen/domains/vm11/disk_2.img,xvda4,w',
      • 'file:/xen/domains/vm11/disk_3.img,xvda5,w',
      • 'file:/xen/domains/vm11/disk_4.img,xvda6,w',
      • 'file:/xen/domains/vm11/disk_5.img,xvda7,w',
      • 'file:/xen/domains/vm11/disk_6.img,xvda8,w',
      • 'file:/xen/domains/vm11/disk_7.img,xvda9,w',
      • 'file:/xen/domains/vm11/disk_8.img,xvda10,w',
    3. While still on your server..
      1. cd /xen/domains/vm11
        • dd if=/dev/zero of=disk_1.img bs=1M count=1024
        • Do this for all disks, 1 through 8.
        • dd is the data dump command, which will dump the data from the input file (if=/dev/zero) to the output file (of=disk_x.img). The /dev/zero file is a file full of infinate zeros.
        • bs=1M is bit size equals 1 megabyte count=1024, do it 1024 times.
  1. At this point you'll need to install mdadm, mdadm will configure and allow the RAID array to functnuh.
  2. Next, run the following
    • modprobe raid0
    • modprobe raid1
    • modprobe raid5
    • modprobe raid6
    • modprobe raid01
    • modprobe raid10
  3. Modprobing all the raid types will allow the system to reconize what raids you are going to run.

-To create the virtual raid do the following..

Raid0
Raid1
Raid5
Raid6
Raid01
Raid10