summaryrefslogtreecommitdiffstats
path: root/storage/devicelibs/dm.py
diff options
context:
space:
mode:
Diffstat (limited to 'storage/devicelibs/dm.py')
-rw-r--r--storage/devicelibs/dm.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/storage/devicelibs/dm.py b/storage/devicelibs/dm.py
index 29df1266e..c118d510c 100644
--- a/storage/devicelibs/dm.py
+++ b/storage/devicelibs/dm.py
@@ -67,6 +67,14 @@ def dm_node_from_name(map_name):
log.debug("dm_node_from_name(%s) returning '%s'" % (map_name, dm_node))
return dm_node
+def dm_is_multipath(major, minor):
+ for map in block.dm.maps():
+ dev = map.dev
+ if dev.major == int(major) and dev.minor == int(minor):
+ for table in map.table:
+ if table.type == 'multipath':
+ return True
+
def _get_backing_devnums_from_map(map_name):
ret = []
buf = iutil.execWithCapture("dmsetup",