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,880
deep level insight.

12
00:00:54,880 --> 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,120
So to start it, I'm using UDFADM monitor.

17
00:01:13,120 --> 00:01:19,160
And there you can see that monitor will print received events for UDF and for the kernel.

18
00:01:19,160 --> 00:01:21,959
So the kernel is the actual device event.

19
00:01:21,959 --> 00:01:25,599
And UDF is related to the rule processing.

20
00:01:25,599 --> 00:01:28,199
Let's plug in USB thumb drive.

21
00:01:28,199 --> 00:01:32,120
So here you can see that a lot of output is generated.

22
00:01:32,120 --> 00:01:37,559
And if you scroll up in the output, you can see some stuff that is actually interesting.

23
00:01:37,559 --> 00:01:40,279
So it starts by the kernel that is adding a device.

24
00:01:40,279 --> 00:01:45,160
And the device was found on this specific PCI address.

25
00:01:45,160 --> 00:01:50,279
And that is resulting in UDF checking if there's any rules to be processed.

26
00:01:50,279 --> 00:01:56,160
Then a little bit further, you can see that drivers are involved, the USB storage driver.

27
00:01:56,160 --> 00:02:01,599
And this USB storage driver is implemented by the USB storage module.

28
00:02:01,599 --> 00:02:04,559
The UAS module is involved.

29
00:02:04,559 --> 00:02:07,480
And you can see that more drivers are loaded.

30
00:02:07,480 --> 00:02:12,639
And based on the presence of a new driver, additional steps can be taken.

31
00:02:12,639 --> 00:02:17,839
And then a lot later, here we can see that the block device is added, block dev SDA.

32
00:02:17,839 --> 00:02:22,460
And on the block device, we can see right here that the partition was detected.

33
00:02:22,460 --> 00:02:27,600
And the result, well, the result should be visible in LSBLK.

34
00:02:27,600 --> 00:02:30,720
LSBLK, which is list block device.

35
00:02:30,720 --> 00:02:35,759
And in this list block device, we can see that the SDA block device has successfully

36
00:02:35,759 --> 00:02:37,600
been added.

37
00:02:37,600 --> 00:02:41,600
Now in these devices, there is a lot of information that is stored.

38
00:02:41,600 --> 00:02:46,639
You can find that information using UDF ADM info.

39
00:02:46,639 --> 00:02:52,199
Minus minus name is slash dev slash SDA1, for instance.

40
00:02:52,199 --> 00:02:55,759
And here we can see all the device parameters that have been discovered.

41
00:02:55,759 --> 00:02:59,240
And these device parameters can be used in UDF rules.

42
00:02:59,240 --> 00:03:01,800
In the next video, you'll learn a bit about UDF rules.

