1 00:00:00,430 --> 00:00:01,420 Hello, everyone. 2 00:00:01,630 --> 00:00:07,120 In this demo, I'm going to show you how to configure remote file systems with NFS. 3 00:00:07,810 --> 00:00:13,630 NFS or network file system is also known as a client and server file system. 4 00:00:14,870 --> 00:00:23,000 And if this is a distributed file system protocol that allows users to share remote directories over 5 00:00:23,000 --> 00:00:23,780 a network. 6 00:00:24,360 --> 00:00:31,800 As you can see here on the screen, I'm using Tmax is a terminal multiplexer and I have two machines 7 00:00:31,830 --> 00:00:33,000 on the left side. 8 00:00:33,000 --> 00:00:39,450 I have the server machine and on the right side I do have the client machine. 9 00:00:40,230 --> 00:00:44,280 Right now I'm going to start configuring the server machine first. 10 00:00:44,310 --> 00:00:47,430 Then I'm going to configure the client machine. 11 00:00:48,320 --> 00:00:49,250 The first step. 12 00:00:49,250 --> 00:00:58,490 I need to install the NFS packages so I'm going to run the command m install nfs utils hit enter. 13 00:00:58,850 --> 00:01:05,780 I already have the packages installed on the system in case if you don't have it then you have to install 14 00:01:05,780 --> 00:01:06,200 it. 15 00:01:06,770 --> 00:01:12,230 I'll run the command yum install and this is the name of the NFS packages. 16 00:01:12,770 --> 00:01:18,830 The next step I need to start the NFS service so I'm going to run the command. 17 00:01:18,860 --> 00:01:19,190 First. 18 00:01:19,190 --> 00:01:26,510 I'm going to run the command system Ctl status, then NFS server that. 19 00:01:27,270 --> 00:01:28,230 Surface. 20 00:01:28,950 --> 00:01:30,420 It's inactive. 21 00:01:31,650 --> 00:01:34,620 Now I'm going to start the surface system. 22 00:01:34,650 --> 00:01:39,480 Ctl start NFS Server. 23 00:01:40,170 --> 00:01:43,520 You don't have to type that surface. 24 00:01:43,530 --> 00:01:48,000 You can just type the NFS server hit enter. 25 00:01:58,600 --> 00:01:59,140 Perfect. 26 00:01:59,170 --> 00:02:01,090 Now I'm going to check the status. 27 00:02:01,690 --> 00:02:05,530 It's active in case if the NFS. 28 00:02:06,220 --> 00:02:07,300 Surface. 29 00:02:08,350 --> 00:02:10,220 Disable, then what you need. 30 00:02:10,250 --> 00:02:15,700 You need to run the command systemctl enable then dash dash. 31 00:02:15,700 --> 00:02:21,310 Now then NFS dash server hit enter. 32 00:02:21,340 --> 00:02:24,850 Then you're going to enable the service. 33 00:02:25,990 --> 00:02:30,010 Now the next step I'm going to check the LS block. 34 00:02:30,010 --> 00:02:31,600 I'm going to check the blocks here. 35 00:02:31,600 --> 00:02:33,610 I'm going to use this hard disk. 36 00:02:34,340 --> 00:02:40,460 In order to make a mount point so I don't have a mount point for this device or hard disk. 37 00:02:41,620 --> 00:02:49,270 So I'm going to create a directory and I'm going to call this one storage dash server. 38 00:02:49,390 --> 00:02:50,050 Hit enter. 39 00:02:50,080 --> 00:02:50,890 Perfect. 40 00:02:51,920 --> 00:02:52,840 Right now. 41 00:02:53,900 --> 00:03:04,950 Before I'm going to write or to do the permanent or persistent Mount Point, I need to check the file 42 00:03:04,970 --> 00:03:05,780 system type. 43 00:03:05,780 --> 00:03:08,210 It's already ZFS. 44 00:03:08,810 --> 00:03:17,390 So in case if you want to make the file system type for this device so you can run the command Mkfs 45 00:03:17,390 --> 00:03:25,700 dash T so and then ZFS, then dev dash slash std perfect. 46 00:03:26,210 --> 00:03:28,550 It's already have the. 47 00:03:29,430 --> 00:03:32,190 ZFS file system type. 48 00:03:32,430 --> 00:03:34,060 Right now, let's move on. 49 00:03:34,080 --> 00:03:43,890 Now I'm going to do the permanent or persistent Mount Point, so I'm going to add the mount point and 50 00:03:43,890 --> 00:03:49,410 the configuration file, the slash Etsy slash fstab hit enter here at the end. 51 00:03:49,410 --> 00:03:51,000 I'm going to add a new line. 52 00:03:51,180 --> 00:04:03,540 The mount device dev slash SDB, then the mount point slash storage dash server, then the type, the 53 00:04:03,540 --> 00:04:07,380 file system type ZFS then defaults. 54 00:04:11,570 --> 00:04:12,980 Then zero zero. 55 00:04:13,010 --> 00:04:14,750 Perfect, Skip. 56 00:04:14,750 --> 00:04:18,350 Then I'm going to save the file. 57 00:04:18,440 --> 00:04:21,980 Tail dash n the last line. 58 00:04:21,980 --> 00:04:24,380 I just would like to show the last line and. 59 00:04:25,640 --> 00:04:27,850 Uh, the slash ATC slash stab. 60 00:04:27,890 --> 00:04:28,940 Perfect. 61 00:04:29,120 --> 00:04:31,700 Now I'm going to do the Mount Dash. 62 00:04:31,700 --> 00:04:33,980 A mount? 63 00:04:36,360 --> 00:04:40,500 Then I'm going to grip by grip. 64 00:04:40,500 --> 00:04:43,560 Slash, slash, hit enter. 65 00:04:43,590 --> 00:04:46,650 This is the mount point for this device. 66 00:04:46,650 --> 00:04:47,400 Perfect. 67 00:04:48,000 --> 00:04:49,020 LZ, block. 68 00:04:49,140 --> 00:04:53,190 As you can see over here, this is the mount point for this device. 69 00:04:54,570 --> 00:05:02,190 The next step I need to modify the slash ATC slash exports. 70 00:05:04,030 --> 00:05:11,140 So in this file I need to give the exported file system read or write permissions in order to allow 71 00:05:11,140 --> 00:05:15,370 remote machines to make changes to the directory. 72 00:05:15,400 --> 00:05:22,510 The mount point that we did, the slash storage dash server shared on the file system. 73 00:05:22,660 --> 00:05:31,600 Then also I have to type the no underscore root underscore squash option in order to enable remote users 74 00:05:31,600 --> 00:05:33,610 to have the root privileges. 75 00:05:34,060 --> 00:05:37,030 So I'm going to modify and add. 76 00:05:37,840 --> 00:05:41,110 First, I'm going to add the Mount Point storage. 77 00:05:42,160 --> 00:05:43,660 Then dash. 78 00:05:44,970 --> 00:05:51,240 Server, then I'm going to type the star in between the brackets. 79 00:05:52,520 --> 00:05:55,760 I'm going to type the right. 80 00:05:56,690 --> 00:06:04,550 And read permissions, then comma, then no underscore root. 81 00:06:04,580 --> 00:06:13,400 This is the this is the option that I mentioned about that I need to enable remote users to have root 82 00:06:13,400 --> 00:06:15,710 privileges then squash. 83 00:06:18,980 --> 00:06:19,670 Perfect. 84 00:06:19,670 --> 00:06:25,490 So if I don't like to write the start, I can write the IP address if I would like. 85 00:06:25,490 --> 00:06:27,800 But in this case I'm just going to use the start. 86 00:06:27,800 --> 00:06:35,030 It means that any IP address that has the access point after we're going to configure the client to 87 00:06:35,030 --> 00:06:36,170 access this. 88 00:06:38,220 --> 00:06:42,750 Directory does the slash storage dash server. 89 00:06:42,780 --> 00:06:46,950 Now I'm going to save the file. 90 00:06:48,860 --> 00:06:50,480 And X force. 91 00:06:50,490 --> 00:06:51,350 Perfect. 92 00:06:52,160 --> 00:06:57,050 The next step, I'm going to run the command export FS. 93 00:07:02,450 --> 00:07:04,310 Export is perfect. 94 00:07:04,340 --> 00:07:07,870 Then I'm going to use the option dash r av. 95 00:07:07,970 --> 00:07:09,470 So the dash a. 96 00:07:11,820 --> 00:07:21,090 Let's start with the first is the re-export, all the directories, then the export, all the directories 97 00:07:21,090 --> 00:07:26,610 and here in order the V in order to show what's going on with the file. 98 00:07:26,610 --> 00:07:28,770 So I'm going to hit enter perfect. 99 00:07:28,770 --> 00:07:30,960 As we can see here, this is the exporting right now. 100 00:07:30,960 --> 00:07:34,380 We're going to do the exporting to this directory. 101 00:07:34,650 --> 00:07:41,370 Now, the next step, if I would like to display the current export list, I need to run the command 102 00:07:41,700 --> 00:07:49,890 export FS, then dash s hit enter, as we can see over here. 103 00:07:51,940 --> 00:07:54,340 This is the current export list. 104 00:07:55,080 --> 00:08:00,840 Now the next step there is an extra this is an extra step if I would like to do so. 105 00:08:00,840 --> 00:08:09,240 If I would like to show amount information for the NFS server, I can run the command show mount then 106 00:08:09,270 --> 00:08:15,480 dash E in order to show the NFS servers export list. 107 00:08:15,510 --> 00:08:16,260 Hit enter. 108 00:08:16,770 --> 00:08:18,630 Just wait for a few seconds. 109 00:08:26,390 --> 00:08:30,980 As we can see right here on the screen, this is the export list for the server. 110 00:08:32,260 --> 00:08:33,460 The last step. 111 00:08:34,360 --> 00:08:38,980 I need to add the NFS surface to the firewall. 112 00:08:39,980 --> 00:08:45,260 D in order to allow traffic to the necessary NFS surfaces. 113 00:08:45,260 --> 00:08:48,410 So I'm going to run the command fire wall. 114 00:08:48,410 --> 00:08:51,680 Dash cmd, then dash dash. 115 00:08:51,680 --> 00:08:52,550 Permanent. 116 00:08:52,940 --> 00:09:00,980 Then dash dash, add dash surface then nfs hit enter. 117 00:09:02,910 --> 00:09:03,320 Okay. 118 00:09:03,330 --> 00:09:03,950 Succeed. 119 00:09:03,960 --> 00:09:04,700 It's all good. 120 00:09:04,710 --> 00:09:07,320 Now we're going to run the command firewall. 121 00:09:07,650 --> 00:09:10,710 CMD, then Dash, dash, reload. 122 00:09:15,540 --> 00:09:17,670 If I would like to run the command. 123 00:09:17,700 --> 00:09:18,960 Dash, dash, dash. 124 00:09:18,960 --> 00:09:19,530 All. 125 00:09:20,850 --> 00:09:23,910 As you can see over here, we have the NFS. 126 00:09:24,150 --> 00:09:26,000 Also, there is another command here. 127 00:09:26,010 --> 00:09:28,140 The service hit enter. 128 00:09:28,170 --> 00:09:31,200 As you can see, this is we added the NFS. 129 00:09:32,260 --> 00:09:40,270 Surface to the firewall in order to allow traffic to the necessary NFS surfaces. 130 00:09:41,740 --> 00:09:46,740 I'm going to show the IP address right now for this machine. 131 00:09:46,750 --> 00:09:50,530 The server machine show in s 33. 132 00:09:50,560 --> 00:09:52,330 This is the IP address here. 133 00:09:53,960 --> 00:09:54,350 Perfect. 134 00:09:54,350 --> 00:09:55,550 And there's also another command. 135 00:09:55,550 --> 00:10:01,520 If I would like to use the F config then in FS 33 hit enter. 136 00:10:01,820 --> 00:10:04,010 This is the IP address also here. 137 00:10:05,090 --> 00:10:07,730 Now I'm going to move on to. 138 00:10:07,760 --> 00:10:09,290 To the client machine. 139 00:10:09,290 --> 00:10:13,040 I need to configure the NFS on the client machine. 140 00:10:13,530 --> 00:10:22,190 The first step I need to install the packages and install the NFS dash utils. 141 00:10:22,190 --> 00:10:22,820 Okay. 142 00:10:22,820 --> 00:10:23,810 Perfect. 143 00:10:32,180 --> 00:10:37,320 I already have the package installed on the client machine. 144 00:10:37,340 --> 00:10:47,300 Now the next step I need to check systemctl status NFS dash server. 145 00:10:47,570 --> 00:10:47,930 Okay. 146 00:10:47,960 --> 00:10:48,890 That's perfect. 147 00:10:49,190 --> 00:10:50,060 Hit enter. 148 00:10:50,300 --> 00:10:51,920 Now I need to. 149 00:10:53,010 --> 00:10:54,240 It's inactive, it's dead. 150 00:10:54,240 --> 00:10:55,470 So I need to enable it. 151 00:10:55,470 --> 00:10:57,630 System Ctl. 152 00:10:58,830 --> 00:11:00,410 Enable dash dash. 153 00:11:00,420 --> 00:11:01,550 Now then. 154 00:11:01,570 --> 00:11:06,330 NFS server dot service. 155 00:11:06,570 --> 00:11:06,780 Hit. 156 00:11:06,780 --> 00:11:07,380 Enter. 157 00:11:09,180 --> 00:11:09,600 Perfect. 158 00:11:09,600 --> 00:11:11,340 Let me check the status. 159 00:11:12,900 --> 00:11:13,830 Active. 160 00:11:13,860 --> 00:11:14,580 Good. 161 00:11:15,000 --> 00:11:16,200 Now the next step. 162 00:11:16,200 --> 00:11:22,890 I'm going to create a directory for the Mount Point Make directory. 163 00:11:22,890 --> 00:11:26,730 I'm going to call this one storage dash client. 164 00:11:27,240 --> 00:11:35,370 You can see the differences here is I this is the client and I already made or created a directory on 165 00:11:35,370 --> 00:11:43,500 the server side or the server machine slash storage dash server hit enter. 166 00:11:43,500 --> 00:11:44,370 Perfect. 167 00:11:44,970 --> 00:11:54,480 Now the next step, I'm going to do a permanent or persistent mount Point, so I'm going to go to the 168 00:11:54,480 --> 00:11:56,640 slash etsy slash fstab. 169 00:11:59,650 --> 00:12:00,310 If. 170 00:12:01,410 --> 00:12:02,280 Step. 171 00:12:02,760 --> 00:12:03,450 Enter. 172 00:12:05,290 --> 00:12:10,390 I'm going to create an ad, So as I said, here is the IP address. 173 00:12:10,780 --> 00:12:13,060 So I'm going to this is the mount device. 174 00:12:13,060 --> 00:12:14,950 So I'm going to start with the IP address. 175 00:12:14,950 --> 00:12:19,990 172 dot 16 .8.131. 176 00:12:20,440 --> 00:12:29,140 Then I have to add colon, then slash storage dash server. 177 00:12:30,580 --> 00:12:36,370 So the IP address calling, then the name of the mount point, the directory. 178 00:12:39,480 --> 00:12:45,960 Next I'm going to type the mountpoint on the client machine. 179 00:12:45,960 --> 00:12:46,950 So storage. 180 00:12:49,420 --> 00:12:52,450 Dash client next. 181 00:12:52,720 --> 00:12:56,830 Now is the filesystem type and NFS. 182 00:12:58,380 --> 00:13:06,930 So for this one, the client side, we have to type the filesystem type NFS, then defaults. 183 00:13:10,680 --> 00:13:11,750 Zero zero. 184 00:13:11,940 --> 00:13:12,660 Done. 185 00:13:13,650 --> 00:13:15,150 I'm going to save the file. 186 00:13:16,050 --> 00:13:19,830 Right now I'm going to do the Mount Dash A. 187 00:13:28,600 --> 00:13:38,500 Now I'm going to run the command mount, then the pipe grip, then slash storage dash server. 188 00:13:38,710 --> 00:13:41,020 As you can see over here, this is the mount. 189 00:13:41,840 --> 00:13:46,040 Device on the server machine. 190 00:13:46,370 --> 00:13:52,130 Now I'm going to do a CD slash storage dash client. 191 00:13:52,340 --> 00:14:02,150 LS Dash L We don't have any file or directory, so I'm going to create a text file. 192 00:14:02,150 --> 00:14:10,940 And also I'm going to create another text file and LS Dash L As we can see here, over here we have 193 00:14:10,940 --> 00:14:12,440 two text files. 194 00:14:12,800 --> 00:14:17,840 Now I'm going back to the server machine. 195 00:14:17,870 --> 00:14:30,800 CD slash storage dash server ls l As we can see over here, we have these two text files. 196 00:14:30,800 --> 00:14:37,700 I'm going to make a directory here, make directory d i r hit enter. 197 00:14:37,730 --> 00:14:40,930 LS dash l hit enter. 198 00:14:40,940 --> 00:14:42,210 Here is the directory. 199 00:14:42,240 --> 00:14:46,890 Now I'm going to move back to the client machine. 200 00:14:46,900 --> 00:14:54,720 LS l As you can see over here, we created the directory on the server machine and we can see it on 201 00:14:54,720 --> 00:14:56,760 the client machine. 202 00:14:59,440 --> 00:15:01,130 Thus concludes our session. 203 00:15:01,150 --> 00:15:03,670 Thank you and see you in the next lesson.