1
00:00:00,000 --> 00:00:07,040
All right.

2
00:00:07,040 --> 00:00:09,360
So you needed to create a new file system.

3
00:00:09,360 --> 00:00:11,480
In case you don't have the partition,

4
00:00:11,480 --> 00:00:14,320
you need to start by creating the partition.

5
00:00:14,320 --> 00:00:16,760
It happens that I had a technical issue,

6
00:00:16,760 --> 00:00:19,160
and for that reason, I needed to change my machine.

7
00:00:19,160 --> 00:00:24,680
So I'm going to create a new partition on my SDB device,

8
00:00:24,680 --> 00:00:31,320
making a partition number 3 and with a size of 4 gigabytes.

9
00:00:31,320 --> 00:00:32,000
There we go.

10
00:00:32,000 --> 00:00:33,520
W to write.

11
00:00:33,520 --> 00:00:42,480
And now I can create my file system MKXFS on dev SDB 3.

12
00:00:42,480 --> 00:00:47,160
Now, MKXFS is not the only thing that we wanted in this lab.

13
00:00:47,160 --> 00:00:50,840
We also wanted to generate a new UUID.

14
00:00:50,840 --> 00:00:53,599
So let me start by showing you block ID.

15
00:00:53,599 --> 00:00:58,160
And block ID, or BLKKID, is showing the current UUID

16
00:00:58,160 --> 00:01:00,599
that has been generated right here.

17
00:01:00,599 --> 00:01:01,360
Notice the name.

18
00:01:01,360 --> 00:01:04,000
It ends 9AE3.

19
00:01:04,000 --> 00:01:07,040
So if I want to generate a new UUID,

20
00:01:07,040 --> 00:01:14,440
I can use XFS admin minus U generate on dev SDB 3.

21
00:01:14,440 --> 00:01:18,440
And there you can see that the new UUID has been generated.

22
00:01:18,440 --> 00:01:23,400
And block ID is going to confirm that SDB 3 doesn't end in AE3

23
00:01:23,400 --> 00:01:24,559
anymore.

24
00:01:24,559 --> 00:01:26,080
So here we have it.

25
00:01:26,080 --> 00:01:28,480
This is the UUID.

26
00:01:28,480 --> 00:01:30,639
Now, I want to show you something cool.

27
00:01:30,639 --> 00:01:34,160
I want to mount this file system by using the UUID.

28
00:01:34,160 --> 00:01:36,480
Of course, in a graphical user interface,

29
00:01:36,480 --> 00:01:38,160
you can easily use your mouse.

30
00:01:38,160 --> 00:01:41,760
But what are you going to do in a non-graphical user interface?

31
00:01:41,760 --> 00:01:44,360
Well, there I would use block ID.

32
00:01:44,360 --> 00:01:47,720
And I would use a pipe and send the output to AUC.

33
00:01:47,720 --> 00:01:53,040
And next, I'm going to tell AUC to look for SDB 3.

34
00:01:53,040 --> 00:01:58,360
And then I want it to print $2, which is the second field.

35
00:01:58,360 --> 00:01:59,160
And there we go.

36
00:01:59,160 --> 00:02:00,760
Here we have the UUID.

37
00:02:00,760 --> 00:02:04,519
Now that I have isolated my UUID from the command line,

38
00:02:04,519 --> 00:02:06,879
I can use command line redirection.

39
00:02:06,879 --> 00:02:09,600
Don't forget to use a double redirector

40
00:02:09,600 --> 00:02:14,320
and not a single one to write the output to etc fstab.

41
00:02:14,320 --> 00:02:15,960
And then I need to mount it.

42
00:02:15,960 --> 00:02:18,279
So let's mount it on the directory new.

43
00:02:18,279 --> 00:02:20,119
Need to have something as a name.

44
00:02:20,119 --> 00:02:24,880
And in etc fstab, I can see the UUID is waiting for me.

45
00:02:24,880 --> 00:02:28,360
And I'm going to mount it on slash new

46
00:02:28,360 --> 00:02:34,119
with XFS as the file system and 0 and 0 as the mount options.

47
00:02:34,119 --> 00:02:38,440
So to test, mount minus A is always a good test.

48
00:02:38,440 --> 00:02:41,600
And oh, well, I'm happy I did it because you

49
00:02:41,600 --> 00:02:44,639
can see it's complaining about an unknown parameter.

50
00:02:44,639 --> 00:02:47,679
And is there a reason why we get an unknown parameter?

51
00:02:47,679 --> 00:02:49,559
Absolutely.

52
00:02:49,559 --> 00:02:51,240
Do you see what's going on?

53
00:02:51,240 --> 00:02:54,160
We are missing the defaults option.

54
00:02:54,160 --> 00:02:57,000
There is no line with the file system mount option.

55
00:02:57,000 --> 00:03:00,000
And for that reason, it was complaining.

56
00:03:00,000 --> 00:03:02,440
That is why mount minus A is convenient

57
00:03:02,440 --> 00:03:05,600
because if you just reboot, your reboot will fail

58
00:03:05,600 --> 00:03:07,800
and you need to go into troubleshooting.

59
00:03:07,800 --> 00:03:09,960
So now if I use mount minus A again,

60
00:03:09,960 --> 00:03:14,279
it's only giving me a hint about systemctl daemon reload,

61
00:03:14,279 --> 00:03:16,080
which I choose to ignore.

62
00:03:16,080 --> 00:03:18,960
My file system should be mounted.

63
00:03:18,960 --> 00:03:21,679
LSBLK is showing it.

64
00:03:21,679 --> 00:03:23,520
And there we go.

65
00:03:23,520 --> 00:03:27,399
SCB3 is mounted on the partition slash new.

66
00:03:27,399 --> 00:03:30,639
So that is what I had in mind for this lab.

