mpathcount.py now updates the host object when the root disk is multipathed as well
as updating pbd objects. (It writes values into other-config to show XenCenter
how many paths are active and how many are failed.)
Normally it is multipathd that calls mpathcount.py, but in the case of the root
disk the /dev/mapper node is created by the initrd before multipathd is started.
Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
fi
fi
+ # If running on multipath root we need to update
+ # the multipath info on the Host object
+ ROOT_PART_MAJOR=$(stat --format=%t /dev/root)
+ DEVICE_MAPPER_MAJOR=$(sed -ne 's/^\([0-9]\+\) device-mapper$/\1/p' /proc/devices)
+ DEVICE_MAPPER_MAJOR_HEX=$(printf "%x" ${DEVICE_MAPPER_MAJOR})
+ if [ "$ROOT_PART_MAJOR" == "$DEVICE_MAPPER_MAJOR_HEX" ] ; then
+ /opt/xensource/sm/mpathcount.py
+ fi
+
if [ -e ${XAPI_STARTUP_COOKIE} ]; then
touch /var/lock/subsys/xapi
echo -n $"start-of-day complete."