daandemeyer / rpms / systemd

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