summaryrefslogtreecommitdiffstats
path: root/partitioning.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2001-08-09 19:36:32 +0000
committerMatt Wilson <msw@redhat.com>2001-08-09 19:36:32 +0000
commit1f81ca85e7d164f9006b1a8728a63498a73c7636 (patch)
treeded38bcae7cf95b771e311cfb0cc8fa698b631e4 /partitioning.py
parent8de857f3a5e11140f792bc8a3e017f136edfb49c (diff)
downloadanaconda-1f81ca85e7d164f9006b1a8728a63498a73c7636.tar.gz
anaconda-1f81ca85e7d164f9006b1a8728a63498a73c7636.tar.xz
anaconda-1f81ca85e7d164f9006b1a8728a63498a73c7636.zip
Reconstrict an existing RAIDDevice for those devices mentioned in the fstab. This
is so we can get the SW RAID member that is bootable when we go to install GRUB. (#51213)
Diffstat (limited to 'partitioning.py')
-rw-r--r--partitioning.py21
1 files changed, 14 insertions, 7 deletions
diff --git a/partitioning.py b/partitioning.py
index 1d6c34a05..730fd9805 100644
--- a/partitioning.py
+++ b/partitioning.py
@@ -213,10 +213,17 @@ def get_raid_devices(requests):
return raidRequests
-def register_raid_device(mdname):
- if mdname in DiskSet.mdList:
- raise ValueError, "%s is already in the mdList!" % (mdname,)
- DiskSet.mdList.append(mdname)
+def register_raid_device(mdname, devices, level, numActive):
+ for dev, devices, level, numActive in DiskSet.mdList:
+ if mdname == dev:
+ raise ValueError, "%s is already in the mdList!" % (mdname,)
+ DiskSet.mdList.append((mdname, devices, level, numActive))
+
+def lookup_raid_device(mdname):
+ for dev, devices, level, numActive in DiskSet.mdList:
+ if mdname == dev:
+ return (dev, devices, level, numActive)
+ raise KeyError, "md device not found"
# returns a list of tuples of raid partitions which can be used or are used
# with whether they're used (0 if not, 1 if so) eg (part, size, used)
@@ -1189,7 +1196,7 @@ class DiskSet:
self.disks = {}
def startAllRaid(self):
- DiskSet.mdList.extend(raid.startAllRaid(self.driveList ()))
+ DiskSet.mdList.extend(raid.startAllRaid(self.driveList()))
def stopAllRaid(self):
raid.stopAllRaid(DiskSet.mdList)
@@ -1217,7 +1224,7 @@ class DiskSet:
if label:
labels[node] = label
- for dev in DiskSet.mdList:
+ for dev, devices, level, numActive in DiskSet.mdList:
label = isys.readExt2Label(dev)
if label:
labels[dev] = label
@@ -1229,7 +1236,7 @@ class DiskSet:
self.startAllRaid()
- for dev in self.mdList:
+ for dev, devices, level, numActive in self.mdList:
# XXX multifsify.
# XXX NOTE! reiserfs isn't supported on software raid devices.
if not fsset.isValidExt2 (dev):