1
00:00:00,000 --> 00:00:18,440
Hey guys and welcome back. Now to close off this skill I want to discuss with you two

2
00:00:18,440 --> 00:00:26,120
more concepts. The first one is related to SMART. Now SMART is an acronym and it stands

3
00:00:26,120 --> 00:00:33,480
for the self monitoring analysis and reporting technology. Now one thing to note here which

4
00:00:33,480 --> 00:00:39,799
is quite important is that this is not Linux specific so it's actually not related to the

5
00:00:39,799 --> 00:00:45,320
Linux operating system. Instead this would be technology integrated with your actual

6
00:00:45,320 --> 00:00:50,520
hard drive. The difference here what we're actually talking about is that on Linux we

7
00:00:50,520 --> 00:00:56,920
actually have some tools which we can use to access this information which is running on the

8
00:00:56,920 --> 00:01:02,280
hard drive itself. Now one thing which is a little bit limiting is that if you want to be able to

9
00:01:02,280 --> 00:01:09,800
access this information you have to be on a real hard drive. Now you may remember that what I'm

10
00:01:09,800 --> 00:01:15,560
using within this course here happens to be a virtual machine. So if you are doing the same at

11
00:01:15,560 --> 00:01:21,640
home and following along you are not going to be able to access these features but despite this

12
00:01:21,640 --> 00:01:27,960
the important thing we have to know is really what this technology does i.e. it allows you to

13
00:01:27,960 --> 00:01:34,840
actually monitor your hard drive in such a way that you can monitor for potential errors. That way

14
00:01:34,840 --> 00:01:41,000
you may be able to spot these issues early and take preventative measures to correct these issues

15
00:01:41,000 --> 00:01:48,359
before any major problems arise. Now in order to be able to access this smart information what we

16
00:01:48,359 --> 00:01:56,599
would have to do would be to enable what is called the smart d daemon. So smart d. Now once

17
00:01:56,599 --> 00:02:05,159
this daemon is actually up and running we will have access to a command called smart ctl. Okay so on

18
00:02:05,159 --> 00:02:12,120
the hard drive itself we will have smart technology on our linux operating system. We can start a

19
00:02:12,120 --> 00:02:19,159
particular daemon called smart dot d which will give us access to the smart ctl command which we

20
00:02:19,159 --> 00:02:25,000
can use to interrogate that information. So that really is the architecture we're talking about now.

21
00:02:25,000 --> 00:02:33,240
Smart itself is not linux specific but these tools i.e. this daemon and this command will allow us

22
00:02:33,240 --> 00:02:39,719
via linux to access this information and make use of this information. So if i say sudo apt install

23
00:02:39,719 --> 00:02:46,200
smart mon tools this will begin installing smart mon tools which will allow us to start this daemon

24
00:02:46,200 --> 00:02:52,920
and ultimately use the smart ctl command. So now i can say man smart ctl we can see here this is

25
00:02:52,920 --> 00:02:59,800
going to allow us to control and monitor our smart disk. Now like i say i happen to be on a linux

26
00:02:59,800 --> 00:03:05,240
virtual machine i.e. i don't have access to a real hard disk but if i did the way i could

27
00:03:05,240 --> 00:03:11,960
actually utilize this tool is just by simply saying smart ctl and i can say dash h if i want to generate

28
00:03:11,960 --> 00:03:18,600
a health report and i can specify a particular disk i want to target maybe say sda. So if i

29
00:03:18,600 --> 00:03:25,080
enter with sudo privileges notice we're going to see here that in my case unfortunately it's going to

30
00:03:25,080 --> 00:03:31,000
tell me that the device lacks smart capability this is because like i say i'm on a windows machine

31
00:03:31,000 --> 00:03:37,240
using virtual box technology but if you run this command in your own home if you happen to have a

32
00:03:37,240 --> 00:03:43,560
real linux computer you should be able to generate a smart ctl health report which can give you really

33
00:03:43,560 --> 00:03:50,200
vital information relating to potential errors with your hard disk itself. Now the other topic i want

