valeriyvdovin / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone
923a60
From c9c86577937088e36bcfb67e701aebe51d2cc893 Mon Sep 17 00:00:00 2001
923a60
From: Keith Busch <keith.busch@intel.com>
923a60
Date: Fri, 17 Feb 2017 00:46:06 -0700
923a60
Subject: [PATCH] Export NVMe WWID udev attribute (#5348)
923a60
923a60
We need this for multipath support without relying on NVMe to SCSI
923a60
translations.
923a60
923a60
Signed-off-by: Keith Busch <keith.busch@intel.com>
923a60
923a60
Cherry-picked from: 5c1be4f73082d09011661516c39fb53626d8bdc7
923a60
Resolves: #1503253
923a60
---
923a60
 rules/60-persistent-storage.rules | 1 +
923a60
 1 file changed, 1 insertion(+)
923a60
923a60
diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
923a60
index 10642a1fd8..ba619633b7 100644
923a60
--- a/rules/60-persistent-storage.rules
923a60
+++ b/rules/60-persistent-storage.rules
923a60
@@ -27,6 +27,7 @@ KERNEL=="nvme*[0-9]n*[0-9]", ATTR{wwid}=="?*", SYMLINK+="disk/by-id/nvme-$attr{w
923a60
 KERNEL=="nvme*[0-9]n*[0-9]p*[0-9]", ENV{DEVTYPE}=="partition", ATTRS{wwid}=="?*", SYMLINK+="disk/by-id/nvme-$attr{wwid}-part%n"
923a60
 
923a60
 KERNEL=="nvme*[0-9]n*[0-9]", ENV{DEVTYPE}=="disk", ATTRS{serial}=="?*", ENV{ID_SERIAL_SHORT}="$attr{serial}"
923a60
+KERNEL=="nvme*[0-9]n*[0-9]", ENV{DEVTYPE}=="disk", ATTRS{wwid}=="?*", ENV{ID_WWN}="$attr{wwid}"
923a60
 KERNEL=="nvme*[0-9]n*[0-9]", ENV{DEVTYPE}=="disk", ATTRS{model}=="?*", ENV{ID_SERIAL_SHORT}=="?*", ENV{ID_SERIAL}="$attr{model}_$env{ID_SERIAL_SHORT}", SYMLINK+="disk/by-id/nvme-$env{ID_SERIAL}", OPTIONS="string_escape=replace"
923a60
 
923a60
 KERNEL=="nvme*[0-9]n*[0-9]p*[0-9]", ENV{DEVTYPE}=="partition", ATTRS{serial}=="?*", ENV{ID_SERIAL_SHORT}="$attr{serial}"