Thomas Lange <la...@cs.uni-koeln.de> writes: > Ooh, it seems more complicated. Your code does not work on a machine > with one SATA disk:
> $ udevadm info -r --query=symlink /dev/sda > /dev/disk/by-id/wwn-0x5001517803d00e48 > /dev/disk/by-id/ata-INTEL_SSDSC2CW120A3_CVCV249103KG120BGN > /dev/disk/by-path/pci-0000:00:1f.2-ata-1 > $ udevadm info -r --query=symlink /dev/sda | sed -n > 's;.*\(/dev/disk/by-id/\S\+\).*;\1;p' > /dev/disk/by-id/wwn-0x5001517803d00e48 Oh... So "sed" might not be a good idea if you want all entries. > Before changing the code, I like to know if there are more unknows > cases we should keep an eye on. This is on VMware using a paravirtualized LSI SCSI controller: # udevadm info -r --query=symlink /dev/sda /dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:0:0 No entry below /dev/disk/by-id at all. -- Stefan