1
00:00:06,740 --> 00:00:12,503
Okay, in this video, I'll show you how to
create partitions. But in order to create partitions, we

2
00:00:12,503 --> 00:00:18,266
need available disk space. So I shut down my
virtual machine and I'm going to the settings of

3
00:00:18,266 --> 00:00:24,029
my virtual machine. What I'm doing here in
your virtualization software might be a little bit different.

4
00:00:25,109 --> 00:00:27,629
Here we have
my removable devices.

5
00:00:28,179 --> 00:00:33,000
I have a 20 gigabyte disk. I'm
going to make that a 30 gigabyte disk.

6
00:00:33,659 --> 00:00:38,270
And then I'm clicking apply and VMware
is saying that the resize is okay.

7
00:00:38,909 --> 00:00:43,090
And you know what? I'm also
going to add a new disk.

8
00:00:43,090 --> 00:00:47,270
So new hard disk, 20
gigabytes. That sounds fine to me.

9
00:00:47,880 --> 00:00:54,320
And then I'm going to play my virtual machine so
that it picks up the storage that I've newly made available.

10
00:00:55,759 --> 00:00:59,979
So in order to work with storage,
I'm going to use the fdisk utility.

11
00:01:00,960 --> 00:01:05,385
Now, there are multiple utilities
to create partitions, and fdisk,

12
00:01:05,385 --> 00:01:09,810
as far as I'm
concerned, is the gold standard.

13
00:01:10,329 --> 00:01:14,019
It's flexible, it's advanced, it's
powerful, and it allows you to

14
00:01:14,019 --> 00:01:17,709
do everything that you ever
want to do with your storage.

15
00:01:18,310 --> 00:01:22,825
Other utilities are available as well. But
as I mentioned before, why would you

16
00:01:22,825 --> 00:01:27,340
bother about learning multiple utilities in if
you can do it all with one?

17
00:01:28,200 --> 00:01:32,010
So I am going to
work on Dev NVMe 0n1.

18
00:01:34,019 --> 00:01:38,159
That is my primary partition that I
just resized from 20 gigs to 30 gigs.

19
00:01:40,200 --> 00:01:46,823
So here I'm in my FDISK interface and I
see Walt IC device does not contain a recognized

20
00:01:46,823 --> 00:01:53,446
partition table. You know what, that is actually kind
of weird. So I'm using Q to get out,

21
00:01:53,446 --> 00:02:00,069
and I'm using LSBLK to verify what is
going on. And you see what is happening.

22
00:02:00,750 --> 00:02:06,084
I have NVMe 0n2 as
my disk with the partitions in

23
00:02:06,084 --> 00:02:11,419
NVMe 0n1 as newly added
disk. That's a little bit strange.

24
00:02:12,180 --> 00:02:15,400
But it booted successfully, so I'm
not going to worry about it.

25
00:02:16,419 --> 00:02:21,709
But because I have resized
my disk number two, that's what

26
00:02:21,709 --> 00:02:27,000
I'm going to work on.
So back to fdisk on NVMe0N2.

27
00:02:29,909 --> 00:02:36,639
And then it's coming with two scary messages.
Scary message number one, GPT PMBR size mismatch.

28
00:02:37,159 --> 00:02:41,795
So this is telling us that it
was expecting a 20 gigabyte disk and suddenly

29
00:02:41,795 --> 00:02:46,430
it has become a 30 gigabyte disk.
That's expected behavior, so no reason to panic.

30
00:02:47,060 --> 00:02:52,189
Then we also see the disk is currently
in use. Repartitioning is probably a bad idea.

31
00:02:53,449 --> 00:02:56,990
That is to warn you that you
are doing something that might be dangerous.

32
00:02:57,979 --> 00:03:04,030
I don't care about that. So I'm ignoring
this next message and let's use M for help.

33
00:03:04,610 --> 00:03:07,939
M for help really doesn't make
sense. It's more like a menu.

34
00:03:09,360 --> 00:03:15,495
But here we see all the different options that are
available and the options that you care about most is

35
00:03:15,495 --> 00:03:21,629
in generic. Let's keep it very simple. Two options
matter most or three if you also want to write.

36
00:03:22,159 --> 00:03:26,180
First I'm using P for print and
that is showing the current partition table.

37
00:03:26,750 --> 00:03:31,289
Now I want to add a new
partition and I'm calling that partition number four.

38
00:03:32,030 --> 00:03:37,616
First sector is a physical location on
disk. I'm pressing enter to accept the

39
00:03:37,616 --> 00:03:43,203
first sector and I make it a
2 gigabytes partition by using 2 uppercase

40
00:03:43,203 --> 00:03:48,789
G. It's case sensitive. So the
uppercase g is really important here.

41
00:03:50,810 --> 00:03:57,770
Then it's telling us that it created new partition of
the type Linux file system and a size 2 gigabytes.

42
00:03:58,270 --> 00:04:02,740
Well, that sounds fantastic. I would like
to verify that using P for print.

43
00:04:03,250 --> 00:04:08,545
Now I'm going to use W to
write and we are done. Which commands have

44
00:04:08,545 --> 00:04:13,840
we seen? P for print, N for
new, W for write and then you're done.

45
00:04:15,139 --> 00:04:18,139
Do you want to verify what
was going on? You probably do.

46
00:04:18,660 --> 00:04:21,019
LSBOK will
show you.

47
00:04:21,600 --> 00:04:27,745
And what am I looking for? Well, I'm looking for
partition number four that has suddenly appeared and that is

48
00:04:27,745 --> 00:04:33,889
a partition that we need to further configure. In
the next video you'll learn what to do with it.
