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
