diff options
author | Matt Wilson <msw@redhat.com> | 2001-07-23 23:14:52 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2001-07-23 23:14:52 +0000 |
commit | 359958c2cc5b6466bc1afd4f61509accb16b7d78 (patch) | |
tree | 467c31d2f9dee1972933468127f95a464158ce72 /raid.py | |
parent | d32afbc2912f699c3eef6a15c3004daaa8855d16 (diff) | |
download | anaconda-359958c2cc5b6466bc1afd4f61509accb16b7d78.tar.gz anaconda-359958c2cc5b6466bc1afd4f61509accb16b7d78.tar.xz anaconda-359958c2cc5b6466bc1afd4f61509accb16b7d78.zip |
make raid inconsistencies non fatal (#36985)
Diffstat (limited to 'raid.py')
-rw-r--r-- | raid.py | 27 |
1 files changed, 16 insertions, 11 deletions
@@ -19,6 +19,7 @@ import _balkan import isys import os +from log import log def scanForRaid(drives): raidSets = {} @@ -51,9 +52,11 @@ def scanForRaid(drives): if knownLevel != level or knownDisks != totalDisks or \ knownMinor != mdMinor: # Raise hell - raise SystemError, ("raid set inconsistency for md%d: " - "all drives in this raid set do not " - "agree on raid parameters" % (mdMinor,)) + log("raid set inconsistency for md%d: " + "all drives in this raid set do not " + "agree on raid parameters. Skipping raid device", + mdMinor) + continue knownDevices.append(dev) raidSets[raidSet] = (knownLevel, knownDisks, knownMinor, knownDevices) @@ -62,10 +65,11 @@ def scanForRaid(drives): if raidDevices.has_key(mdMinor): if (raidDevices[mdMinor] != raidSet): - raise SystemError, ("raid set inconsistency for md%d: " - "found members of multiple raid sets " - "that claim to be md%d" - % (mdMinor, mdMinor)) + log("raid set inconsistency for md%d: " + "found members of multiple raid sets " + "that claim to be md%d. Using only the first " + "array found.", mdMinor, mdMinor) + continue else: raidDevices[mdMinor] = raidSet @@ -73,10 +77,11 @@ def scanForRaid(drives): for key in raidSets.keys(): (level, totalDisks, mdMinor, devices) = raidSets[key] if len(devices) < totalDisks: - str = ("missing components of raid device md%d. The " - "raid device needs %d drives and only %d were found." - % (mdMinor, len(devices), totalDisks)) - raise SystemError, str + log("missing components of raid device md%d. The " + "raid device needs %d drives and only %d were found. " + "This raid device will not be started.", mdMinor, + len(devices), totalDisks) + continue raidList.append((mdMinor, devices)) return raidList |