[dm-devel] [PATCH 27/31] kpartx.rules: generate type-name links only for multipath devices

Martin Wilck mwilck at suse.com
Sat Sep 2 22:38:56 UTC 2017


... and their partitions. This rule generates irritiating symlinks
like /dev/disk/by-id/raid-${VG}-${LV} for LVM LVs otherwise.

Signed-off-by: Martin Wilck <mwilck at suse.com>
---
 kpartx/kpartx.rules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kpartx/kpartx.rules b/kpartx/kpartx.rules
index b05181a8..6c8f4d53 100644
--- a/kpartx/kpartx.rules
+++ b/kpartx/kpartx.rules
@@ -14,7 +14,7 @@ IMPORT{program}=="kpartx_id %M %m $env{DM_UUID}"
 
 ENV{DM_UDEV_LOW_PRIORITY_FLAG}!="1", OPTIONS+="link_priority=50"
 
-ENV{DM_UUID}=="?*", ENV{DM_TYPE}=="?*" \
+ENV{DM_UUID}=="*mpath-*", ENV{DM_TYPE}=="?*" \
 	SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}"
 
 # Create persistent links for multipath tables
-- 
2.14.0




More information about the dm-devel mailing list