I'm not following this you seem to be mixing and matching dmraid and mdraid in the description here, also you seem to be changing the format of the disk in the code, not of the partition, which atleast for mdraid seems wrong to me. Can you please explain ? Regards, Hans On 04/14/2009 06:19 PM, Joel Granados Moreno wrote:
I have seen instances where Udev says there is an lvm format in device and also asserts that there is dmraid format in device# (the partition). This tries to verify that all the parents of the mdarray that are partitions are contained in a disk that has format = None. --- storage/devicetree.py | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/storage/devicetree.py b/storage/devicetree.py index 7540ff2..ed50ad8 100644 --- a/storage/devicetree.py +++ b/storage/devicetree.py @@ -1558,6 +1558,25 @@ class DeviceTree(object): lvm.lvm_cc_addFilterRejectRegexp(parent.name) return + elif device.type == "mdarray": + # Make sure Udev does not screw us up. I have seen instances where + # Udev says there is an lvm format in device and also asserts that + # there is dmraid format in device# (the partition). This tries to + # verify that all the parents of the mdarray that are partitions + # are contained in a disk that has format = None. + # FIXME: We should clean the metadata on disk somehow. + # FIXME: should we ask the user? + for parent in device.parents: + if parent.type == "partition" and \ + parent.parents[0].format.type is not None: + format = formats.getFormat(None) + log.error("Automatically corrected fomrat error on %s. " + "Changed from %s to %s." % + (device.name,parent.parents[0].format, format)) + parent.parents[0].format = format + + + def populate(self): """ Locate all storage devices. """ # each iteration scans any devices that have appeared since the
_______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list