1 00:00:00,000 --> 00:00:10,760 In this lesson, you'll learn more about Systemd UDFD. 2 00:00:10,760 --> 00:00:16,219 So when alerted by the Linux kernel, Systemd UDFD will initialize new devices. 3 00:00:16,219 --> 00:00:20,660 And this involves writing device information to slash sys so that the complete device can 4 00:00:20,660 --> 00:00:24,500 be tracked and the device parameters can be administered. 5 00:00:24,500 --> 00:00:30,020 And also creating device notes in the slash dev directory so that there is a user interface 6 00:00:30,020 --> 00:00:34,419 that allows users to communicate with the device. 7 00:00:34,419 --> 00:00:39,779 It can be convenient to track this procedure using the UDFADM monitor command. 8 00:00:39,779 --> 00:00:44,580 That will trace every single step and it will show you in detail what is going on. 9 00:00:44,580 --> 00:00:46,779 And that can be convenient to troubleshoot. 10 00:00:46,779 --> 00:00:52,580 If ever you connect a device and nothing is happening, well, UDFADM monitor is giving 11 00:00:52,580 --> 00:00:54,900 deep level insight. 12 00:00:54,900 --> 00:01:01,020 You can also get more detailed information about devices using UDFADM info. 13 00:01:01,020 --> 00:01:03,099 Minus minus name is dev note. 14 00:01:03,099 --> 00:01:07,059 As in UDFADM info, minus minus name is dev SDA. 15 00:01:07,059 --> 00:01:09,059 Let me show you. 16 00:01:09,059 --> 00:01:13,139 So to start it, I'm using UDFADM monitor. 17 00:01:13,139 --> 00:01:19,180 And there you can see that monitor will print received events for UDF and for the kernel. 18 00:01:19,180 --> 00:01:21,980 So the kernel is the actual device event. 19 00:01:21,980 --> 00:01:25,580 And UDF is related to the rule processing. 20 00:01:25,580 --> 00:01:28,220 Let's plug in USB thumb drive. 21 00:01:28,220 --> 00:01:32,139 So here you can see that a lot of output is generated. 22 00:01:32,139 --> 00:01:37,540 And if you scroll up in the output, you can see some stuff that is actually interesting. 23 00:01:37,540 --> 00:01:40,300 So it starts by the kernel that is adding a device. 24 00:01:40,300 --> 00:01:45,180 And the device was found on this specific PCI address. 25 00:01:45,180 --> 00:01:50,300 And that is resulting in UDF checking if there's any rules to be processed. 26 00:01:50,300 --> 00:01:56,180 Then a little bit further, you can see that drivers are involved, the USB storage driver. 27 00:01:56,180 --> 00:02:01,620 And this USB storage driver is implemented by the USB storage module. 28 00:02:01,620 --> 00:02:04,580 The UAS module is involved. 29 00:02:04,580 --> 00:02:07,500 And you can see that more drivers are loaded. 30 00:02:07,500 --> 00:02:12,660 And based on the presence of a new driver, additional steps can be taken. 31 00:02:12,660 --> 00:02:17,660 Then a lot later, here we can see that the block device is added, block dev SDA. 32 00:02:17,660 --> 00:02:22,380 And on the block device, we can see right here that the partition was detected. 33 00:02:22,380 --> 00:02:28,020 And the result, well, the result should be visible in LSBLK. 34 00:02:28,020 --> 00:02:30,660 LSBLK, which is list block device. 35 00:02:30,660 --> 00:02:37,539 And in this list block device, we can see that the SDA block device has successfully been added. 36 00:02:37,539 --> 00:02:41,380 Now, in these devices, there is a lot of information that is stored. 37 00:02:41,380 --> 00:02:45,460 And you can find that information using UDF ADM. 38 00:02:45,460 --> 00:02:52,179 Info, minus minus name is slash dev slash SDA1, for instance. 39 00:02:52,179 --> 00:02:55,740 And here we can see all the device parameters that have been discovered. 40 00:02:55,740 --> 00:02:59,220 And these device parameters can be used in UDF rules. 41 00:02:59,220 --> 00:03:01,820 In the next video, you'll learn a bit about UDF rules.