3

Note: There is a related question here which describes output for this person's specific situation and for their block device "/dev/sdb", but i am trying to set something up for a specific partition (mine is "/dev/sdb1") and my question is not answered. I would like to know where the official documentation is and how the person answering the question was able to answer it...

I ran udevadm info /dev/sdb1. I will paste my output below. I want to know where the documentation is that describes precisely what this output means. For example i want to know exactly what the prefixes mean. I can't find this in the man page documentation for man udev or man udevadm. Where is the actual documentation on udevadm info? I have a specific problem i am trying to solve but i can't solve it if i don't understand the system and its output. I can infer that "E" is "Environment" but where is this actually stated? What are the others?

I am on a debian testing system.

output of udevadm info /dev/sdb1

P: /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host3/target3:0:0/3:0:0:0/block/sdb/sdb2
N: sdb2
L: 0
S: disk/by-label/Nate\x20Backup
S: disk/by-id/usb-Seagate_Expansion_NAAYJXGA-0:0-part2
S: disk/by-path/pci-0000:00:14.0-usb-0:2:1.0-scsi-0:0:0:0-part2
S: disk/by-partuuid/f377af76-4eb6-4895-a549-2a9a5eb712bd
S: disk/by-uuid/608D-8EE9
E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/host3/target3:0:0/3:0:0:0/block/sdb/sdb2
E: DEVNAME=/dev/sdb2
E: DEVTYPE=partition
E: PARTN=2
E: MAJOR=8
E: MINOR=18
E: SUBSYSTEM=block
E: USEC_INITIALIZED=94321500
E: ID_VENDOR=Seagate
E: ID_VENDOR_ENC=Seagate\x20
E: ID_VENDOR_ID=0bc2
E: ID_MODEL=Expansion
E: ID_MODEL_ENC=Expansion\x20\x20\x20\x20\x20\x20\x20
E: ID_MODEL_ID=231a
E: ID_REVISION=0712
E: ID_SERIAL=Seagate_Expansion_NAAYJXGA-0:0
E: ID_SERIAL_SHORT=NAAYJXGA
E: ID_TYPE=disk
E: ID_INSTANCE=0:0
E: ID_BUS=usb
E: ID_USB_INTERFACES=:080650:080662:
E: ID_USB_INTERFACE_NUM=00
E: ID_USB_DRIVER=uas
E: ID_PATH=pci-0000:00:14.0-usb-0:2:1.0-scsi-0:0:0:0
E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_2_1_0-scsi-0_0_0_0
E: ID_PART_TABLE_UUID=7bffbc3d-692e-4fad-a8c3-f2f5760bec54
E: ID_PART_TABLE_TYPE=gpt
E: ID_FS_LABEL=Nate_Backup
E: ID_FS_LABEL_ENC=Nate\x20Backup
E: ID_FS_UUID=608D-8EE9
E: ID_FS_UUID_ENC=608D-8EE9
E: ID_FS_VERSION=1.0
E: ID_FS_TYPE=exfat
E: ID_FS_USAGE=filesystem
E: ID_PART_ENTRY_SCHEME=gpt
E: ID_PART_ENTRY_UUID=f377af76-4eb6-4895-a549-2a9a5eb712bd
E: ID_PART_ENTRY_TYPE=ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
E: ID_PART_ENTRY_NUMBER=2
E: ID_PART_ENTRY_OFFSET=411648
E: ID_PART_ENTRY_SIZE=9767129088
E: ID_PART_ENTRY_DISK=8:16
E: DEVLINKS=/dev/disk/by-label/Nate\x20Backup /dev/disk/by-id/usb-Seagate_Expansion_NAAYJXGA-0:0-part2 /dev/disk/by-path/pci-0000:00:14.0-usb-0:2:1.0-scsi-0:0:0:0-part2 /dev/disk/by-partuuid/f377af76-4eb6-4895-a549-2a9a5eb712bd /dev/disk/by-uuid/608D-8EE9
E: TAGS=:systemd:
E: CURRENT_TAGS=:systemd:

Update: It looks like it wasn't in the docs, as stated in the accepted answer. However, the devs have fixed this. See Eduardo Trápani's comment below the accepted answer. This change is part of the v249 release on github (7-7-21), as you can see by looking near the top of https://github.com/systemd/systemd/commit/205013c8002aacd142264e9b4560e86b0ba05830

1
  • 2
    AFAIK, this is not documented anywhere. udev is by the same devs as systemd, so you're supposed to either infer it or magically know it. If you're lucky there may be a 10 year old blog post on someone's personal blog somewhere describing their ideas at the time (which may or may not match the current implementation). As for inferences: P=pci bus path under /sys, N=device name (and primary node name under /dev), S=symlink(s) to device node that are known by udev. E = environment variables. I'm not sure what L is for, maybe a count of hard-links to the primary device node.
    – cas
    May 19, 2021 at 11:30

1 Answer 1

4

I did not find documentation, but the source code seems fairly clear

  • P = path (or devpath)
  • N = name
  • L = link_priority - The default is 0
  • S = link (or symlink)
  • E = property. The E is probably because properties are accessed with ENV{key}
2
  • I think this is the answer. I don't think there is any documentation. I think since it's so heavily used it should be better documented without having to refer to the source.
    – nate
    May 19, 2021 at 16:20
  • 2
    @cas and everybody, the information has been added to the documentation as the resolution of this issue: man udevadm should list the meaning of P: N: L: S: E: #19663 Jun 26, 2021 at 21:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .