# 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-*", \
# The name of the kpartx table is the name of the parent table
dmname=$($DMSETUP info -c --noheadings -o name -u $dmuuid)
echo "DM_NAME=$dmname"
+ if [ "$dmname" != ${dmuuid#mpath-} ] ; then
+ echo "DM_MPATH=${dmuuid#mpath-}"
+ fi
# We need the dependencies of the parent table to figure out
# the type if the parent is a multipath table
case "$dmuuid" in
;;
esac
elif [ "$dmtbl" = "mpath" ] ; then
- dmname=$tblname
+ if [ -n "$DM_NAME" -a "$DM_NAME" != "$dmuuid" ] ; then
+ echo "DM_MPATH=$dmuuid"
+ fi
# We need the dependencies of the table to figure out the type
dmdeps=$($DMSETUP deps -u $UUID)
elif [ "$dmtbl" = "dmraid" ] ; then