summaryrefslogtreecommitdiffstats
path: root/storage/devicelibs
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2009-05-27 10:49:23 -0400
committerPeter Jones <pjones@redhat.com>2009-08-06 15:37:26 -0400
commit883d99a856ee36c8dcb5e5dfc50fa0cf181bec70 (patch)
tree1084cb2acf1c88cbeff233a4c4858b211f9c42b0 /storage/devicelibs
parentd8b635d3e2cfd1af7c95b246a6428adeb78fecee (diff)
downloadanaconda-883d99a856ee36c8dcb5e5dfc50fa0cf181bec70.tar.gz
anaconda-883d99a856ee36c8dcb5e5dfc50fa0cf181bec70.tar.xz
anaconda-883d99a856ee36c8dcb5e5dfc50fa0cf181bec70.zip
Recognize mpath devices when we see them.
This identifies that a device is part of a multipath, and builds an mpath device for partitioning.
Diffstat (limited to 'storage/devicelibs')
-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",