udevadm info does not see the ID_FS_* field for the self-written LKM device

25 views Asked by At

For Linux there is a self-written block device driver, similar to the loop driver. Creates on demand devices /dev/mycc0, /dev/mycc1, etc., looking at some destination devices.

After the reboot, I entered the dracut emergency shell by specifying the kernel parameter rd.break=initqueue

Two devices were created /dev/loop0 and /dev/mycc0. Both look at /dev/sda2.

udevadm info for /dev/mycc0 does not show fields like ID_FS_UUID, ID_FS_TYPE, etc. For /dev/loop0 it shows.

Wherein:

1: udevadm test-builtin blkid /sys/class/block/loop0 and udevadm test-builtin blkid /sys/class/block/mycc0 - the same! There are fields ID_FS_UUID, ID_FS_TYPE, etc. ...

2: stat and blkid for /dev/loop and /dev/mycc0 are the same

3: cmp -b -l /dev/loop0 /dev/mycc0 - no differences found.

An example of what udevadm info outputs:

Executed udevadm info /dev/loop0:

P: /devices/virtual/block/loop0
N: loop0
L:0
E: DEVPATH=/devices/virtual/block/loop0
E: DEVNAME=/dev/loop0
E: DEVTYPE=disk
E: DISKSEQ=4
E: MAJOR=7
E: MINOR=0
E: SUBSYSTEM=block
E: USEC_INITIALIZED=127559842
E: ID_FS_UUID=mvZqUU-Fa0z-F5j3-cEIW-g5XJ-86la-FxNVkH
E: ID_FS_UUID_ENC=mvZqUU-Fa0z-F5j3-cEIW-g5XJ-86la-FxNVkH
E: ID_FS_VERSION=LVM2 001
E: ID_FS_TYPE=LVM2_member
E: ID_FS_USAGE=raid

Executed udevadm info /dev/mycc0:

P: /devices/virtual/block/mycc0
N:mycc0
L:0
E: DEVPATH=/devices/virtual/block/mycc0
E: DEVNAME=/dev/mycc0
E: DEVTYPE=disk
E: DISKSEQ=9
E: MAJOR=252
E: MINOR=0
E: SUBSYSTEM=block

What can be wrong?

P.S.: Both drivers use /dev/sda2 for ease of testing. I don’t do anything for recording, and if I check separately, only loop0 or only mycc0, then the picture is the same.

0

There are 0 answers