summaryrefslogtreecommitdiffstats
path: root/iw
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2005-03-07 00:40:34 +0000
committerPeter Jones <pjones@redhat.com>2005-03-07 00:40:34 +0000
commit8b4c702d0c2c6130c5263a4944405efa1301ced9 (patch)
tree6bb5ec58b687b7fa91494d5cb428cc40043b46fc /iw
parent23895daf9d93b31f70875380b5211c3c433927c6 (diff)
downloadanaconda-8b4c702d0c2c6130c5263a4944405efa1301ced9.tar.gz
anaconda-8b4c702d0c2c6130c5263a4944405efa1301ced9.tar.xz
anaconda-8b4c702d0c2c6130c5263a4944405efa1301ced9.zip
* autopart.py: fix growable size log to show IDs instead of python's
<instance> info. log how much free space we're starting with. don't clamp an lv's total size, instead clamp pv's sizes appropriately * lvm.py: remove and recreate all PVs when we do a vgremove, so they don't lose 1 PE each time due to an lvm2 bug. log what lvm commands are being run, since that doesn't go into lvmout. log total vs actual in getVGFreeSpace * partRequests.py: get rid of getPVSize, that way can't work (oopsie). remove bogus check in getActualSize. clamp totalspace for preexisting PVs. clamp each PV's size and trim 1 PE off when computing total space. don't clamp the LV's overall size. * iw/lvm_dialog_gui.py: clamp each PV and trim 1 PE when computing availSpaceMB. Ow. My head hurts. But autopartition actually works, and even shows the same numbers as the editor afterwards.
Diffstat (limited to 'iw')
-rw-r--r--iw/lvm_dialog_gui.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py
index 59a7e5194..6ac470a28 100644
--- a/iw/lvm_dialog_gui.py
+++ b/iw/lvm_dialog_gui.py
@@ -71,8 +71,13 @@ class VolumeGroupEditor:
first = 1
pvlist = self.getSelectedPhysicalVolumes(self.lvmlist.get_model())
for id in pvlist:
+ try:
+ pesize = int(self.peCombo.get_active_value())
+ except:
+ pesize = 32768
pvreq = self.partitions.getRequestByID(id)
- pvsize = pvreq.getPVSize(self.partitions, self.diskset)
+ pvsize = pvreq.getActualSize(self.partitions, self.diskset)
+ pvsize = lvm.clampPVSize(pvsize, pesize) - (pesize/1024)
if first:
minpvsize = pvsize
first = 0
@@ -768,12 +773,13 @@ class VolumeGroupEditor:
availSpaceMB = 0
for id in pvlist:
pvreq = self.partitions.getRequestByID(id)
- pvsize = pvreq.getPVSize(self.partitions, self.diskset)
- pvsize = lvm.clampPVSize(pvsize, curpe)
+ pvsize = pvreq.getActualSize(self.partitions, self.diskset)
+ pvsize = lvm.clampPVSize(pvsize, curpe) - (curpe/1024)
# have to clamp pvsize to multiple of PE
availSpaceMB = availSpaceMB + pvsize
+ log("computeVGSize: vgsize is %s" % (availSpaceMB,))
return availSpaceMB
def computeLVSpaceNeeded(self, logreqs):