[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH 2/3] Check if LVs still fit when removing a PV from a VG. (#682276)
- From: David Lehman <dlehman redhat com>
- To: anaconda-devel-list redhat com
- Subject: [PATCH 2/3] Check if LVs still fit when removing a PV from a VG. (#682276)
- Date: Wed, 1 Jun 2011 11:54:01 -0500
---
pyanaconda/iw/lvm_dialog_gui.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/pyanaconda/iw/lvm_dialog_gui.py b/pyanaconda/iw/lvm_dialog_gui.py
index cd76c9b..886dc13 100644
--- a/pyanaconda/iw/lvm_dialog_gui.py
+++ b/pyanaconda/iw/lvm_dialog_gui.py
@@ -48,6 +48,11 @@ class VolumeGroupEditor:
parents=pvs, peSize=self.peSize)
vg.voriginSnapshots = self.vg.voriginSnapshots.copy()
for lv in self.lvs.values():
+ # this used to get checked in the LV ctor, but no more if the
+ # PVs are growable because of kickstart's odd sequencing
+ if lv['size'] > vg.freeSpace:
+ raise ValueError("not enough space in VG")
+
_l = LVMLogicalVolumeDevice(lv['name'], vg, format=lv['format'],
size=lv['size'], exists=lv['exists'],
stripes=lv['stripes'],
@@ -301,7 +306,7 @@ class VolumeGroupEditor:
self.pvs.remove(pv)
try:
vg = self.getTempVG()
- except DeviceError as e:
+ except ValueError as e:
self.intf.messageWindow(_("Not enough space"),
_("You cannot remove this physical "
"volume because otherwise the "
--
1.7.3.4
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]