34
00:03:50,199 --> 00:03:57,560
to talk to you about is one called auto fs. Now this command here is very very useful indeed so

35
00:03:57,560 --> 00:04:04,359
you will recall that when we want to statically mount a particular file system so that it automatically

36
00:04:04,359 --> 00:04:10,439
mounts when we reboot our system or our system boots up we would do such a thing by specifying

37
00:04:10,439 --> 00:04:18,599
this information within our safs tab file. Now here is the deal here when we happen to specify

38
00:04:18,600 --> 00:04:24,520
that a system should be mounted within fs tab what did i just say there this means that when the

39
00:04:24,520 --> 00:04:32,920
system is booted those specified within fs tab will be mounted so every time we boot the system

40
00:04:32,920 --> 00:04:39,640
the mounting process happens. Now let's say we wanted to be maybe a little bit more efficient

41
00:04:39,640 --> 00:04:46,200
in that we didn't want our file systems to always boot or always mount should i say when the system

42
00:04:46,199 --> 00:04:53,639
boots what if we just wanted them to mount automatically on the fly only when needed. Now

43
00:04:53,639 --> 00:05:00,199
this really is a candidate for when you want to use this tool called auto fs. Now if we want to be

44
00:05:00,199 --> 00:05:07,319
able to use auto fs there are some configuration files that we have to understand to facilitate

45
00:05:07,319 --> 00:05:14,360
this behavior such that our file systems will only be mounted when needed. Let's actually look what

46
00:05:14,360 --> 00:05:19,639
those configuration files are now the first thing i will say is that we would have to actually install

47
00:05:19,639 --> 00:05:29,080
auto fs so i'll say sudo apt install auto fs and hit enter and if i hit y for yes hit enter this will

48
00:05:29,080 --> 00:05:34,199
begin the installation and we can see here we are creating some configuration files we'll talk about

49
00:05:34,199 --> 00:05:40,840
these very very shortly these ones right here okay now so within the etsy directory we will now have

50
00:05:40,839 --> 00:05:47,159
after our installation these configuration files so if i do an ls we have a ton so what i will say

51
00:05:47,159 --> 00:05:55,079
here is auto and wildcard so now we can see here these files relating to auto fs first one is this

52
00:05:55,079 --> 00:06:00,679
one here called auto master this is the first configuration file we want to configure and

53
00:06:00,679 --> 00:06:08,439
this will be our main configuration file so what i will do is i'll say sudo nano etsy auto dot master

54
00:06:08,439 --> 00:06:15,000
if i hit enter we can see here this is a sample auto master file and if i scroll on down what i'm

55
00:06:15,000 --> 00:06:21,319
going to do is add in some information now the first piece of information i'm going to add here

56
00:06:21,319 --> 00:06:28,680
is going to be the base directory where we want to create these auto fs entries what i'm saying

57
00:06:28,680 --> 00:06:34,360
here is i'm going to create a directory called nfs okay and now what i'm going to do is to specify

58
00:06:34,360 --> 00:06:39,879
the configuration file which i'm going to read in here so i'm going to say within the etsy directory

59
00:06:39,879 --> 00:06:48,199
look in auto dot nfs now right now this configuration file does not actually exist we're going to

60
00:06:48,199 --> 00:06:54,680
create this configuration file okay so i'll save this right here okay so notice here auto dot nfs

61
00:06:54,680 --> 00:07:00,360
does not exist what i will do is i'll just create this file so it is now created in fact let me just

62
00:07:00,439 --> 00:07:06,680
use super user privileges of course so now if i check my command auto nfs is now present but it

63
00:07:06,680 --> 00:07:13,560
will be an empty file now let me go in and edit this file i've just created so i'll go in and say

64
00:07:13,560 --> 00:07:21,400
sudo nano auto dot nfs and hit enter like i say blank file right here now within this file right

65
00:07:21,400 --> 00:07:28,199
here what i'm going to do is i'm going to specify my mount point so if i just happen to give the value

66
00:07:28,199 --> 00:07:34,439
let's say videos this is going to be the mount point now what i'm going to do is to specify what

