![]() Does anybody know any limitation about the serial number? It if can contain '_' then this method is not bullet proof. ![]() In the ID_SERIAL after the last underscore You can get the serial number.Īs I see a serial number can contain alphanumerical characters and '-' (I have such SCSI HDDs). Or You can directly get the "composite" serial number: $ udevinfo -q env -p /block/sda But there is at least one direct way: $ udevinfo -q path -n /dev/sdaĭisk/by-id/scsi-SATA_KINGSTON_SVP100_31JY100MY5SK disk/by-path/pci-0000:00:11.0-scsi-0:0:0:0Ī space separated list is returned. Unfortunately it is not trivial to find out this by-id symlink from the name of the device. ![]() In /etc/udev/rules.d/les such lines can be found: KERNEL="sd*|sr*", SYSFS" The links under /dev/disk/by-id is created by udev.
0 Comments
Leave a Reply. |