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 > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 06-15-2011, 10:32 PM
David Lehman
 
Default Fix check for whether new lv size will fit in vg's free space.

vgSpacedUsed aligns the lv size so we don't get tripped up by
partially utilized PE.
---
pyanaconda/storage/devices.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/storage/devices.py b/pyanaconda/storage/devices.py
index 8c78aad..d908b76 100644
--- a/pyanaconda/storage/devices.py
+++ b/pyanaconda/storage/devices.py
@@ -2492,11 +2492,11 @@ class LVMLogicalVolumeDevice(DMDevice):
def _setSize(self, size):
size = self.vg.align(numeric_type(size))
log.debug("trying to set lv %s size to %dMB" % (self.name, size))
- if size <= (self.vg.freeSpace + self._size):
+ if size <= self.vg.freeSpace + self.vgSpaceUsed:
self._size = size
self.targetSize = size
else:
- log.debug("failed to set size: %dMB short" % (size - (self.vg.freeSpace + self._size),))
+ log.debug("failed to set size: %dMB short" % (size - (self.vg.freeSpace + self.vgSpaceUsed),))
raise ValueError("not enough free space in volume group")

size = property(StorageDevice._getSize, _setSize)
--
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 02:47 AM.

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