1
00:00:00,000 --> 00:00:09,000
All right, let's investigate the storage topology.

2
00:00:09,000 --> 00:00:10,720
A lot of storage going on.

3
00:00:10,720 --> 00:00:15,440
It looks as if NVMe 0 and 2 is the best one to use.

4
00:00:15,440 --> 00:00:21,959
So I am going to do an fdisk on dev NVMe 0 and 2

5
00:00:21,959 --> 00:00:24,000
to create two new partitions.

6
00:00:24,000 --> 00:00:26,280
Let me use Control-L to put the output

7
00:00:26,280 --> 00:00:27,600
on the top of the screen.

8
00:00:27,600 --> 00:00:30,639
Using N to create partition number 5.

9
00:00:30,639 --> 00:00:33,279
The lab is not asking for a specific size,

10
00:00:33,279 --> 00:00:36,439
so I'm making it a 1G partition.

11
00:00:36,439 --> 00:00:39,279
Using N to create partition number 6.

12
00:00:39,279 --> 00:00:42,720
Same story, plus 1G.

13
00:00:42,720 --> 00:00:44,680
This is going to be used for LVM,

14
00:00:44,680 --> 00:00:48,439
so we should not forget to set the partition type.

15
00:00:48,439 --> 00:00:52,759
For partition number 6, the alias that we can use is LVM.

16
00:00:52,759 --> 00:00:55,799
And likewise, T for partition number 5,

17
00:00:55,799 --> 00:00:58,279
and the alias is LVM.

18
00:00:58,279 --> 00:01:01,520
And now a quick P to verify what we have done.

19
00:01:01,520 --> 00:01:05,279
And as you can see, we have partition 5 and partition 6.

20
00:01:05,279 --> 00:01:06,160
Looking good.

21
00:01:06,160 --> 00:01:09,720
So W, and that will write it.

22
00:01:09,720 --> 00:01:14,559
Quick LSBOK to verify that partitions 5 and 6 show up

23
00:01:14,559 --> 00:01:17,120
as expected, and they do.

24
00:01:17,120 --> 00:01:20,239
Right, next we need to create an LVM volume group.

25
00:01:20,239 --> 00:01:24,559
I'm going to use VGcreate, calling it VGLab,

26
00:01:24,559 --> 00:01:33,919
and putting in dev NVMe0 N2P5, as well as dev NVMe0 N2P6.

27
00:01:33,919 --> 00:01:35,360
Hey, hold on.

28
00:01:35,360 --> 00:01:39,120
Don't we have to create the physical volumes first?

29
00:01:39,120 --> 00:01:41,040
Yes, that's what I explained, because I

30
00:01:41,040 --> 00:01:43,440
want you to be aware of every single step.

31
00:01:43,440 --> 00:01:47,160
But the LVM utilities in general are quite smart.

32
00:01:47,160 --> 00:01:49,839
And that means even if you don't specifically

33
00:01:49,839 --> 00:01:52,879
create the physical volume, VGcreate

34
00:01:52,919 --> 00:01:55,440
will find the partitions, will notice, hey,

35
00:01:55,440 --> 00:01:57,400
this is not a physical volume yet,

36
00:01:57,400 --> 00:01:59,480
and it will write the physical volume

37
00:01:59,480 --> 00:02:02,519
metadata to the partition, with the result

38
00:02:02,519 --> 00:02:05,959
that the volume group is successfully created.

39
00:02:05,959 --> 00:02:08,279
That makes it a bit easier, isn't it?

40
00:02:08,279 --> 00:02:12,559
Then we need to create a logical volume, so LVCreate.

41
00:02:12,559 --> 00:02:17,199
And how about the 75% of available disk space?

42
00:02:17,240 --> 00:02:23,320
Well, you would use minus L, lowercase L that is, 75% free.

43
00:02:23,320 --> 00:02:29,839
Minus N, because we want to give it a name, LVLab in VGLab.

44
00:02:29,839 --> 00:02:32,520
And now I want to do a quick LVS to verify

45
00:02:32,520 --> 00:02:34,639
that this worked out all right.

46
00:02:34,639 --> 00:02:35,520
And what do we see?

47
00:02:35,520 --> 00:02:38,839
We see that LVLab has a size of 1.5 gigs,

48
00:02:38,839 --> 00:02:41,839
and that is exactly what we needed.

49
00:02:41,839 --> 00:02:51,520
So mkfs.ext4 on dev VGLab LVLab to create an ext4 file system.

50
00:02:51,520 --> 00:02:54,880
And that is all that was required in this lab.

