Let's go over the raid, what exactly a raid is a raid stands for redundant array of independent desks
or sometimes often referred to as inexpensive desk.
And Reid, why do we need Reid 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 if one of your primary disks dies.
So that's the primary reason to be afraid.
And there are different type of rates.
The main ones that we will cover in this lessons are three rate rates, zero one and five.
And how do they work?
Let's go over them and read zero.
You have one disk that is, let's say five 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 disk one here, one there.
It's going across is faster, of course.
But what happens if you lose one disk?
Well, you're out of luck, why?
Because you have lost all your data, so there is most of the time read zero is used for like data warehousing
or backups that you really going to use.
So things like that.
So you do need to add a couple of disk physical disks together to make one big disk.
That's how great one zero is mostly used.
Let's talk about red one that will eliminate that disadvantage of Red Zero, where we lose one disk
and then you're out of luck in raid one.
You have one disk and then you have another disk, but you mirror them together.
Meaning if you have five gig of space on on one, you have to have five given either one.
But that does not mean you are going to have 10 gig together because you are not adding them together.
You have mirrored mirroring them together.
So if you lose one disk, that's fine, you still get the get your data from the other disk.
But there is another disadvantages to read one 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 slow writes then to solve all these problems zero and zero and one.
What do we do then.
Zero one has we have a race to lose data zero eight one.
We have slow read and write.
So we come up with rate five.
In raid five, 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 grade five, you have to have three or more disks.
Why?
Because the way the way rate five 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 a round robin like that.
So in case you lose one disk, which doesn't matter if it's a first, second or third, you will have
the information of the lost data on one of the disk that you still have.
That's how you create rate five.
But in this case, you're not going to have like five five five fifteen because you have to write some
of the disk information.
That's parity to some other disk 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 what we get out of it like 12 or 13 gigabytes space.
So that's how Reed works.
And the reason I am covering Reed 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.
When you have a server coming into your corporate environment, you would have to configure a 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 enough as physical disks, whereas LVM is mostly
configured on a virtual or logical disks.
So that's a primary difference.
So please remember, if you want to learn more about other rates, I would encourage you to go online
and find out about other rates.