Tech - Ubuntu 24.04- Create/Mount and Format disk

Tech - Ubuntu 24.04- Create/Mount and Format disk

Creating this post as a reminder for me as I keep forgetting the sodding commands to do this..

I needed to add another disk to a VM nice a simple, now let me be clear I'm not extending the default LVM just adding a new disk.

Now the way you'd expect to add a new disk is the same depending on what hypervisor your using.. in my case Proxmox but I can't see why this can't be much different on Broadshite VMware or 'insert some hypervisor..'

To start lets see if we can see the disk:

fdisk -l

AS we can see the path is: /dev/sdb

Now we execute:

fdisk /dev/sdb

Now we want to add a new partition type:

n

Type P - For Primary

Partition number leave default (1)

For the First Sector just press Enter

For the Last Sector just press Enter

Then when back at command type w

So the process in all will look like this:

When your happy type w meaning write!

Happy days now we have a partition and have written the changes.

Now we need to format the fugger.

I'm using a EXT4 File System so i will use the following:

mkfs.ext4 /dev/sdb1

Now we need to add a mount point.

To start we need to add a directory on the FS that we can use in my case I'll create using

mkdir /mail

Once created I'll then try and mount the disk

mount /dev/sdb1 /mail

That's mounted and happy days... now before you ALT+F4 you need to ensure that the disk is mounted on

nano /etc/fstab

I added the line

/dev/sdb1 /mail ext4 defaults 0 2

Now test this buy doing a good olde sudo reboot and then ensure that the volume is still mounted afterwards....

Simple..

P.S. Fuck you Broadcom.

God will get you bitch! And if he doesn't I will... Goddam 4 month quote bastards..