Sometimes you might need to mount a disk on a VM. It can be on Azure, or your favorite cloud provider.

First, get a list of block devices (drives, partitions etc)

sudo lsblk

image.png

Notice sdc , that’s our 100GB data disk

Now check if sdc is formatted to ext4

lsblk -f

image.png

Since sdc is not ext4 we will format it

sudo mkfs.ext4 /dev/sdc

image.png

image.png

Create a mount point

sudo mkdir -p /mnt/sdc

Get UUID