Add md arrays to the devicetree with a md# name rather then md/# (#591970)
When an mdraid array with newer metadata versions is created with a name
of md#, like we do, the name returned from devicelibs.mdraid.examine
is in the form of md/#. However if we use that as device name in the
devicetree, then later on when we scan the mdraid array after it was
brought up by handleUdevMDMemberFormat, we will find a md# device as
that is the sysfs name, think it is a different device and add the
device to the tree a second time, this patch fixes this.
pyanaconda/storage/devicetree.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py
index 67c8f65..ef53db4 100644
@@ -1621,6 +1621,7 @@ class DeviceTree(object):
# md_name can be either md# or md/#
minor = int(md_name[3:]) # strip off leading "md/"
+ md_name = "md%d" % minor # use a regular md# name
minor = int(md_name[2:]) # strip off leading "md"
except (IndexError, ValueError):
Anaconda-devel-list mailing list