Hey everyone and welcome back.
So now what we're doing is we are back on our client machine.
Now what I've actually done here is I have rebooted that machine.
So if I happen to issue a DF-H, you will notice that we have no longer mounted the
network file share that we are getting from the NFS server.
Now think about this, what if we wanted to boot up our machine and have immediate access
to that particular share?
Well the reality lies in being able to configure persistence.
Now if I had to pop quiz you and ask you what file do you think we should modify to invoke
some type of persistent mounting of a file system?
Well hopefully you will remember that we have a configuration file called FSTab within the
Etsy directory.
That is absolutely where we are going to make this configuration so that we can have such
a persistent connection.
So before I do anything like I say I will show you my mount directory.
We still have the my share directory we created where we were actually mounting our network
file system.
But if I do an LS notice that those particular files that we created, file 1 and file 2 are
not accessible, that is because we have not got the mount in action.
Now again of course we do realise we can just manually mount the file system with the mount
command as we did before and I could help if I could spell mount correctly.
There we go.
And obviously that can be a little bit inefficient if we want to be using this very very regularly.
So what we will do here is we will go in and do sudo nano.
I am going to Etsy and then I will go into FSTab.
So let me type in the password here.
Cool so let me actually just full screen this so it looks a little bit neater.
There we go.
So what I am going to do here is I am going to follow the same format.
What I will do is I will give the IP address of the server that I am trying to reach to
remember that will be the NFS server which has the IP address 192.1680.44.
Let me just confirm that.
Let's do an IP adder.
Yep we can see right here 192.1680.44 that is correct.
So back onto the client right here and then we will do a colon then a forward slash and
then the name of the share.
Now the share we created was simply called my share.
And now what I want to do is I want to specify where it is I am going to mount this.
I am going to mount it in the MNT directory on my system within the directory I created
called my share.
And then I want to specify the file system type which will be NFS.
And now I can specify the different options that I want to invoke here.
Now I am just going to use the defaults and then I will have my values 0 and 0.
If you do recall these values relate to things such as FISC.
We don't need to worry about that so much right now.
Within these defaults here we can actually specify different options if we so wish.
We can specify something called say for example a soft mount meaning that if the server isn't
actually reachable for whatever reason that may be soft mount will stop attempting to mount
that network file system.
Whereas if we specify a hard mount even if the server is not reachable hard mount is
going to specify that we keep trying and trying and trying until we have reached a
certain given timeout.
A timeout by the way that we can control and specify.
But for now we are not going to worry too much about those particular configurations.
Understand they do exist be aware of them.
But for now we will just leave the defaults.
So now what we have here is we have specified the server plus its share name.
We specify whereabouts we want to mount it.
The file system with some default values.
But if I happen to just save this right now and I escape out again I do a DFH nothing
has actually changed quite just yet.
What I can do though is I can run the mount-a command or I could reboot my system either
or as fine so I will just use mount a.
That is going to pull in the configurations that we get from fstab.
If I try running this command once again notice now that we have indeed actually got access
to that share mounted over the network and if I go into my mount directory and into my
share we do an ls suddenly those files are once again accessible.
And if I happen to just reboot my system do a telnet 6 for a reboot give it a little minutes
so we will go and open up a terminal.
What I will do is immediately do a DF-H and we can see here indeed the share has been
automatically mounted and we do have persistence if I go in to my MNT directory and into my
share clearly we have access to our files from our file system across the network via the
NFS server.
So that's how we can configure our clients to have persistent mounting and access to
those shares over the network I hope this has been informative for you and I would like
to thank you for viewing.