Let's talk about storage device names.
So in order to work with disks, you need to address the correct block device names.
Names of disks and partitions are automatically generated based on information obtained from
the Linux kernel module.
So it's not always the same name, there are different options.
And because this procedure is automatic, device names may suddenly change.
What does that mean?
Well, that means that if anything changes in your storage topology, a device may suddenly
have a different name.
That's why you can use UUID or labels to deal with changing device names.
If you want an overview of device names, use LSBLK for list block devices.
Different solutions exist to mount devices with a persistent name.
These are UUIDs.
UUIDs are created when the file system is created.
Labels are optional properties of the file system.
And there is the devdisk directory, which is automatically generated by systemd udevd.
And all of these are persistent naming.
They don't suddenly change, and for that reason, it's recommended to use them.
Let me show you.
So the command to start it is LSBLK for list block devices.
And you can see on my system, I have a disk with the name NVMe 0 and 1.
We have previously seen that when I plug in a USB thumb drive, I get an SDA.
And all of that depends on the storage device driver that you are using.
Now behind this LSBLK, there's a configuration file.
That's a configuration file, proc partitions.
There's no real need to work with it, but it's nice to see this configuration file and
that it exists.
Now on my system, I do have a couple of partitions that already exist.
And I have the DM devices.
This is for LVM logical volumes.
We'll talk about those later.
What I want to show you now is BLKID for block ID.
And there you can see that my device, let's say NVMe 0 and 1 P3, has a UUID.
And these UUIDs are what is used nowadays.
Because the problem is if suddenly something changes in the storage topology, then the
device currently known as dev NVMe 0 and 1 P3 might suddenly become dev NVMe 0 and 2
P3, for instance.
And if you have a hard reference in ETC FSTEP, you can't boot anymore.
And that is why if you check out the contents of ETC FSTEP, which is responsible for automatically
mounting these devices, right here you can see UUID is the standard.
So don't forget that.
If you want to stay out of trouble, find the UUID of your devices and use those.