1 00:00:00,000 --> 00:00:01,890 [No audio] 2 00:00:01,890 --> 00:00:04,139 Let's go over the RAID. What exactly RAID 3 00:00:04,200 --> 00:00:08,760 is? A RAID stands for redundant array of 4 00:00:08,760 --> 00:00:12,600 independent disks, or sometimes often 5 00:00:12,600 --> 00:00:16,290 referred to as inexpensive disk. And 6 00:00:16,290 --> 00:00:18,600 RAID, why do we need RAID? Well to 7 00:00:18,600 --> 00:00:21,540 create a redundancy, meaning if one disk 8 00:00:21,540 --> 00:00:23,700 dies, you have another disk, right? You 9 00:00:23,700 --> 00:00:25,650 don't want to lose your data if one of 10 00:00:25,650 --> 00:00:27,570 one of your primary disks dies. So 11 00:00:27,570 --> 00:00:29,550 that's the primary reason we have RAID. 12 00:00:30,270 --> 00:00:32,159 And there are different types of RAIDs. 13 00:00:32,970 --> 00:00:34,980 The main ones that we will cover in this 14 00:00:34,980 --> 00:00:37,440 lesson are three RAIDs, RAID 0, 1, and 15 00:00:37,440 --> 00:00:39,630 5. And how do they work? Let's go 16 00:00:39,630 --> 00:00:43,050 over them. In RAID0, you have one 17 00:00:43,050 --> 00:00:46,140 disk, that is, let's say five gig. You 18 00:00:46,140 --> 00:00:49,680 add another disk, that becomes 10 gig. 19 00:00:50,730 --> 00:00:53,220 So you put them together, and then five 20 00:00:53,220 --> 00:00:55,650 plus five becomes 10 gig, right? 21 00:00:55,860 --> 00:00:58,410 Perfect. So you are writing to both disc 22 00:00:58,410 --> 00:01:00,360 one here, one there, it's going 23 00:01:00,360 --> 00:01:03,330 across, it's faster, of course. But what 24 00:01:03,330 --> 00:01:07,980 happens if you lose one disk? Well, you 25 00:01:07,980 --> 00:01:10,290 are out of luck. Why? Because you have lost all 26 00:01:10,290 --> 00:01:13,260 your data. So there is the most of the 27 00:01:13,260 --> 00:01:17,820 time RAID0 is used for like data 28 00:01:17,820 --> 00:01:20,610 warehousing or backups that you really 29 00:01:20,610 --> 00:01:22,740 rarely going to use. So things like 30 00:01:22,740 --> 00:01:25,530 that. So you do need to add a couple of 31 00:01:25,530 --> 00:01:28,230 disk, physical disks, together to make one 32 00:01:28,230 --> 00:01:31,170 big disk. That's how RAID0 is 33 00:01:31,170 --> 00:01:34,380 mostly used. Let's talk about RAID1, 34 00:01:35,190 --> 00:01:38,100 that will eliminate that disadvantage of 35 00:01:38,100 --> 00:01:40,770 RAID0 where we lose one disk, and 36 00:01:40,770 --> 00:01:43,080 then you are out of luck. In RAID1, 37 00:01:43,110 --> 00:01:46,020 you have one disk, and then you have 38 00:01:46,050 --> 00:01:48,300 another disk, but you mirror them 39 00:01:48,300 --> 00:01:50,610 together. Meaning if you have five gig 40 00:01:50,610 --> 00:01:52,830 of space on one, you have to have 41 00:01:52,830 --> 00:01:54,600 five gig on another one. But that does 42 00:01:54,600 --> 00:01:55,980 not mean you have, you're going to have 43 00:01:55,980 --> 00:01:57,900 10 gig together, because you are not 44 00:01:57,900 --> 00:02:00,210 adding them together, you are mirroring 45 00:02:00,240 --> 00:02:03,720 mirroring them together. So if you lose 46 00:02:03,720 --> 00:02:05,970 one disk, that's fine, you still get the 47 00:02:06,120 --> 00:02:08,220 get your data from the other disk. But 48 00:02:08,340 --> 00:02:10,803 there is another disadvantages to RAID1, 49 00:02:10,803 --> 00:02:14,730 and that is slow. It is slow, 50 00:02:14,730 --> 00:02:18,720 because it has to replicate everything 51 00:02:18,720 --> 00:02:20,610 from one disk to another so that some 52 00:02:20,640 --> 00:02:23,430 some time gets a slow read and slow 53 00:02:23,430 --> 00:02:26,670 writes. Then to solve all these problems 54 00:02:26,670 --> 00:02:29,130 0 and 1, what do we do 55 00:02:29,130 --> 00:02:33,480 then? 0, 1 has, we have a risk to lose data, 56 00:02:33,480 --> 00:02:37,650 RAID1, we have slow read and 57 00:02:37,650 --> 00:02:40,350 write. So we come up with RAID5, and 58 00:02:40,350 --> 00:02:43,620 RAID5, you have one disk right? Then 59 00:02:43,650 --> 00:02:45,540 you have another disk, but this time you 60 00:02:45,540 --> 00:02:49,170 don't just add to it, you actually copy 61 00:02:49,170 --> 00:02:51,240 everything to the second one as well. 62 00:02:51,300 --> 00:02:54,120 But in RAID5, you have to have three 63 00:02:54,150 --> 00:03:00,300 or more disks. Why? Because the way, the 64 00:03:00,300 --> 00:03:03,390 way RAID5 works is, it will write to 65 00:03:03,390 --> 00:03:05,490 the first disk, and it will put some 66 00:03:05,490 --> 00:03:08,040 information about that data to the 67 00:03:08,040 --> 00:03:10,440 second disk. It will write to the second 68 00:03:10,440 --> 00:03:11,910 disk and it will put some of that 69 00:03:11,910 --> 00:03:14,820 information that it has written to 70 00:03:14,820 --> 00:03:17,280 the third disk, and it goes around like 71 00:03:17,280 --> 00:03:20,190 a round robin like that. So in case you 72 00:03:20,190 --> 00:03:22,110 lose one disk, which doesn't matter if 73 00:03:22,110 --> 00:03:24,030 it's a first, second or third, you will 74 00:03:24,030 --> 00:03:26,580 have the information of the lost data 75 00:03:26,760 --> 00:03:28,830 on one of the disks that you still have. 76 00:03:29,160 --> 00:03:31,770 That's how you create RAID5. But in 77 00:03:31,770 --> 00:03:33,060 this case, you're not going to have like 78 00:03:33,060 --> 00:03:36,600 5, 5, 5, 15, because you have to write some of 79 00:03:36,600 --> 00:03:39,360 the disk information that's parity to 80 00:03:39,360 --> 00:03:41,370 some other disk as well. So this way you 81 00:03:41,370 --> 00:03:44,040 can retrieve that information. So in 82 00:03:44,040 --> 00:03:45,780 order to put that information somewhere, 83 00:03:45,870 --> 00:03:48,060 it needs to reserve that space for it. 84 00:03:48,570 --> 00:03:50,340 And that's where we get out of it like 85 00:03:50,340 --> 00:03:53,310 12 or 13 gig of space. So that's how 86 00:03:53,310 --> 00:03:56,640 RAID works. And the reason I am covering 87 00:03:56,640 --> 00:03:59,250 RAID in this training is because that's 88 00:03:59,250 --> 00:04:01,500 one of the very basic questions often 89 00:04:01,500 --> 00:04:04,050 been asked during interviews. And as a 90 00:04:04,050 --> 00:04:06,180 system administrator when you do become 91 00:04:06,180 --> 00:04:08,190 a system administrator in Linux 92 00:04:08,190 --> 00:04:10,470 environment, you will have to create 93 00:04:10,470 --> 00:04:12,720 RAID at a hardware level. When you have 94 00:04:12,720 --> 00:04:14,250 a server coming into your corporate 95 00:04:14,250 --> 00:04:15,780 environment, you will have to configure 96 00:04:15,780 --> 00:04:17,880 a RAID. And the difference between, the 97 00:04:17,880 --> 00:04:20,339 primary difference between RAID and LVM 98 00:04:20,519 --> 00:04:24,000 is that RAID is mostly configured on 99 00:04:24,000 --> 00:04:26,610 the physical system, physical servers, 100 00:04:27,209 --> 00:04:29,790 and sorry, not physical, physical disks. 101 00:04:30,270 --> 00:04:33,150 Whereas LVM is mostly configured on a 102 00:04:33,150 --> 00:04:36,390 virtual or logical disks. So that's the 103 00:04:36,390 --> 00:04:38,160 primary difference. So please remember 104 00:04:38,160 --> 00:04:39,960 it if you want to learn more about other 105 00:04:39,960 --> 00:04:41,820 RAIDs, I would encourage you to go 106 00:04:41,820 --> 00:04:44,310 online and find out about other RAIDs. 107 00:04:44,310 --> 00:04:45,568 [No audio]