That school we're the raid what exactly a raid is a raid stands for redundant array of independent desks
or sometimes are often referred to as inexpensive disk and.
Why do we need raid.
Well to create a redundancy meaning if one disk dies you have another disk right.
You don't want to lose your data if one did one of your primary disks dies.
So that's the primary reason we have raid and there are different type of rates.
The main ones that you will cover in this lessons are three trades in RAID 0 1 and 5.
And how do they work that scored them in RAID 0.
You have one disk that is let's say 5 gig.
You add another disk that becomes 10 gig.
So you put them together and that five plus five becomes 10 gig right.
Perfect.
So you were writing to both.
There's one here one there.
It's going across is faster of course but what happens if you lose one disk Well your outlook.
Why because you have lost all your data.
So there is most of the time raid's zero is used for data warehousing or backups that you really really
going to use.
So things like that.
So you do need to add a couple of disk physical disk together to make one big disk.
That's how great 1 0 is mostly used.
Let's talk about RAID 1.
That will eliminate that disadvantage of RAID 0 where we lose one disk and then you're out of luck in
RAID 1.
You have one disk and then you have another disk but you mirrored them together.
Meaning if you have 5 gig of space on one you have to have five you've got another one but that does
not mean you are going to have 10 get together because you are not adding them together.
You are mirroring mirroring them together.
So if you lose one days that's fine you'd still get to get your data from the other disk but there is
another disadvantages to raid 1 and that is slow.
It is slow because it has to replicate everything from one desk to another so that some sometime gets
a slow read and still writes.
Then to solve all these problems zero and zero and one.
What do we do then.
Zero or one has.
You have a risk to lose data as RAID 1.
We have slow read and write.
So we come up with RAID 5 in RAID 5.
You have one disk right.
Then you have another disk.
But this time you don't just add to it.
You actually copy everything to the second one as well.
But in RAID 5 you have to have three or more disks.
Why.
Because the way the way rate fire works is it will write to the first disk and it will put some information
about that data to the second disk.
It will write to the second this and it will put some of that information that it has written to the
third disk and it goes around like around Grah been like that.
So in case you lose one disk doesn't matter if it's a first second or third you will have the information
of the last day on one of the disks that you still have.
That's how you create raid 5.
But in this case you're not going to have like 5 5 5 15 because you have to write a some of the disk
information that's parity to some other desk as well.
So this way you can retrieve that information.
So in order to put that information somewhere it needs to reserve that space for it.
And that's where we get out of it like 12 or 13 gig of space.
So that's how trade works.
And the reason I am covering Reid in this training is because that's one of the very basic questions
often been asked during interviews and as a system administrator when you do become a system administrator
in Linux environment you will have to create a raid at a hardware level and you have a server coming
into your corporate environment.
You would have to configure raid.
And the difference between the primary difference between raid and LVM is is that raid is mostly configured
on the physical system physical servers and so not physical.
Physical disks whereas LVM is mostly configured on a virtual or logical disks.
So that's a primary difference so please remember it if you want to learn more about other rates only
encourage you to go online and find out about other ways.