Hey guys and welcome back. Now to close off this skill I want to discuss with you two
more concepts. The first one is related to SMART. Now SMART is an acronym and it stands
for the self monitoring analysis and reporting technology. Now one thing to note here which
is quite important is that this is not Linux specific so it's actually not related to the
Linux operating system. Instead this would be technology integrated with your actual
hard drive. The difference here what we're actually talking about is that on Linux we
actually have some tools which we can use to access this information which is running on the
hard drive itself. Now one thing which is a little bit limiting is that if you want to be able to
access this information you have to be on a real hard drive. Now you may remember that what I'm
using within this course here happens to be a virtual machine. So if you are doing the same at
home and following along you are not going to be able to access these features but despite this
the important thing we have to know is really what this technology does i.e. it allows you to
actually monitor your hard drive in such a way that you can monitor for potential errors. That way
you may be able to spot these issues early and take preventative measures to correct these issues
before any major problems arise. Now in order to be able to access this smart information what we
would have to do would be to enable what is called the smart d daemon. So smart d. Now once
this daemon is actually up and running we will have access to a command called smart ctl. Okay so on
the hard drive itself we will have smart technology on our linux operating system. We can start a
particular daemon called smart dot d which will give us access to the smart ctl command which we
can use to interrogate that information. So that really is the architecture we're talking about now.
Smart itself is not linux specific but these tools i.e. this daemon and this command will allow us
via linux to access this information and make use of this information. So if i say sudo apt install
smart mon tools this will begin installing smart mon tools which will allow us to start this daemon
and ultimately use the smart ctl command. So now i can say man smart ctl we can see here this is
going to allow us to control and monitor our smart disk. Now like i say i happen to be on a linux
virtual machine i.e. i don't have access to a real hard disk but if i did the way i could
actually utilize this tool is just by simply saying smart ctl and i can say dash h if i want to generate
a health report and i can specify a particular disk i want to target maybe say sda. So if i
enter with sudo privileges notice we're going to see here that in my case unfortunately it's going to
tell me that the device lacks smart capability this is because like i say i'm on a windows machine
using virtual box technology but if you run this command in your own home if you happen to have a
real linux computer you should be able to generate a smart ctl health report which can give you really
vital information relating to potential errors with your hard disk itself. Now the other topic i want
to talk to you about is one called auto fs. Now this command here is very very useful indeed so
you will recall that when we want to statically mount a particular file system so that it automatically
mounts when we reboot our system or our system boots up we would do such a thing by specifying
this information within our safs tab file. Now here is the deal here when we happen to specify
that a system should be mounted within fs tab what did i just say there this means that when the
system is booted those specified within fs tab will be mounted so every time we boot the system
the mounting process happens. Now let's say we wanted to be maybe a little bit more efficient
in that we didn't want our file systems to always boot or always mount should i say when the system
boots what if we just wanted them to mount automatically on the fly only when needed. Now
this really is a candidate for when you want to use this tool called auto fs. Now if we want to be
able to use auto fs there are some configuration files that we have to understand to facilitate
this behavior such that our file systems will only be mounted when needed. Let's actually look what
those configuration files are now the first thing i will say is that we would have to actually install
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
begin the installation and we can see here we are creating some configuration files we'll talk about
these very very shortly these ones right here okay now so within the etsy directory we will now have
after our installation these configuration files so if i do an ls we have a ton so what i will say
here is auto and wildcard so now we can see here these files relating to auto fs first one is this
one here called auto master this is the first configuration file we want to configure and
this will be our main configuration file so what i will do is i'll say sudo nano etsy auto dot master
if i hit enter we can see here this is a sample auto master file and if i scroll on down what i'm
going to do is add in some information now the first piece of information i'm going to add here
is going to be the base directory where we want to create these auto fs entries what i'm saying
here is i'm going to create a directory called nfs okay and now what i'm going to do is to specify
the configuration file which i'm going to read in here so i'm going to say within the etsy directory
look in auto dot nfs now right now this configuration file does not actually exist we're going to
create this configuration file okay so i'll save this right here okay so notice here auto dot nfs
does not exist what i will do is i'll just create this file so it is now created in fact let me just
use super user privileges of course so now if i check my command auto nfs is now present but it
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
sudo nano auto dot nfs and hit enter like i say blank file right here now within this file right
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
let's say videos this is going to be the mount point now what i'm going to do is to specify what
device do i actually want to mount so this could be a particular disk or a very good candidate for
this type of technology would be if i wanted to mount information from a remote server on my network
that was actually sharing information so let's imagine there was some type of server on the network
let's maybe say the ip address was 192 168 i don't know 1.1 maybe and then i will do a colon
and let's say maybe on that server there was a folder let's just say it was called shared stuff
and within this directory there was a dedicated folder for videos what i'm actually saying here
is that if i happen to go into my own local system and i go into the nfs folder and then go into a
folder called videos when i access this location the information on this server here i.e the shared
stuff videos folder on this server that is going to be automatically mounted by autofs meaning
that it's going to be transparently available to me just the way we've seen before in the previous
scale i just cd into this particular directory on my file system and like magic almost the information
on this server is just going to appear and be mounted on my local file system now if i just
happen to save this right here and escape out this would not immediately take effect what i would have
to do would be to restart my autofs service so i could restart this right now and now the information
would take effect now you might be wondering that when i said i would have to browse to nfs videos
how and air did i get this i.e why is this folder called nfs well this is because this is what i
specified in that main configuration file if you happen to remember we go back and we go back into
auto.master so once i go in here this is the name of the folder i have defined here and i'm linking
it to this configuration file i just created and within this configuration file i have specified
a folder called videos so really what we're doing is we're combining the two we're combining this
base folder here nfs and then what is defined within here which we saw at the very left hand side
would be videos and we bind it to in our case that particular remote server so like i say all we do
is is just say cd nfs and again go back in cd nfs cd videos and the folders here within this
particular server automatically are now available on the fly and once this happens this mount will
now be activated but here is the thing if we happen to not use our particular mount points which is
nfs videos after a certain amount of time has elapsed something like say 75 seconds of not
being used automatically this is going to be unmounted once again but if we happen to once again
go back into our nfs directory and then into our videos directory automatically once again
this particular folder on this particular server is going to be mounted and available to us over
our network so as we can see here the auto fs command is really really cool it is very very
efficient you don't have to use it with remote network shares like i say you can use it with
different disks whatever it may be but this happens to be a very very good use case for using
auto fs ok dope so that is us for understanding smart technology as well as auto fs i hope this
has been informative for you i'd like to thank you for viewing