Hi, I found User always can not select "Disable dmraid device" on "Advanced Storage Options" This problem will happened on all arch. (this is strange bug.) I did some test on ICH6R with text and graphical mode after applying this attached patch (linx updates). (I can select "Disable dmraid device" and then /dev/mapper/ddf1_raid1 can be changed to /dev/sda and /dev/sdb) Would you review my Patch,please? and if you have a comment, would you give it to me ? thank you very much
diff -uNrp anaconda/iw/autopart_type.py anaconda.new/iw/autopart_type.py --- anaconda/iw/autopart_type.py 2007-05-07 16:07:03.000000000 +0900 +++ anaconda.new/iw/autopart_type.py 2007-05-07 16:13:11.000000000 +0900 @@ -224,6 +224,10 @@ class PartitionTypeWindow(InstallWindow) if not iscsi.has_iscsi(): dxml.get_widget("iscsiRadio").set_sensitive(False) + disable_dmRaid = 0 + if self.diskset.dmList: + dxml.get_widget("radiobutton1").set_sensitive(True) + rc = dialog.run() dialog.hide() if rc == gtk.RESPONSE_CANCEL: @@ -232,10 +236,12 @@ class PartitionTypeWindow(InstallWindow) rc = self.addIscsiDrive() elif dxml.get_widget("zfcpRadio").get_active(): rc = self.addZfcpDrive() + elif dxml.get_widget("radiobutton1").get_active(): + disable_dmRaid = 1 dialog.destroy() if rc != gtk.RESPONSE_CANCEL: - partitioning.partitionObjectsInitialize(self.anaconda) + partitioning.partitionObjectsInitialize(self.anaconda, disable_dmRaid) createAllowedDrivesStore(self.diskset.disks, self.partitions.autoClearPartDrives, self.drivelist, diff -uNrp anaconda/partedUtils.py anaconda.new/partedUtils.py --- anaconda/partedUtils.py 2007-05-07 16:07:03.000000000 +0900 +++ anaconda.new/partedUtils.py 2007-05-07 16:17:25.000000000 +0900 @@ -870,9 +870,11 @@ class DiskSet: del disk self.refreshDevices() - def refreshDevices (self): + def refreshDevices (self, disable = 0): """Reread the state of the disks as they are on disk.""" self.closeDevices() + if disable: + DiskSet.dmList = [] self.disks = {} self.openDevices() diff -uNrp anaconda/partitioning.py anaconda.new/partitioning.py --- anaconda/partitioning.py 2007-03-28 23:10:06.000000000 +0900 +++ anaconda.new/partitioning.py 2007-05-07 16:23:49.000000000 +0900 @@ -25,7 +25,7 @@ from partErrors import * from rhpl.translate import _ -def partitionObjectsInitialize(anaconda): +def partitionObjectsInitialize(anaconda, disable = 0): # shut down all dm devices anaconda.id.diskset.closeDevices() anaconda.id.diskset.stopMdRaid() @@ -35,7 +35,7 @@ def partitionObjectsInitialize(anaconda) # clean slate about drives isys.flushDriveDict() - if anaconda.dir == DISPATCH_BACK: + if anaconda.dir == DISPATCH_BACK and not disable: return # ensure iscsi devs are up @@ -48,7 +48,7 @@ def partitionObjectsInitialize(anaconda) isys.flushDriveDict() # read in drive info - anaconda.id.diskset.refreshDevices() + anaconda.id.diskset.refreshDevices(disable) anaconda.id.partitions.setFromDisk(anaconda.id.diskset) anaconda.id.partitions.setProtected(anaconda.dispatch) diff -uNrp anaconda/textw/partition_text.py anaconda.new/textw/partition_text.py --- anaconda/textw/partition_text.py 2007-05-07 16:07:22.000000000 +0900 +++ anaconda.new/textw/partition_text.py 2007-05-07 16:20:47.000000000 +0900 @@ -1624,7 +1624,7 @@ class PartitionTypeWindow: if rc == "F2": if self.addDriveDialog(screen) != INSTALL_BACK: - partitionObjectsInitialize(anaconda) + partitionObjectsInitialize(anaconda, self.disable_dmRaid) continue if res == TEXT_BACK_CHECK: @@ -1671,6 +1671,9 @@ class PartitionTypeWindow: newdrv.append("Add iSCSI target") if rhpl.getArch() in ("s390", "s390x"): newdrv.append( "Add zFCP LUN" ) + disable_dmRaid = 0 + if self.anaconda.id.diskset.dmList: + newdrv.append( "Disable dmraid device" ) if len(newdrv) == 0: return INSTALL_BACK @@ -1685,6 +1688,9 @@ class PartitionTypeWindow: if button == TEXT_BACK_CHECK: return INSTALL_BACK + if 'Disable dmraid device' in newdrv and choice == (len(newdrv) - 1): + self.disable_dmRaid = 1 + return INSTALL_OK if choice == 1: try: return self.addZFCPDriveDialog(screen)