1
00:00:00,180 --> 00:00:01,560
After formatting your partitions

2
00:00:01,560 --> 00:00:03,870
and logical volumes with the file system,

3
00:00:03,870 --> 00:00:06,060
you need to actually make it possible for the users

4
00:00:06,060 --> 00:00:08,520
and the system to work with the file systems.

5
00:00:08,520 --> 00:00:09,353
So in this demonstration,

6
00:00:09,353 --> 00:00:10,650
we're going to walk through

7
00:00:10,650 --> 00:00:14,370
how to make these file systems available by mounting them.

8
00:00:14,370 --> 00:00:16,350
You can think of mounting as creating a doorway

9
00:00:16,350 --> 00:00:17,610
into a new room.

10
00:00:17,610 --> 00:00:18,480
Without the door,

11
00:00:18,480 --> 00:00:21,210
the space in the room simply is unusable.

12
00:00:21,210 --> 00:00:23,130
So let's go ahead and get started with mounting these.

13
00:00:23,130 --> 00:00:24,420
Now, just in case you forgot

14
00:00:24,420 --> 00:00:26,160
which logical volumes you created,

15
00:00:26,160 --> 00:00:27,513
we can use lvscan.

16
00:00:29,640 --> 00:00:32,310
And now we can see that we're going to be working with the

17
00:00:32,310 --> 00:00:33,690
dev/backup/sysbk,

18
00:00:33,690 --> 00:00:35,520
dev/backup/databk,

19
00:00:35,520 --> 00:00:36,960
and dev/backup/logbk.

20
00:00:36,960 --> 00:00:39,120
We're going to associate these logical volumes

21
00:00:39,120 --> 00:00:41,730
to a directory that we're going to create now.

22
00:00:41,730 --> 00:00:44,153
So, first thing we want to do is make the directory.

23
00:00:46,860 --> 00:00:47,693
Use -p.

24
00:00:47,693 --> 00:00:49,680
So this means that we're going to create

25
00:00:49,680 --> 00:00:52,473
any necessary parent directories.

26
00:00:55,136 --> 00:00:56,703
(indistinct) backup/sys,

27
00:00:58,500 --> 00:01:02,943
do /backup/data, do /backup/log.

28
00:01:07,200 --> 00:01:08,580
Okay.

29
00:01:08,580 --> 00:01:12,243
Now we're just going to cd into that,

30
00:01:13,110 --> 00:01:15,120
make sure that those were created.

31
00:01:15,120 --> 00:01:16,350
All right.

32
00:01:16,350 --> 00:01:17,760
So next we're going to actually just go ahead

33
00:01:17,760 --> 00:01:18,933
and mount these files.

34
00:01:20,550 --> 00:01:23,463
So, use the logical volume backup,

35
00:01:26,977 --> 00:01:28,144
then do sysbk.

36
00:01:34,685 --> 00:01:35,518
And sys.

37
00:01:36,701 --> 00:01:37,534
Okay, we're going to do the same thing

38
00:01:37,534 --> 00:01:40,233
two more times for the data,

39
00:01:48,540 --> 00:01:51,753
and then once more for the log.

40
00:01:53,040 --> 00:01:55,410
Important log directory,

41
00:01:55,410 --> 00:01:57,210
going to make a lot of use of that one.

42
00:01:58,890 --> 00:02:03,240
Okay, that was to verify that these were actually

43
00:02:03,240 --> 00:02:04,500
mounted correctly.

44
00:02:04,500 --> 00:02:06,173
So I'm just going to use the mount command.

45
00:02:09,829 --> 00:02:11,550
Now, if you can see at the very bottom,

46
00:02:11,550 --> 00:02:13,563
you see the association with the mapper.

47
00:02:16,530 --> 00:02:19,290
Okay, we verified that the backup/sysbk is there.

48
00:02:19,290 --> 00:02:22,490
It's associated with this correlating directory,

49
00:02:22,490 --> 00:02:25,110
along with the data and logbk.

50
00:02:25,110 --> 00:02:28,440
Now let's test out just unmounting one of the systems

51
00:02:28,440 --> 00:02:29,520
really quick.

52
00:02:29,520 --> 00:02:30,777
Going to do umount.

53
00:02:32,339 --> 00:02:35,107
We going to do the backup, the log.

54
00:02:36,270 --> 00:02:38,120
Okay, that went through successfully.

55
00:02:39,150 --> 00:02:40,750
Yeah, let's verify this is gone.

56
00:02:41,880 --> 00:02:43,170
Now we can see the logical volume

57
00:02:43,170 --> 00:02:44,730
for the log backup system

58
00:02:44,730 --> 00:02:47,430
is no longer associated with this correlating directory.

59
00:02:47,430 --> 00:02:48,510
Now, the next thing we want to do is

60
00:02:48,510 --> 00:02:51,240
ensure the logical volumes are mounted on boot.

61
00:02:51,240 --> 00:02:54,600
So we have to manipulate the fstab configuration file.

62
00:02:54,600 --> 00:02:56,183
So let's go ahead and do that now.

63
00:02:59,129 --> 00:03:01,593
vim /etc/fstab.

64
00:03:03,720 --> 00:03:05,320
Okay, we're going to use the insert

65
00:03:06,450 --> 00:03:08,040
and we're going to input this information here,

66
00:03:08,040 --> 00:03:09,153
the association.

67
00:03:11,275 --> 00:03:13,533
/backup/sysbk.

68
00:03:19,530 --> 00:03:21,453
Use the file system, xfs.

69
00:03:22,440 --> 00:03:23,990
Going to keep these defaults here.

70
00:03:26,490 --> 00:03:27,603
Okay, same thing,

71
00:03:37,800 --> 00:03:40,713
ext4, default.

72
00:03:48,480 --> 00:03:49,313
And logbk,

73
00:03:55,983 --> 00:03:57,063
ext4 again.

74
00:04:04,020 --> 00:04:04,853
Okay.

75
00:04:06,196 --> 00:04:09,120
We're going to escape, get out of the insert mode.

76
00:04:09,120 --> 00:04:12,900
Colon, right, quit, wq.

77
00:04:12,900 --> 00:04:13,830
So next what we want to do

78
00:04:13,830 --> 00:04:18,003
is test that we can mount these files with no errors.

79
00:04:19,500 --> 00:04:22,503
Do sudo mount -a,

80
00:04:24,780 --> 00:04:27,540
and without any errors that shows that

81
00:04:27,540 --> 00:04:29,010
we can successfully do that.

82
00:04:29,010 --> 00:04:32,550
So to clarify let's test the fstab file specifically

83
00:04:32,550 --> 00:04:34,620
to ensure we can mount all of the volumes

84
00:04:34,620 --> 00:04:36,150
that are listed in it.

85
00:04:36,150 --> 00:04:38,550
Remember a misconfiguration of the fstab file

86
00:04:38,550 --> 00:04:40,650
may prevent the system from booting.

87
00:04:40,650 --> 00:04:41,970
We've done a quick walkthrough of

88
00:04:41,970 --> 00:04:44,280
how to mount the logical volumes

89
00:04:44,280 --> 00:04:46,320
to the directories that we created.

90
00:04:46,320 --> 00:04:48,303
And I will see you in the next lesson.

