--- cdrom.image/updates/raid.py 2005/07/02 06:33:16 1.1.1.1 +++ cdrom.image/updates/raid.py 2006/06/09 05:03:00 1.4 @@ -25,7 +25,7 @@ from rhpl.log import log # these arches can have their /boot on RAID and not have their # boot loader blow up -raidBootArches = [ "i386", "x86_64" ] +raidBootArches = [ "i386", "x86_64", "ppc" ] def scanForRaid(drives): """Scans for raid devices on drives. @@ -90,12 +90,22 @@ def scanForRaid(drives): raidList = [] for key in raidSets.keys(): (level, totalDisks, mdMinor, devices) = raidSets[key] - if len(devices) < totalDisks: + if len(devices) == totalDisks - 1 and level in (1, 5, 6): log("missing components of raid device md%d. The " "raid device needs %d drive(s) and only %d (was/were) found. " "This raid device will be started in degraded mode.", mdMinor, totalDisks, len(devices)) -# continue + elif len(devices) == totalDisks - 2 and level == 6: + log("missing components of raid device md%d. The " + "raid device needs %d drive(s) and only %d (was/were) found. " + "This raid device will be started in degraded mode.", mdMinor, + totalDisks, len(devices)) + elif len(devices) < totalDisks: + log("missing components of raid device md%d. The " + "raid device needs %d drive(s) and only %d (was/were) found. " + "This raid device will not be started.", mdMinor, + totalDisks, len(devices)) + continue raidList.append((mdMinor, devices, level, totalDisks)) return raidList @@ -162,9 +172,9 @@ def get_raid_min_members(raidlevel): elif isRaid1(raidlevel): return 1 elif isRaid5(raidlevel): - return 3 + return 2 elif isRaid6(raidlevel): - return 4 + return 2 else: raise ValueError, "invalid raidlevel in get_raid_min_members"