File mpath_id of Package multipath-tools
#!/bin/sh major=$1 minor=$2 mpstatus=$(/sbin/dmsetup status -j $major -m $minor --target multipath) if [ -z "$mpstatus" ]; then exit 1 fi mpid=$(/sbin/dmsetup info -c --noopencount --noheadings -o name -j $major -m $minor) if [ -z "$mpid" ]; then exit 1 fi echo ID_MPATH=\"$mpid\" exit 0