======Part 2====== =====Entries===== ====Entry 5: March 15, 2012==== *I have been diligently working on projects this last week but I just realised I haven't posted any entries in my opus. I finally have my vm server up and running and my first virtual machine. I definitely look forward to playing with that a little more. I have ssh with irssi running on my phone, also very cool. I haven't done any keywords yet but will get on that soon. Hpc classes are coming along nicely, I am still a little iffy about comp org but Matt says by the end of the semester we will start understanding things. ====Entry 6: March 30, 2012==== *So class seems to have finally taken a direction that might actually teach me something. We came up with a very basic instruction set and I have been working on implementing it. That and doing the opus has actually started teaching me things, though sometimes class itself still seems pointless. Once I have some time I am going to try and finish up my simulator and start writing code to run on it. ====Entry 7: April 2, 2012==== *I am a little behind due to working all weekend but I plan on finishing up my opus today. With the basic instruction set we came up with in class I feel like I am actually starting to learn things. I really did try to be a bigger part of the class but I seem to be learning more just going off on my own and asking questions one on one. Weeding out all the nonsense and just going straight to those who actually know what they are talking about just seems to make more sense to me. ====Entry 8: April 2(later), 2012==== *Ok so OPUS is done minus the experiments, for some reason this semester everyone seems to be struggling to come up with experiment ideas, I think its because we aren't constantly working on new things that are testable. After finishing the other parts of my opus I got to talk to Joe some more about the grisc cpu we are doing in class and learned a lot. We decided we are probably going to need to add a shift instruction too. Hopefully over break I can really get a lot done with this. =====Keywords===== {{page>asmpart2&nofooter}} {{page>hpc0part2&nofooter}} {{page>hpc2part2&nofooter}} =====Experiments===== *Experiments 4,5,6 are all gong to relate to RAID and a [[http://lab46.corning-cc.edu/user/kkrauss1/portfolio/raid| project]] I was working on ====Experiment 4: RAID: 2 drives are better than one==== *So for hpc I am learning about RAID and let me tell you, it smells better than the bug spray. *My first task with RAID was to create a level 0 raid array. Basically what this does it takes two hard drives and ties them together as one. So my experiment is going to be if I could copy a file that is larger than the drives. *Each drive partition is 1 gig but they are striped together as a 2 gig drive. * The striped drives are mounted as a single drive at /mnt so this is how I tested if I could copy a file larger than 1 gig to the drives * change directory to /mnt * type: dd if=/dev/zero of=test.file bs=1M count=1536(this is a gig and a half and quite larger than either single drive) * If you get no errors then everything worked according to plan *Easy experiment but a fundamental one when learning RAID. Normally any time you would try to copy a file to a disk that is smaller than the file you would get all sorts of errors. But with the functionality of RAID we just bypassed that shortcoming and tied two disks together to treat as one. ====Experiment 5: RAID, mirror mirror... how the heck do I back up?==== *Ok so this is the next logical step in my RAID series of experiments. *This experiment is going to deal with RAID level 1 which means the drives are mirrored. So I am going to simulate a hard drive failure and see if I am able to recover the data from the still intact drive and restore my RAID array. *The mirrored drives are tied together as one drive on /mnt *First lets cd into /mnt and using an editor create a file, put whatever message you want to in there then save and exit *Once you have put some data on the mirrored drives switch to your virtual server *Now pick one of the virtual disks used in the array and overwrite it using dd *Go back to your VM and reboot it *Try to mount your array(/dev/md0) * You will get errors, well wtf is going on!? This is where it gets interesting * Through trial and error, as well as a little google I learned that we have to tell mdadm that the drive went bad so type this: * mdadm –manage –set-fault /dev/md0 /dev/xvda# (# is the number of the drive that you simulated as bad) * Now that we have told mdadm that we have a faulty drive we simly need to give it a new one and it will automatically rebuild, so do this: * mdadm –manage /dev/md0 -a /dev/xvda# (# is the number of the drive you are replacing the faulty one with) * This process takes some time but you can monitor it by typing: * watch cat /proc/mdstat and watch the process as it rebuilds. It takes some time because all bits from the non damaged drive is copied to the replacement drive. *This took a little bit of time to figure out but once complete it was really quite simply. Again this is very important to know how to use the redundancy functionality of RAID. The experiment was a complete success and the data was completely recovered. ====Retest 2:RAID, mirror parity huh?==== *The final experiment in the RAID series *In the previous experiment I dealt with RAID level 1 which simply mirrors two drives * Everything that is written to one drive is also written to another * However this is RAID level 5 which has 3 drives, two drives will stripe blocks of data(experiment 4) with the third using parity * Parity is another form of redundancy and allows(in theory) the restoration of data if there is a drive failure *Basically this experiment is the simplest as I am simply going to repeat experiment 4 and 5 on a level 5 array. * I want to make sure that I can still copy a larger file and am able to restore lost data *I followed all the steps in experiment 4 and 5 and the experiment was a success. *I love RAID