Crmgo Blog

Linux, Adding a Disk

Linux, Adding a Disk

After connecting the disk, I check how it was detected: `ls /dev/*`. My KVM virtual disk is `/dev/vdb`. I create a partition: `fdisk /dev/vdb`, then `n` and `w`. I create a filesystem: `mkfs.ext4 /dev/vdb1`. I will mount it by UUID, and I verified it using the command: `ls -al /dev/disk/by-uuid/`. The output shows: `lrwxrwxrwx 1 root…`

Linux, Adding a Disk

After connecting the disk, I check how it was detected:

ls /dev/*

I have a KVM virtual disk - /dev/vdb

Create a partition:

fdisk /dev/vdb

n

w

Create a file system:

mkfs.ext4 /dev/vdb1

I will mount by UUID, checked it with the command:

ls -al /dev/disk/by-uuid/

lrwxrwxrwx 1 root root 10 Aug 4 21:02 05ae71c5-1734-490f-975b-ae5e1bb8da0a -> ../../vdb1

or:

tune2fs -l /dev/vdb1 | grep UUID
Filesystem UUID: 05ae71c5-1734-490f-975b-ae5e1bb8da0a

or:

blkid

mounting at boot:

vim /etc/fstab

UUID=05ae71c5-1734-490f-975b-ae5e1bb8da0a /var/storage/cdrstream ext4 defaults 0 0

More about fstab here

mkdir /var/storage/cdrstream

Mount it:

mount -a

 

 

 

Note: This post may be AI-assisted and then human-edited. Editorial responsibility: Dmytro Lomaka, Kaltenkirchen.