WEBVTT

1
00:00.000 --> 00:04.560
So friends, the very first concept that I want to talk to you about is the file

2
00:04.560 --> 00:05.280
systems on

3
00:05.280 --> 00:06.280
our system.

4
00:06.280 --> 00:10.450
So the first thing that I want to highlight about a file system is what exactly

5
00:10.450 --> 00:10.840
is its

6
00:10.840 --> 00:11.840
purpose?

7
00:11.840 --> 00:14.160
Why do we even have to have them in the first place?

8
00:14.160 --> 00:19.170
So the main purpose of our file system is so that we have a way to manage our

9
00:19.170 --> 00:19.960
data on

10
00:19.960 --> 00:21.120
our disks.

11
00:21.120 --> 00:25.470
Quite simply, when we actually have a file system, it gives us a type of

12
00:25.470 --> 00:26.360
hierarchy to

13
00:26.360 --> 00:27.360
work with.

14
00:27.360 --> 00:31.740
So if you could imagine that you had a disk with no file system on it, I know
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

14
00:27.360 --> 00:31.740
So if you could imagine that you had a disk with no file system on it, I know

15
00:31.740 --> 00:32.080
that would

16
00:32.080 --> 00:36.560
be hard to believe, but just imagine it for a moment, just think how much of a

17
00:36.560 --> 00:37.160
headache

18
00:37.160 --> 00:41.100
it would be to try to find your information, say you wanted to have your data

19
00:41.100 --> 00:41.680
with any

20
00:41.680 --> 00:46.570
particular folder, maybe you have a music folder full of mp3s, well imagine you

21
00:46.570 --> 00:47.140
couldn't

22
00:47.140 --> 00:50.640
organize that data, imagine all the data was just scattered absolutely

23
00:50.640 --> 00:52.040
everywhere, clearly

24
00:52.040 --> 00:55.040
we don't want that so we use file systems.

25
00:55.040 --> 00:58.640
So that is the type of hierarchy and organization that we really want.

26
00:58.640 --> 01:02.220
Now in a previous scale we were able to take a disk and what we could do would
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

26
00:58.640 --> 01:02.220
Now in a previous scale we were able to take a disk and what we could do would

27
01:02.220 --> 01:03.000
be to partition

28
01:03.000 --> 01:06.040
that particular disk and effectively carve it up.

29
01:06.040 --> 01:10.090
We could have a partition one here and maybe a partition two here and then

30
01:10.090 --> 01:11.560
partition three,

31
01:11.560 --> 01:14.400
partition four and partition five, however many we would like to see.

32
01:14.400 --> 01:18.350
Now we were able to do this with Ansible which is very, very handy when we want

33
01:18.350 --> 01:18.880
to create

34
01:18.880 --> 01:23.550
partitions on multiple different devices, but what we didn't do was actually

35
01:23.550 --> 01:24.080
put any

36
01:24.080 --> 01:28.190
data onto these partitions and access that data because here is the thing when

37
01:28.190 --> 01:28.800
we happen

38
01:28.800 --> 01:34.330
to create data on a particular disk, we need to ensure that that partition has
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

38
01:28.800 --> 01:34.330
to create data on a particular disk, we need to ensure that that partition has

39
01:34.330 --> 01:35.040
indeed been

40
01:35.040 --> 01:39.970
formatted with a file system and once you have the file system formatted, we

41
01:39.970 --> 01:40.600
can then

42
01:40.600 --> 01:44.400
mount that file system and then access the data on it.

43
01:44.400 --> 01:47.700
Now we'll talk about mounting it a little bit more later on within this scale,

44
01:47.700 --> 01:48.040
but for

45
01:48.040 --> 01:52.680
now let's focus on this concept of formatting the disk using file systems.

46
01:52.680 --> 01:56.370
Now just to be clear here we actually have different file systems available to

47
01:56.370 --> 01:56.720
us and

48
01:56.720 --> 01:59.320
we briefly talked about this in a previous scale.

49
01:59.320 --> 02:01.880
Let's look at it though, any tiny bit more detail.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

49
01:59.320 --> 02:01.880
Let's look at it though, any tiny bit more detail.

