anitazha / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone

Blame SOURCES/0550-Export-NVMe-WWID-udev-attribute-5348.patch

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