[PATCH 2/6] Get md member and array UUIDs for format ctor from udev.

David Lehman dlehman at redhat.com
Mon Aug 4 15:14:58 UTC 2014


Since the data is in udev we can save the trouble of running mdadm -E
here and this also saves us from having to cache the md metadata in the
devicetree.
---
 blivet/devicetree.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index e6e908f..8471e62 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -1810,11 +1810,10 @@ class DeviceTree(object):
             # luks/dmcrypt
             kwargs["name"] = "luks-%s" % uuid
         elif format_type in formats.mdraid.MDRaidMember._udevTypes:
-            info.update(mdraid.mdexamine(device.path))
-
             # mdraid
             try:
-                kwargs["mdUuid"] = udev.device_get_md_uuid(info)
+                # ID_FS_UUID contains the array UUID
+                kwargs["mdUuid"] = udev.device_get_uuid(info)
             except KeyError:
                 log.warning("mdraid member %s has no md uuid", name)
 
-- 
1.9.3



More information about the anaconda-patches mailing list