DEPARTMENT OF COMPUTING

Course Home | Syllabus | Assignments | Schedule | Readings | Grades | Submissions | [print]

Hardware Raid

Objectives:

Requirements:

You are issued a rack server that has a hardware RAID card installed. Note that there are only 3 of these in the lab. You will need a removable flash drive to complete the tasks.

Essentially, you will do the same tasks as the previous software RAID assignment and compare and contrast your results with hardware raid.

Task 1 - Initial setup

Install an OS to your flash drive. It will be much easier to install an Operating System once (on a flash drive) rather than on the raid drives themselves. Otherwise, everytime you changed your RAID configuration you would likely be re-installing your OS. Boot your rack server from your flash drive. I used Ubuntu linux, but you are welcome to use any nix that you would like, though with limited help from me. The easiest way to install to a flash drive is to use usb-creator-gtk from a linux instance and point it to the correct iso. Windows also has a nice utility (Universal USB Installer). You should reserver probably 1 GB or so for your persistent storage. A 4GB flash drive ought to be sufficient. Spring 2017, I followed the instructions here to create a persistent Ubuntu.

Certainly, you can do most of the following tasks from within the boot menu, but if you are like me, you will NOT want to sit in that little networking closet working on this assignment. That being said, make sure that you can ssh to your flash-booted raid server (from the OS you installed above). You need to install the tw_cli interface that will allow you to work with your raid controller card. This can be found here. You will need to untar it on your flash device and then do sudo ./install.sh -i to install it.

Although I have given you the command line instructions below, you can do the same thing from the web management interface (as previously stated). You can access the web interface of your RAID machine by visiting https://yourhost:888. NOTE: Apparently some new patches in FF and IE have rendered this webserver unusable. I was able to access it with Safari though.

NOTE: In the below commands, I refer to tw_cli, if you installed from the above package it may be tw_cli.x86

Here is a short youtube video that outlines how to start.

Here’s how things might run from the command line:

    root@raid2:~# ./tw_cli

You should see a prompt that looks kind of like this (my hostname is raid2):

    //raid2>

Do some tests to see if you can see your raid card. Type show at the command line. If you see something like this (though it won’t be exact) you are ready to begin.

    //raid2> show

    Ctl   Model        (V)Ports  Drives   Units   NotOpt  RRate   VRate  BBU
    ------------------------------------------------------------------------
    c4    9650SE-4LPML 4         4        1       0       1       1      - 

Proceed to complete the following tasks. This first one will just allow us to complete the rest. This page is very helpful to decipher what the tw_cli binary can do.

Task 2 - Striping
Description

You need to create a new unit. Using the /cx add command (where x is the number of your controller-mine above is 4), add a new RAID unit to the device… If it yells at you (which it probably will), you will need to first delete the existing unit. To delete (assuming u0 is the unit number that currently exists on controller 4) (You will have different numbers):

    //raid2> /c4/u0 del
    Deleting /c4/u0 will cause the data on the unit to be permanently lost.
    Do you want to continue ? Y|N [N]: Y
    Deleting unit c4/u0 ...Done.

If the above command says something about “Is the filesystem mounted…”, you will need to run:

    /c4/u0 del noscan quiet

Now you should be able to do the above add command. Make sure it is RAID 0, and stripe 2 of the disks together with a stripe size of 64.

    /c4 add type=raid0 disk=0:1 stripe=64 name=yourFirstName

Remember that if you have questions, you can always do: /c4 ? or /c4/u0 ?

What good is it? Good question. Let’s mount it to our flashbooted OS and see what we could use it for. You should be familiar with fdisk -l command to see what device the OS has assigned to it. We aren’t looking for the entry of your flash disk, but something like this:

    Disk /dev/sdc: 2000.0 GB, 1999957393408 bytes

2 terabytes? That must be our striped array. You are only mirroring 2 drives so you will only have 1 terabyte. Format it as an ext4 filesystem and mount it into your existing filesystem. I.e. some commands that you should already be familiar with, but that will help you are:

    cfdisk /dev/sdc (assuming it is sdc above)
mkfs.ext4   (assuming I want to make it an ext4 filesystem)
mount -t ext4 /dev/sdc1 temp/ (mounts that newly created partition to a directory called temp)

You will want to capture the following (to put in your report later). The output of the df command. The relevant output of the mount command. (i.e. mount | grep sdc)

**Note: We are going to each of our tasks as an ext4 filesystem so that we can compare our benchmark tests.

Benchmarking

If you have a gui version of linux installed, you can use ubuntu’s built-in disk utility to benchmark minimum read and write speeds. And it will display it to you in a nice colorful, graphical format!

Do some benchmark tests. These should be the same benchmark numbers that you chose for the software raid assignment (so we can do some fair comparisons again)

Screen capture the results of all your benchmark results.

Rebuilding

One of the main purposes of RAID is redundancy in case of a drive failure. We need to see what happens as we fail. Make sure that you have done the other requirements above and correctly recorded the output as defined in the pass off section below before you attempt this section, else you may end up with an unusable RAID state and have to start over again. (Note: If you are doing striping, there IS no redundant data, so you CAN’T rebuild anything… You may skip this entire section on rebuilding for striping ONLY)

Physically remove a drive that is participating in your RAID array. To see what drives are participating, just use the show command. If you don’t want to physically remove and to avoid creating a real hardware failure please issue the following command that will nicely unplug the drive from your raid array.

    ./tw_cli /c0/p6 remove

Now that you have removed a drive, your RAID array should be broken, let’s now try to resurrect our stuff. Note that at this point, if you do the show command you should see a status of DEGRADED for your array (capture that).

Before you re-insert the disk, re-run your benchmark i/o tests with the disk utility and record your results.

Re-insert and scan for the newly inserted disk:

    ./tw_cli /c0 rescan

From what I have seen, if you do the show command again after rescanning, the unit should no longer be in the degraded status, but in the REBUILDING status. Wait for about 20 years, and it should finish. Capture that you are indeed rebuilding and make sure that your data is good again.

Task 3 - Raid 10

You guessed it. Do a raid 10 configuration. Remount, benchmark and rebuild. Record data.

Task 4 - Raid 5

Do a raid5 configuration. Remount, benchmark and rebuild. Record data.

Task 5 - Results

Finally, compare and contrast the results of your benchmarks of raid0, raid5, and raid10. You should discuss the following:

This should follow appropriate technical report-writing conventions. Make sure that you include a cover page and that you have subdivided your report into appropriate sections using subheadings and headings as appropriate.

Any of your screen captures from above should be an appendix to this report. Make it neat and legible as if you were submitting this to your CEO so he could decide what to buy!!

Last Updated 12/27/2018