summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2018-07-09 15:23:25 -0600
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-07-10 09:55:57 +0200
commit9eb0fc32d6cb63e71f2cfc1e7dd34c3ede4b48a3 (patch)
treed2fa82339a68e6d791ff315438606deeec369a0b /rules
parent0fad72faee7e79ac51ca20713dca85d343152152 (diff)
downloadsystemd-9eb0fc32d6cb63e71f2cfc1e7dd34c3ede4b48a3.tar.gz
rules: Add by-id symlinks for persistent memory
This patch adds a by-id symlink to persistent memory namespace if it exports a uuid attribute. The result looks like the following example: # ls -l /dev/disk/by-id/* lrwxrwxrwx 1 root root 13 Jul 9 15:24 pmem-206dcdfe-69b7-4e86-a01b-f540621ce62e -> ../../pmem1.2 lrwxrwxrwx 1 root root 13 Jul 9 15:24 pmem-73840bf1-4e74-4ba4-a9c8-8248934c07c8 -> ../../pmem1.1 lrwxrwxrwx 1 root root 13 Jul 9 15:24 pmem-8137bdfd-3c4d-4b26-b326-21da3d4cd4e5 -> ../../pmem1.4 lrwxrwxrwx 1 root root 13 Jul 9 15:24 pmem-f43d1b6e-3300-46cb-8afc-06d66a7c16f6 -> ../../pmem1.3 Signed-off-by: Keith Busch <keith.busch@intel.com>
Diffstat (limited to 'rules')
-rw-r--r--rules/60-persistent-storage.rules3
1 files changed, 3 insertions, 0 deletions
diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
index 8ddb7577c1..f682efe2d4 100644
--- a/rules/60-persistent-storage.rules
+++ b/rules/60-persistent-storage.rules
@@ -52,6 +52,9 @@ KERNEL=="cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}!="?*", IMPORT{program}="s
KERNEL=="sd*|sr*|cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
KERNEL=="sd*|cciss*", ENV{DEVTYPE}=="partition", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
+# PMEM devices
+KERNEL=="pmem*", ENV{DEVTYPE}=="disk", ATTRS{uuid}=="?*", SYMLINK+="disk/by-id/pmem-$attr{uuid}"
+
# FireWire
KERNEL=="sd*[!0-9]|sr*", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}"
KERNEL=="sd*[0-9]", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}-part%n"