FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Edubuntu User

 
 
LinkBack Thread Tools
 
Old 06-01-2011, 04:54 PM
David Lehman
 
Default Check if LVs still fit when removing a PV from a VG. (#682276)

---
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

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 01:11 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org