--- storage/devices.py | 9 ++++++--- storage/devicetree.py | 14 ++++++++------ storage/udev.py | 9 ++++++--- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/storage/devices.py b/storage/devices.py index 8034f1e..d29148c 100644 --- a/storage/devices.py +++ b/storage/devices.py @@ -2204,10 +2204,13 @@ class MDRaidArrayDevice(StorageDevice): StorageDevice.__init__(self, name, format=format, exists=exists, minor=minor, size=size, parents=parents, sysfsPath=sysfsPath) - if level is not None: + + self.level = level + if level == "container": + self._type = "mdcontainer" + elif level is not None: self.level = mdraid.raidLevel(level) - else: - self.level = level + self.uuid = uuid self._totalDevices = numeric_type(totalDevices) self._memberDevices = numeric_type(memberDevices) diff --git a/storage/devicetree.py b/storage/devicetree.py index 6a1ad61..91a9f4b 100644 --- a/storage/devicetree.py +++ b/storage/devicetree.py @@ -888,8 +888,10 @@ class DeviceTree(object): return True # Ignore partitions found on the raw disks which are part of a - # dmraidset - for set in self.getDevicesByType("dm-raid array"): + # biosraidset + sets = self.getDevicesByType("dm-raid array") + sets[len(sets):] = self.getDevicesByType("mdcontainer") + for set in sets: for disk in set.parents: if disk.name == os.path.basename(os.path.dirname(sysfs_path)): return True @@ -1189,13 +1191,13 @@ class DeviceTree(object): log.debug("%s is a cdrom" % name) if device is None: device = self.addUdevOpticalDevice(info) - elif udev_device_is_dmraid(info): + elif udev_device_is_biosraid(info): # This is special handling to avoid the "unrecognized disklabel" - # code since dmraid member disks won't have a disklabel. We + # code since biosraid member disks won't have a disklabel. We # use a StorageDevice because DiskDevices need disklabels. # Quite lame, but it doesn't matter much since we won't use # the StorageDevice instances for anything. - log.debug("%s is part of a dmraid" % name) + log.debug("%s is part of a biosraid" % name) if device is None: device = StorageDevice(name, major=udev_device_get_major(info), @@ -1498,7 +1500,7 @@ class DeviceTree(object): if format_type == "crypto_LUKS": # luks/dmcrypt kwargs["name"] = "luks-%s" % uuid - elif format_type == "linux_raid_member": + elif format_type in formats.mdraid.MDRaidMember._udevTypes: # mdraid try: kwargs["mdUuid"] = udev_device_get_md_uuid(info) diff --git a/storage/udev.py b/storage/udev.py index 7571baf..e97d5d5 100644 --- a/storage/udev.py +++ b/storage/udev.py @@ -318,16 +318,19 @@ def udev_device_get_lv_sizes(info): return [float(s) / 1024 for s in sizes] -def udev_device_is_dmraid(info): +def udev_device_is_biosraid(info): # Note that this function does *not* identify raid sets. # Tests to see if device is parto of a dmraid set. - # dmraid and mdriad have the same ID_FS_USAGE string, ID_FS_TYPE has a + # dmraid and mdraid have the same ID_FS_USAGE string, ID_FS_TYPE has a # string that describes the type of dmraid (isw_raid_member...), I don't # want to maintain a list and mdraid's ID_FS_TYPE='linux_raid_member', so # dmraid will be everything that is raid and not linux_raid_member from formats.dmraid import DMRaidMember + from formats.mdraid import MDRaidMember if info.has_key("ID_FS_TYPE") and \ - info["ID_FS_TYPE"] in DMRaidMember._udevTypes: + (info["ID_FS_TYPE"] in DMRaidMember._udevTypes or \ + info["ID_FS_TYPE"] in MDRaidMember._udevTypes) and \ + info["ID_FS_TYPE"] != "linux_raid_member": return True return False -- 1.6.2.2 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list