Instructor: In this lesson,
we're going to discuss the use of RAIDs
to ensure your data redundancy.
A RAID is a Redundant Array of Independent disks,
which is essentially going to allow you
to combine multiple physical hard disks
into a single logical hard disk drive
inside of the operating system.
There are many different types of RAIDs out there,
but for the exam,
you're going to see just a couple of them mentioned.
You're going to see things like RAID 0, RAID 1, RAID 5,
sometimes RAID 6, and RAID 10.
Any of the other RAIDs out there,
and there are a lot,
you can ignore,
but these are the ones that are covered
specifically by the exam objectives,
and you're going to see them come up in your multiple choice,
as well as in your simulations.
First, we have a RAID 0.
Now, a RAID 0,
we have a keyword here called striping.
I want you to remember "striping" anytime you hear RAID 0.
With RAID 0, we have two disks that are working together,
and each of them holds half of the data.
So as you can see here on the screen,
part of the file, A1, and part of the file, A2,
is put on each of the drives.
So, let's assume I have a RAID 0 in my operating system,
I've installed it and I've configured it.
What does the operating system see?
Do they see Disk 1 and Disk 0?
No. They just see one RAID.
They see this as drive D,
or drive M,
or whatever letter I gave it.
And so if my Windows machine sees this,
as drive D for instance,
that might be where I store all my video editing files.
Now, as I'm doing this,
and I copy this video over to this drive D,
what is really happening?
It puts the first piece on Disk 0,
and the second piece on Disk 1,
and the third piece on Disk 0,
and then the fourth piece on Disk 1,
and it keeps doing this,
where the even parts and the odd parts
are split up across two different disks.
This is what's known as striping,
because I'm putting a piece on each of those.
And if you look at it, it kind of looks like a candy stripe,
like a peppermint stick,
as it's swirling around those two RAIDs
with the evens on one side and the odds on the other.
Now, when you're dealing with RAID 0,
this is great for speed, it's really fast.
But it gives you zero redundancy.
If one of these two disks fail, I lose half of the file,
and if I lose half the file, well, guess what?
The computer can't read the file at all,
and so really, it's like I lost the whole file.
Now, the good thing about using a stripe disk,
or a RAID 0 array,
is the fact that I get a speed boost, right?
And so if I'm doing things like high speed gaming,
or high speed video editing,
this is a good setup,
because I can actually access two disks
a lot faster than I can one disk,
because each of them can give me half of the information
at the same time.
Now, the other good thing about using a RAID 0
is the fact that there's no loss of space on the disks.
Now, what do I mean by that?
Well, as you're going to see in the demo,
I'm going to use 800 megabyte hard disks,
and each of these 800 megabyte hard disks
is going to be installed into this computer,
and we're going to use them as part of our RAIDs.
If I take two 800 megabyte hard disks
and connect them together as a RAID 0,
I'm actually going to get 1.5 gigabytes,
or about 1,600 megabytes of space
as a singular drive for the operating system to use.
So, I could take two smaller drives, put 'em together,
and they'll look like one big drive if I use a RAID 0.
Now, the next one we want to talk about here is a RAID 1.
And whenever you hear RAID 1,
I want you to think about two words,
"mirror" and "redundancy."
When you have a RAID 1, you have a mirrored disk array.
What this means is that every single thing
that's put on Disk 0 is also put on Disk 1,
as you can see here.
So for example,
if I take a file called A,
and I break it up into four pieces,
both Disk 0 and Disk 1
are going to have all those parts of file A.
And so you can see here, 1, 2, 3 and 4
is on Disk 0,
1, 2, 3, and 4 is on Disk 1.
So if I delete everything on Disk 1, guess what?
I still can access it on Disk 0,
and so that's what I'm talking about here
by being a mirrored disk array,
the fact that both disks have an exact identical copy.
Now, that gives us great redundancy,
in fact, it's full redundancy,
because an entire disk can go away
and I can still operate with no problems.
But there is one downside,
and that's the loss of space on one of those disks,
because if I take those two 800 megabyte disks,
I no longer get 1.5 gigabytes or 1,600 megabytes,
I get 800 megabytes.
Why?
Because I have a mirror copy of every single piece of data,
and so I have to make two full copies,
and it takes twice the amount of space to get what you want.
So you have half of your total storage
being used simply for redundancy,
and that means you're paying a lot more for storage costs
than you are if you're using something like a RAID 0.
So, let's take a look at an option that we can use
to get the best of both worlds.
Well, that's where we get RAID 5.
RAID 5 is going to give you redundancy through parity.
So when you hear RAID 5,
I want you to think of "redundancy," "parity."
Now, what this means,
is that I'm not going to have a full copy of everything.
When I used the RAID 1, I have a full mirror,
and so I took up the entire amount of space on both drives,
but with a RAID 5, I'm going to use three disks.
You can use three or more disks,
but for RAID 5, you have to use a minimum of three disks.
So here on the screen, I have three disks,
Disk 0, Disk 1, and Disk 2,
and I've got four different files being put there,
I have pieces of A, B, C, and D
being put on all those files.
Notice that B, C, and D have this thing called a Bp,
or a Cp, or a Dp,
and this means parity.
So what happens is I have this file, B,
and I take half of it and put it on Disk 0,
I take half of it and I put it on Disk 1.
Then I do a calculation,
and I put the results of that calculation on Disk 2.
So, if I lose one of the disks,
using the part I have and the parity for the two parts,
I can recalculate the parity,
and I can make up that file.
Now, I know that sounds kind of complicated,
but think of it this way,
if I give you two numbers,
and I give you the answer, two plus three equals five.
Now, if I take away any of those three numbers
and give you the other two,
can you still figure out what the other one was?
Well, sure.
If I give you two and three,
you can figure out that two plus three equals five.
If I gave you two plus what equals five,
you could say, well, five minus two is three,
so the answer is three.
Or if I gave you blank plus three is five,
you can say five minus three is two.
And so you can see that's what happens here,
we can be able to calculate the result.
That's what we're doing inside of a RAID 5,
and so that gives us redundancy through parity.
And the good thing about that
is even if I add a bunch more drives,
like let's say I had five disk drives here,
and only one of them is being used for parity,
well, that means if I lose one fifth of my space
to that parity bit,
I'm using a lot less than I would in a full mirror.
In the case here on the screen, I have three drives,
one third of them is being used for parity.
By using one third of them for parity,
that means I lose 33% of my disk space
instead of the 50% I lost back in RAID 1,
and so RAID 5 is actually one of the most common RAIDs
you're going to see,
it is what is heavily used in most server environments,
and heavily used by most small businesses,
so this is why you really got to be comfortable with.
All right, let's talk about RAID 6.
Well, what is RAID 6?
It's one better than RAID 5.
Anytime you hear RAID 6,
just think of five plus one.
So, everything you had that was true about RAID 5,
the same things are true about RAID 6,
except we're going to have double parity,
and so now I need four disks instead of three.
Why do I do this?
Well, in RAID 5,
I can only lose one disk and keep operating.
In RAID 6, I can actually lose two disks and keep operating.
So if I have maybe 5 or 10 disk drives,
using two of them for parity
gives me a much better redundancy value
than I would if I had just a RAID 5
with a single redundancy, with a single parity.
And that's really the only difference between a 5 and a 6.
With RAID 5, you have one parity,
RAID 6, you have double parity,
as you could see here on the screen.
Now, the next thing we want to talk about is a RAID 10.
Now RAID 10 is really a RAID of RAIDs,
and what I mean by that
is that I actually have two RAID 1's,
and they're placed inside a RAID 0 configuration.
If we go back to RAID 0,
we remember that was all about speed and striping,
and so, as the file comes in,
I'm going to stripe it half to the left side,
and half to the right side.
But because each of that left and right side
is actually a RAID array itself with a mirror,
I have all of the odd stuff on the left side
and all of the even stuff on the right side,
and I have two full copies.
So this is going to take up four disks,
but I still am using that RAID 1 configuration inside of it.
Right?
And so I'm going to lose half my disk space,
because I have two fully redundant mirrors of the RAID 0.
And so, this is really good from a redundancy standpoint,
and it gives you good speed,
because you're doing that striping,
so you're getting the benefits of RAID 1,
and the benefits of RAID 0,
but you are having to use four disks to do this,
and so that's one of the things you have to think about,
is would I would rather do this with a RAID 6
or a RAID 10?
And you make those choices based on the situation.
For the exam, they're not going to ask you to make choices
of which one is the best RAID
based on really in-depth circumstances.
Generally, they're going to say,
"I'm looking for speed, which RAID is best?"
The answer? RAID 0.
"I'm looking for redundancy, which one is best?"
Well, technically for redundancy,
RAID 1 would be the best, right?
Or RAID 10, if they have that as an option.
If they ask for something like,
"I'm looking for redundancy by using parity,"
well, in that case,
you'd be looking at something like a RAID 5.
And so usually the answers to those questions are going to be
RAID 0, RAID 1, or RAID 5.
So, when we think of RAIDs,
they can be categorized as failure resistant,
fault tolerant,
and disaster tolerant.
These are our three categories for RAIDs.
Now, if you have a failure resistant RAID,
that's going to be something like a RAID 1 or a RAID 5,
because it's going to protect against
the loss of the arrays data
if a single disk fails inside of it.
Now, when you talk about fault tolerant disk systems,
this would be something like a RAID 1 or a RAID 5 again,
or even a RAID 6,
because even if a single component fails,
one of those drives, or even one of the cards inside of it,
then that RAID can continue to function properly.
Now, our final category is known as disaster tolerant,
and so if we call a RAID disaster tolerant,
this means that the RAID has two independent zones
with full access to the data at all times.
A RAID 10 is a good example of a disaster tolerant RAID.
And by doing this, I could lose either half of the array,
and one of those RAID 1's are going to still function,
and that means the system is still going to keep functioning,
and it's going to make it disaster tolerant,
because I have a full copy of that data
ready to go at all times.
Now, RAIDs are a great thing to use
when you're trying to ensure
you have good redundancy of your data
online and available at all times,
and it helps us when we're designing
a high availability system.