2017-08-07 09:53:46 +02:00
|
|
|
From 68b91b24d8743129b971b047e1189d6f6e772b15 Mon Sep 17 00:00:00 2001
|
2016-09-14 11:43:37 +02:00
|
|
|
From: Hannes Reinecke <hare@suse.de>
|
2017-08-07 09:53:46 +02:00
|
|
|
Date: Tue, 25 Jul 2017 22:19:10 +0800
|
2016-09-14 11:43:37 +02:00
|
|
|
Subject: [PATCH] update lvm udev rules
|
|
|
|
|
|
|
|
References: bnc#78902 bnc#789019 bnc#789020
|
2017-08-07 09:53:46 +02:00
|
|
|
|
|
|
|
Refrshed-by: Eric Ren <zren@suse.com>
|
2016-09-14 11:43:37 +02:00
|
|
|
---
|
|
|
|
udev/10-dm.rules.in | 4 ++++
|
|
|
|
udev/13-dm-disk.rules.in | 9 ++++++---
|
|
|
|
2 files changed, 10 insertions(+), 3 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/udev/10-dm.rules.in b/udev/10-dm.rules.in
|
2017-08-07 09:53:46 +02:00
|
|
|
index b4fa52a..166dd3d 100644
|
2016-09-14 11:43:37 +02:00
|
|
|
--- a/udev/10-dm.rules.in
|
|
|
|
+++ b/udev/10-dm.rules.in
|
2017-08-07 09:53:46 +02:00
|
|
|
@@ -115,6 +115,10 @@ TEST=="dm", ENV{DM_NAME}="$attr{dm/name}", ENV{DM_UUID}="$attr{dm/uuid}", ENV{DM
|
2014-09-25 10:31:10 +02:00
|
|
|
TEST!="dm", IMPORT{program}="(DM_EXEC)/dmsetup info -j %M -m %m -c --nameprefixes --noheadings --rows -o name,uuid,suspended"
|
|
|
|
ENV{DM_SUSPENDED}!="?*", IMPORT{program}="(DM_EXEC)/dmsetup info -j %M -m %m -c --nameprefixes --noheadings --rows -o suspended"
|
|
|
|
|
|
|
|
+# dmsetup export is a SUSE extension to dmsetup
|
|
|
|
+# it is required by some other udev rules in SUSE distro.
|
|
|
|
+IMPORT{program}="(DM_EXEC)/dmsetup export -j %M -m %m"
|
|
|
|
+
|
|
|
|
# dmsetup tool provides suspended state information in textual
|
|
|
|
# form with values "Suspended"/"Active". We translate it to
|
|
|
|
# 0/1 respectively to be consistent with sysfs values.
|
2016-09-14 11:43:37 +02:00
|
|
|
diff --git a/udev/13-dm-disk.rules.in b/udev/13-dm-disk.rules.in
|
2017-08-07 09:53:46 +02:00
|
|
|
index 5355810..0e97e59 100644
|
2016-09-14 11:43:37 +02:00
|
|
|
--- a/udev/13-dm-disk.rules.in
|
|
|
|
+++ b/udev/13-dm-disk.rules.in
|
2014-09-25 10:31:10 +02:00
|
|
|
@@ -14,14 +14,17 @@ ACTION!="add|change", GOTO="dm_end"
|
|
|
|
ENV{DM_UDEV_RULES_VSN}!="?*", GOTO="dm_end"
|
|
|
|
ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}=="1", GOTO="dm_end"
|
|
|
|
|
|
|
|
-SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}"
|
|
|
|
-ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}"
|
|
|
|
+SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}", OPTIONS+="string_escape=replace"
|
|
|
|
+ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}", OPTIONS+="string_escape=replace"
|
|
|
|
|
|
|
|
ENV{DM_SUSPENDED}=="1", GOTO="dm_end"
|
|
|
|
ENV{DM_NOSCAN}=="1", GOTO="dm_watch"
|
|
|
|
+ENV{DM_TARGET_TYPES}=="|*error*", GOTO="dm_end"
|
|
|
|
|
|
|
|
(BLKID_RULE)
|
|
|
|
-ENV{DM_UDEV_LOW_PRIORITY_FLAG}=="1", OPTIONS="link_priority=-100"
|
|
|
|
+ENV{DM_UDEV_LOW_PRIORITY_FLAG}=="1", OPTIONS+="link_priority=-100"
|
|
|
|
+OPTIONS+="watch"
|
|
|
|
+ENV{DM_TARGET_TYPES}=="*snapshot-origin*", OPTIONS+="link_priority=-90"
|
|
|
|
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
|
|
|
|
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
|
2017-08-07 09:53:46 +02:00
|
|
|
ENV{ID_PART_ENTRY_UUID}=="?*", SYMLINK+="disk/by-partuuid/$env{ID_PART_ENTRY_UUID}"
|
2016-09-14 11:43:37 +02:00
|
|
|
--
|
2017-08-07 09:53:46 +02:00
|
|
|
2.10.2
|
2016-09-14 11:43:37 +02:00
|
|
|
|