50
02:01.880 --> 02:05.780
So within Linux a very common file system that you're going to see is one known

51
02:05.780 --> 02:06.000
as

52
02:06.000 --> 02:09.840
the extended file system and this has different versions.

53
02:09.840 --> 02:13.120
The original version is one known as EXT2.

54
02:13.120 --> 02:18.140
Now EXT2 is super ancient, it is very outdated and you really shouldn't be

55
02:18.140 --> 02:18.960
using this particular

56
02:18.960 --> 02:23.260
file system in my opinion, one thing you may notice though is that some of the

57
02:23.260 --> 02:23.760
tools that

58
02:23.760 --> 02:29.480
you use for bizarre reasons sometimes default to this particular file system.

59
02:29.480 --> 02:32.710
So whilst as the original it does have a big problem and that it doesn't
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

59
02:29.480 --> 02:32.710
So whilst as the original it does have a big problem and that it doesn't

60
02:32.710 --> 02:33.960
actually support

61
02:33.960 --> 02:36.800
a feature known as journaling.

62
02:36.800 --> 02:40.900
Now all journaling means is that changes on the disk are logged into a journal

63
02:40.900 --> 02:40.960
and

64
02:40.960 --> 02:45.280
pretty much this is going to be really helpful for you when you want to prevent

65
02:45.280 --> 02:46.080
data loss,

66
02:46.080 --> 02:49.610
say for example the computer crashes when you are performing a particular

67
02:49.610 --> 02:50.160
action, the

68
02:50.160 --> 02:54.000
actual changes you were making can actually be written into the journal in

69
02:54.000 --> 02:54.600
which case

70
02:54.600 --> 02:57.360
you do have a way to retrieve that particular data.

71
02:57.360 --> 03:02.000
Now like I say with EXT2 this is a feature that is not available.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

71
02:57.360 --> 03:02.000
Now like I say with EXT2 this is a feature that is not available.

72
03:02.000 --> 03:05.840
So really, kind of want to avoid that particular file system.

73
03:05.840 --> 03:10.320
Now the good thing is is that the EXT file system did come with newer

74
03:10.320 --> 03:11.480
iterations.

75
03:11.480 --> 03:16.130
So the one after that no surprises there was EXT3, this is very very similar

76
03:16.130 --> 03:16.880
but it did

77
03:16.880 --> 03:21.880
provide some higher performance benefits and very crucially it did have support

78
03:21.880 --> 03:23.160
for journaling.

79
03:23.160 --> 03:27.820
But as you can expect as technology developed these older solutions gradually

80
03:27.820 --> 03:28.880
became outdated

81
03:28.880 --> 03:32.800
and then we eventually saw the creation of EXT4.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

81
03:28.880 --> 03:32.800
and then we eventually saw the creation of EXT4.

82
03:32.800 --> 03:36.460
Now EXT4 is very very common, you are going to see this on many modern

83
03:36.460 --> 03:37.440
distributions,

84
03:37.440 --> 03:40.800
say for example if you happen to have an Ubuntu system that you are managing,

85
03:40.800 --> 03:41.200
very likely

86
03:41.200 --> 03:44.440
that is going to be formatted with the EXT4 file system.

87
03:44.440 --> 03:48.180
This is very similar to EXT3 and the fact that it does give us access to

88
03:48.180 --> 03:49.440
journaling once again

89
03:49.440 --> 03:55.120
which is very important and it does have support for even larger partitions.

90
03:55.120 --> 03:59.290
So these are all potential options that you can use but in the case of Red Hat

91
03:59.290 --> 04:00.440
based systems
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

91
03:59.290 --> 04:00.440
based systems

92
04:00.440 --> 04:03.920
typically you are going to see the XFS file system.

93
04:03.920 --> 04:08.100
Now XFS was actually designed for larger partitions, it was basically trying to

94
04:08.100 --> 04:09.520
overcome the shortcomings

95
04:09.520 --> 04:13.920
of things like EXT2 and EXT3 but really this was a file system designed for

96
04:13.920 --> 04:15.160
performance.

97
04:15.160 --> 04:19.240
And like I say if you happen to be using Red Hat Enterprise Linux or say for

98
04:19.240 --> 04:20.240
example something

