1 00:00:00,000 --> 00:00:09,880 Let's talk about storage device names. 2 00:00:09,880 --> 00:00:15,160 So in order to work with disks, you need to address the correct block device names. 3 00:00:15,160 --> 00:00:19,440 Names of disks and partitions are automatically generated based on information obtained from 4 00:00:19,440 --> 00:00:21,520 the Linux kernel module. 5 00:00:21,520 --> 00:00:25,980 So it's not always the same name, there are different options. 6 00:00:25,980 --> 00:00:30,740 And because this procedure is automatic, device names may suddenly change. 7 00:00:30,740 --> 00:00:31,740 What does that mean? 8 00:00:31,740 --> 00:00:36,340 Well, that means that if anything changes in your storage topology, a device may suddenly 9 00:00:36,340 --> 00:00:38,419 have a different name. 10 00:00:38,419 --> 00:00:44,139 That's why you can use UUID or labels to deal with changing device names. 11 00:00:44,139 --> 00:00:50,660 If you want an overview of device names, use LSBLK for list block devices. 12 00:00:50,660 --> 00:00:54,900 Different solutions exist to mount devices with a persistent name. 13 00:00:54,900 --> 00:00:55,900 These are UUIDs. 14 00:00:55,900 --> 00:01:00,500 UUIDs are created when the file system is created. 15 00:01:00,500 --> 00:01:03,459 Labels are optional properties of the file system. 16 00:01:03,459 --> 00:01:09,180 And there is the devdisk directory, which is automatically generated by systemd udevd. 17 00:01:09,180 --> 00:01:11,620 And all of these are persistent naming. 18 00:01:11,620 --> 00:01:15,900 They don't suddenly change, and for that reason, it's recommended to use them. 19 00:01:15,900 --> 00:01:17,699 Let me show you. 20 00:01:17,699 --> 00:01:22,099 So the command to start it is LSBLK for list block devices. 21 00:01:22,099 --> 00:01:26,860 And you can see on my system, I have a disk with the name NVMe0N1. 22 00:01:26,860 --> 00:01:32,739 We have previously seen that when I plug in the USB thumb drive, I get an SDA. 23 00:01:32,739 --> 00:01:38,459 And all of that depends on the storage device driver that you are using. 24 00:01:38,459 --> 00:01:42,139 Now behind this LSBLK, there's a configuration file. 25 00:01:42,139 --> 00:01:45,220 That's a configuration file PROC PARTITIONS. 26 00:01:45,220 --> 00:01:50,220 There's no real need to work with it, but it's nice to see this configuration file and 27 00:01:50,220 --> 00:01:51,980 that it exists. 28 00:01:51,980 --> 00:01:56,540 Now on my system, I do have a couple of partitions that already exist. 29 00:01:56,540 --> 00:01:58,660 And I have the DM devices. 30 00:01:58,660 --> 00:02:00,820 This is for LVM logical volumes. 31 00:02:00,820 --> 00:02:02,820 We'll talk about those later. 32 00:02:02,820 --> 00:02:07,139 What I want to show you now is BLKID for block ID. 33 00:02:07,139 --> 00:02:14,979 And there you can see that my device, let's say NVMe0N1P3, has a UUID. 34 00:02:14,979 --> 00:02:18,940 And these UUIDs are what is used nowadays. 35 00:02:18,940 --> 00:02:23,220 Because the problem is if suddenly something changes in the storage topology, then the 36 00:02:23,220 --> 00:02:33,460 device currently known as devNVMe0N1P3 might suddenly become devNVMe0N2P3, for instance. 37 00:02:33,460 --> 00:02:38,539 And if you have a hard reference in ETC FSTEP, you can't boot anymore. 38 00:02:38,539 --> 00:02:44,860 And that is why if you check out the contents of ETC FSTEP, which is responsible for automatically 39 00:02:44,860 --> 00:02:51,500 mounting these devices, right here you can see UUID is the standard. 40 00:02:51,500 --> 00:02:53,139 So don't forget that. 41 00:02:53,139 --> 00:02:59,059 If you want to stay out of trouble, find the UUID of your devices and use those.