Okay, in this video, I'll show you how to create partitions. But in order to create partitions, we
need available disk space. So I shut down my virtual machine and I'm going to the settings of
my virtual machine. What I'm doing here in your virtualization software might be a little bit different.
Here we have my removable devices.
I have a 20 gigabyte disk. I'm going to make that a 30 gigabyte disk.
And then I'm clicking apply and VMware is saying that the resize is okay.
And you know what? I'm also going to add a new disk.
So new hard disk, 20 gigabytes. That sounds fine to me.
And then I'm going to play my virtual machine so that it picks up the storage that I've newly made available.
So in order to work with storage, I'm going to use the fdisk utility.
Now, there are multiple utilities to create partitions, and fdisk,
as far as I'm concerned, is the gold standard.
It's flexible, it's advanced, it's powerful, and it allows you to
do everything that you ever want to do with your storage.
Other utilities are available as well. But as I mentioned before, why would you
bother about learning multiple utilities in if you can do it all with one?
So I am going to work on Dev NVMe 0n1.
That is my primary partition that I just resized from 20 gigs to 30 gigs.
So here I'm in my FDISK interface and I see Walt IC device does not contain a recognized
partition table. You know what, that is actually kind of weird. So I'm using Q to get out,
and I'm using LSBLK to verify what is going on. And you see what is happening.
I have NVMe 0n2 as my disk with the partitions in
NVMe 0n1 as newly added disk. That's a little bit strange.
But it booted successfully, so I'm not going to worry about it.
But because I have resized my disk number two, that's what
I'm going to work on. So back to fdisk on NVMe0N2.
And then it's coming with two scary messages. Scary message number one, GPT PMBR size mismatch.
So this is telling us that it was expecting a 20 gigabyte disk and suddenly
it has become a 30 gigabyte disk. That's expected behavior, so no reason to panic.
Then we also see the disk is currently in use. Repartitioning is probably a bad idea.
That is to warn you that you are doing something that might be dangerous.
I don't care about that. So I'm ignoring this next message and let's use M for help.
M for help really doesn't make sense. It's more like a menu.
But here we see all the different options that are available and the options that you care about most is
in generic. Let's keep it very simple. Two options matter most or three if you also want to write.
First I'm using P for print and that is showing the current partition table.
Now I want to add a new partition and I'm calling that partition number four.
First sector is a physical location on disk. I'm pressing enter to accept the
first sector and I make it a 2 gigabytes partition by using 2 uppercase
G. It's case sensitive. So the uppercase g is really important here.
Then it's telling us that it created new partition of the type Linux file system and a size 2 gigabytes.
Well, that sounds fantastic. I would like to verify that using P for print.
Now I'm going to use W to write and we are done. Which commands have
we seen? P for print, N for new, W for write and then you're done.
Do you want to verify what was going on? You probably do.
LSBOK will show you.
And what am I looking for? Well, I'm looking for partition number four that has suddenly appeared and that is
a partition that we need to further configure. In the next video you'll learn what to do with it.