diff options
-rw-r--r-- | fsset.py | 5 | ||||
-rw-r--r-- | partitioning.py | 18 |
2 files changed, 17 insertions, 6 deletions
@@ -75,8 +75,10 @@ class LabelFactory: if self.labels == None: self.labels = {} - diskset = partitioning.DiskSet() + diskset = partitioning.DiskSet() diskset.openDevices() + diskset.stopAllRaid() + diskset.startAllRaid() labels = diskset.getLabels() del diskset self.reserveLabels(labels) @@ -1113,6 +1115,7 @@ class RAIDDevice(Device): ( 'mkraid', '--really-force', '--configfile', raidtab, node ), stderr = "/dev/tty5", stdout = "/dev/tty5") + partitioning.register_raid_device(self.device) self.isSetup = 1 return node diff --git a/partitioning.py b/partitioning.py index 136568a86..64ee9812a 100644 --- a/partitioning.py +++ b/partitioning.py @@ -213,6 +213,10 @@ 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) # 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) @@ -1225,17 +1229,21 @@ class DiskSet: self.startAllRaid() for dev in self.mdList: - # XXX multifsify + # XXX multifsify. + # XXX NOTE! reiserfs isn't supported on software raid devices. if not fsset.isValidExt2 (dev): continue try: isys.mount(dev, '/mnt/sysimage', readOnly = 1) except SystemError, (errno, msg): - intf.messageWindow(_("Error"), - _("Error mounting filesystem " - "on %s: %s") % (dev, msg)) - continue + try: + isys.mount(dev, '/mnt/sysimage', readOnly = 1, "ext3") + except SystemError, (errno, msg): + intf.messageWindow(_("Error"), + _("Error mounting filesystem " + "on %s: %s") % (dev, msg)) + continue if os.access ('/mnt/sysimage/etc/fstab', os.R_OK): rootparts.append ((dev, "ext2")) isys.umount('/mnt/sysimage') |