After formatting your partitions
and logical volumes with the file system,
you need to actually make it possible for the users
and the system to work with the file systems.
So in this demonstration,
we're going to walk through
how to make these file systems available by mounting them.
You can think of mounting as creating a doorway
into a new room.
Without the door,
the space in the room simply is unusable.
So let's go ahead and get started with mounting these.
Now, just in case you forgot
which logical volumes you created,
we can use lvscan.
And now we can see that we're going to be working with the
dev/backup/sysbk,
dev/backup/databk,
and dev/backup/logbk.
We're going to associate these logical volumes
to a directory that we're going to create now.
So, first thing we want to do is make the directory.
Use -p.
So this means that we're going to create
any necessary parent directories.
(indistinct) backup/sys,
do /backup/data, do /backup/log.
Okay.
Now we're just going to cd into that,
make sure that those were created.
All right.
So next we're going to actually just go ahead
and mount these files.
So, use the logical volume backup,
then do sysbk.
And sys.
Okay, we're going to do the same thing
two more times for the data,
and then once more for the log.
Important log directory,
going to make a lot of use of that one.
Okay, that was to verify that these were actually
mounted correctly.
So I'm just going to use the mount command.
Now, if you can see at the very bottom,
you see the association with the mapper.
Okay, we verified that the backup/sysbk is there.
It's associated with this correlating directory,
along with the data and logbk.
Now let's test out just unmounting one of the systems
really quick.
Going to do umount.
We going to do the backup, the log.
Okay, that went through successfully.
Yeah, let's verify this is gone.
Now we can see the logical volume
for the log backup system
is no longer associated with this correlating directory.
Now, the next thing we want to do is
ensure the logical volumes are mounted on boot.
So we have to manipulate the fstab configuration file.
So let's go ahead and do that now.
vim /etc/fstab.
Okay, we're going to use the insert
and we're going to input this information here,
the association.
/backup/sysbk.
Use the file system, xfs.
Going to keep these defaults here.
Okay, same thing,
ext4, default.
And logbk,
ext4 again.
Okay.
We're going to escape, get out of the insert mode.
Colon, right, quit, wq.
So next what we want to do
is test that we can mount these files with no errors.
Do sudo mount -a,
and without any errors that shows that
we can successfully do that.
So to clarify let's test the fstab file specifically
to ensure we can mount all of the volumes
that are listed in it.
Remember a misconfiguration of the fstab file
may prevent the system from booting.
We've done a quick walkthrough of
how to mount the logical volumes
to the directories that we created.
And I will see you in the next lesson.