99
04:20.240 --> 04:24.900
like Rocky Linux or maybe CentOS this is the file system that you are very

100
04:24.900 --> 04:25.840
commonly going

101
04:25.840 --> 04:26.840
to see.

102
04:26.840 --> 04:30.300
Now the utility that we can use in order to create a file system is something
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

102
04:26.840 --> 04:30.300
Now the utility that we can use in order to create a file system is something

103
04:30.300 --> 04:30.880
known as

104
04:30.880 --> 04:32.800
MKFS.

105
04:32.800 --> 04:37.210
As per the convention in Linux this is actually quite handy MK is for make and

106
04:37.210 --> 04:38.040
FS is for file

107
04:38.040 --> 04:40.240
system really really easy to remember.

108
04:40.240 --> 04:44.700
So if I happen to go to my directory here the S-band directory and do an LS we

109
04:44.700 --> 04:45.000
can see we

110
04:45.000 --> 04:50.280
have all of the particular binaries if I happen to grep for let's say MKFS.

111
04:50.280 --> 04:54.400
Check what we actually have here we have the general tool MKFS which ultimately

112
04:54.400 --> 04:54.840
acts as

113
04:54.840 --> 05:00.140
a front end for all of these more specific tools we can see we have MKFS.exe
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

113
04:54.840 --> 05:00.140
a front end for all of these more specific tools we can see we have MKFS.exe

114
05:00.140 --> 05:00.760
too.

115
05:00.760 --> 05:05.720
You can quite reasonably guess this is going to make a file system using the

116
05:05.720 --> 05:06.760
EXT2 format

117
05:06.760 --> 05:11.860
whereas if you happen to use MKFS.exe 4 you will create a file system using the

118
05:11.860 --> 05:12.520
EXT4 file

119
05:12.520 --> 05:17.540
system and again if you happen to be on let's maybe say a Red Hat based system

120
05:17.540 --> 05:19.560
MKFS.XFS allows

121
05:19.560 --> 05:22.040
you to create that XFS based file system.

122
05:22.040 --> 05:25.660
So those are some of the bare bones basics around our file systems we want to

123
05:25.660 --> 05:26.040
now take

124
05:26.040 --> 05:29.080
that information and apply it to our automation system.

125
05:29.080 --> 05:32.430
Now before we actually do that what we want to do is to ensure that we do have
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

125
05:29.080 --> 05:32.430
Now before we actually do that what we want to do is to ensure that we do have

126
05:32.430 --> 05:33.280
some additional

127
05:33.280 --> 05:36.720
disks in place just to make your labbing a little bit smoother.

128
05:36.720 --> 05:39.960
After all we don't want to be formatting disks that we happen to be operating

129
05:39.960 --> 05:40.320
on so

130
05:40.320 --> 05:42.400
it just makes sense to do such a thing.

131
05:42.400 --> 05:45.360
So all I will do here is I will go to my devices.

132
05:45.360 --> 05:48.560
So if I go to my blue box right here I will go to settings.

133
05:48.560 --> 05:52.760
I'm going to go to hard disk and then I will choose add a device.

134
05:52.760 --> 05:56.830
I will choose your new hard disk then select add and now I'll just add a disk

135
05:56.830 --> 05:57.400
or let's

136
05:57.400 --> 06:00.640
maybe just say oh I don't know let's go with one gig okay.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

136
05:57.400 --> 06:00.640
maybe just say oh I don't know let's go with one gig okay.

137
06:00.640 --> 06:05.480
I will then choose apply and then click X similarly let's go to the yellow box

138
06:05.480 --> 06:06.360
as well.

139
06:06.360 --> 06:10.960
Go to settings same process let's add a device for a hard disk new hard disk

140
06:10.960 --> 06:12.160
right here let's

141
06:12.160 --> 06:17.480
add it and again let's just add this one for one gig if we choose apply now

142
06:17.480 --> 06:17.760
what I'll

143
06:17.760 --> 06:19.880
do is start up both of those machines.

144
06:19.880 --> 06:23.140
So whilst the machines boot let's pause this video and we'll return back where

145
06:23.140 --> 06:23.840
we discuss

146
06:23.840 --> 06:26.480
the plan to automate our file systems.
