> Checking that path [/dev/nvme0n1] and is same as link [nvme-nvme.8086-
> 43564d44343334353030424e34303041474e-494e54454c205353445045444d453430304734-00000001]
this is the wwid symlink, created by:
SYMLINK+="disk/by-id/nvme-$attr{wwid}"
> Checking that path [/dev/nvme0n1] and is same as link [nvme-
> INTEL_SSDPEDME400G4_CVMD434500BN400AGN]
this is the model/serial symlink, created by:
ENV{ID_SERIAL}="$attr{model}_$env{ID_SERIAL_SHORT}", SYMLINK+="disk/by-id/nvme-$env{ID_SERIAL}"
> This is the script that gathers the block devices. I looked into it and it seems that it is
> doing the right thing as it is getting the by-id link based on the /dev/nvme* path.
def _path_to_idpath(path):
"""Searches dev_disk_byid for a device symlinked to /dev/[path]"""
if os.path.exists(dev_disk_byid):
for link in os.listdir(dev_disk_byid):
if os.path.exists(path) and os.path.samefile( os.path.join(dev_disk_byid, link), path): return os.path.join(dev_disk_byid, link)
return None
this just searches all the symlinks in /dev/disk/by-id/ and uses the first one that points to the target device or partition. That's fine if you don't actually care about which of the symlinks you use.
> The result is being rejected because the file path is currently to long for the field.
well the max path size needs to be increased then.
> Checking that path [/dev/nvme0n1] and is same as link [nvme-nvme.8086- 53030424e343030 41474e- 494e54454c20535 3445045444d4534 30304734- 00000001]
> 43564d443433343
this is the wwid symlink, created by: ="disk/ by-id/nvme- $attr{wwid} "
SYMLINK+
> Checking that path [/dev/nvme0n1] and is same as link [nvme- 00G4_CVMD434500 BN400AGN]
> INTEL_SSDPEDME4
this is the model/serial symlink, created by: SERIAL} ="$attr{ model}_ $env{ID_ SERIAL_ SHORT}" , SYMLINK+ ="disk/ by-id/nvme- $env{ID_ SERIAL} "
ENV{ID_
> This is the script that gathers the block devices. I looked into it and it seems that it is
> doing the right thing as it is getting the by-id link based on the /dev/nvme* path.
def _path_to_ idpath( path): exists( dev_disk_ byid): dev_disk_ byid): exists( path) and os.path.samefile(
os.path. join(dev_ disk_byid, link), path):
return os.path. join(dev_ disk_byid, link)
"""Searches dev_disk_byid for a device symlinked to /dev/[path]"""
if os.path.
for link in os.listdir(
if os.path.
return None
this just searches all the symlinks in /dev/disk/by-id/ and uses the first one that points to the target device or partition. That's fine if you don't actually care about which of the symlinks you use.
> The result is being rejected because the file path is currently to long for the field.
well the max path size needs to be increased then.