Provide correct persistent symlinks for user_friendly_names
[multipath-tools/.git] / kpartx / kpartx.rules
index ba5c6cb..8640094 100644 (file)
@@ -18,10 +18,14 @@ OPTIONS="link_priority=50"
 # Create persistent links for multipath tables
 ENV{DM_UUID}=="mpath-*", \
        SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}"
+ENV{DM_MPATH}=="?*", ENV{DM_PART}!="?*", \
+       SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_MPATH}"
 
 # Create persistent links for partitions
 ENV{DM_PART}=="?*", \
         SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}-part$env{DM_PART}"
+ENV{DM_MPATH}=="?*", ENV{DM_PART}=="?*", \
+       SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_MPATH}-part$env{DM_PART}"
 
 # Create dm tables for partitions
 ENV{DM_STATE}!="SUSPENDED", ENV{DM_UUID}=="mpath-*", \