67
00:07:34,439 --> 00:07:41,000
device do i actually want to mount so this could be a particular disk or a very good candidate for

68
00:07:41,000 --> 00:07:49,000
this type of technology would be if i wanted to mount information from a remote server on my network

69
00:07:49,000 --> 00:07:54,199
that was actually sharing information so let's imagine there was some type of server on the network

70
00:07:54,199 --> 00:08:01,479
let's maybe say the ip address was 192 168 i don't know 1.1 maybe and then i will do a colon

71
00:08:01,479 --> 00:08:07,959
and let's say maybe on that server there was a folder let's just say it was called shared stuff

72
00:08:07,959 --> 00:08:14,680
and within this directory there was a dedicated folder for videos what i'm actually saying here

73
00:08:14,680 --> 00:08:21,800
is that if i happen to go into my own local system and i go into the nfs folder and then go into a

74
00:08:21,800 --> 00:08:29,960
folder called videos when i access this location the information on this server here i.e the shared

75
00:08:29,960 --> 00:08:36,680
stuff videos folder on this server that is going to be automatically mounted by autofs meaning

76
00:08:36,680 --> 00:08:42,919
that it's going to be transparently available to me just the way we've seen before in the previous

77
00:08:42,919 --> 00:08:50,360
scale i just cd into this particular directory on my file system and like magic almost the information

78
00:08:50,360 --> 00:08:56,120
on this server is just going to appear and be mounted on my local file system now if i just

79
00:08:56,120 --> 00:09:01,879
happen to save this right here and escape out this would not immediately take effect what i would have

80
00:09:01,879 --> 00:09:08,759
to do would be to restart my autofs service so i could restart this right now and now the information

81
00:09:08,759 --> 00:09:15,960
would take effect now you might be wondering that when i said i would have to browse to nfs videos

82
00:09:15,960 --> 00:09:21,720
how and air did i get this i.e why is this folder called nfs well this is because this is what i

83
00:09:21,720 --> 00:09:28,200
specified in that main configuration file if you happen to remember we go back and we go back into

84
00:09:28,200 --> 00:09:34,759
auto.master so once i go in here this is the name of the folder i have defined here and i'm linking

85
00:09:34,759 --> 00:09:40,920
it to this configuration file i just created and within this configuration file i have specified

86
00:09:40,920 --> 00:09:45,800
a folder called videos so really what we're doing is we're combining the two we're combining this

87
00:09:45,959 --> 00:09:52,439
base folder here nfs and then what is defined within here which we saw at the very left hand side

88
00:09:52,439 --> 00:09:59,000
would be videos and we bind it to in our case that particular remote server so like i say all we do

89
00:09:59,000 --> 00:10:08,359
is is just say cd nfs and again go back in cd nfs cd videos and the folders here within this

90
00:10:08,360 --> 00:10:15,800
particular server automatically are now available on the fly and once this happens this mount will

91
00:10:15,800 --> 00:10:22,919
now be activated but here is the thing if we happen to not use our particular mount points which is

92
00:10:22,919 --> 00:10:29,960
nfs videos after a certain amount of time has elapsed something like say 75 seconds of not

93
00:10:29,960 --> 00:10:37,080
being used automatically this is going to be unmounted once again but if we happen to once again

94
00:10:37,639 --> 00:10:44,360
go back into our nfs directory and then into our videos directory automatically once again

95
00:10:44,360 --> 00:10:51,480
this particular folder on this particular server is going to be mounted and available to us over

96
00:10:51,480 --> 00:10:57,480
our network so as we can see here the auto fs command is really really cool it is very very

97
00:10:57,480 --> 00:11:02,360
efficient you don't have to use it with remote network shares like i say you can use it with

98
00:11:02,360 --> 00:11:08,440
different disks whatever it may be but this happens to be a very very good use case for using

99
00:11:08,440 --> 00:11:15,320
auto fs ok dope so that is us for understanding smart technology as well as auto fs i hope this

100
00:11:15,320 --> 00:11:18,600
has been informative for you i'd like to thank you for viewing

