(In reply to Sebastian Parschauer from comment #19) > (In reply to Thomas Blume from comment #17) > > What was the problem using --export? Wouldn't be: > > > > KERNEL=="nvme*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}!="?*", > > IMPORT{program}="scsi_id --export --whitelisted -d $devnode" > > > > sufficient? > > At least this would fit better into the scheme used for the other disk types. > > That doesn't work it picks up "SM951_NVMe_SAMSUNG_256GB__S27ENYAH202887" > instead of "20025386261008f3a". And that link already exists. Actually scsi_id --export creates multiple environment variables. ID_SERIAL ist only one of them and on your machine apparently "SM951_NVMe_SAMSUNG_256GB__S27ENYAH202887". "20025386261008f3a" must be stored in another variable and this is the one that should be used in the rule. However, in my test, calling scsi_id without --export outputs the value of ID_SERIAL. That doesn't seem to be the case on your machine.