kpartx_id: Generate persistent symlinks for 'wwn'
[multipath-tools/.git] / kpartx / kpartx.rules
index 8640094..b96ec89 100644 (file)
@@ -20,12 +20,16 @@ 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}"
+ENV{DM_WWN}=="?*", ENV{DM_PART}!="?*", \
+       SYMLINK+="disk/by-id/wwn-$env{DM_WWN}"
 
 # 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}"
+ENV{DM_WWN}=="?*", ENV{DM_PART}=="?*", \
+       SYMLINK+="disk/by-id/wwn-$env{DM_WWN}-part$env{DM_PART}"
 
 # Create dm tables for partitions
 ENV{DM_STATE}!="SUSPENDED", ENV{DM_UUID}=="mpath-*", \