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

 
 
LinkBack Thread Tools
 
Old 11-24-2008, 01:42 PM
Radek Vykydal
 
Default Lets make sure to use the Volume Group size getter function (#468944).

Joel Granados Moreno wrote:

Hi Joel,
the ways of lvm size computations are dark and twisted, I think
the patch would break computing of clamped PV size based on
non-default PE size chosen by user in UI.

When creating new volume group, origrequest is instance of
VolumeGroupRequestSpec

with default physical extent size. In VG editor, user can change physical
extent size in combox, that is why the patched method takes curpe argument
that passes the selected value.
With the patch, origvgrequest.getActualSize would use default value of
origrequest.pesize

(not reflecting actual UI setting) when calling lvm.clampPVSize.

---

iw/lvm_dialog_gui.py | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py
index 8b40890..8efd96e 100644
--- a/iw/lvm_dialog_gui.py
+++ b/iw/lvm_dialog_gui.py
@@ -818,17 +818,10 @@ class VolumeGroupEditor:
return pv

def computeVGSize(self, pvlist, curpe):


here curpe contains user's choice of physical extension size in UI

- availSpaceMB = 0L
- for id in pvlist:
- pvreq = self.partitions.getRequestByID(id)
- pvsize = pvreq.getActualSize(self.partitions, self.diskset)
- # have to clamp pvsize to multiple of PE
- pvsize = lvm.clampPVSize(pvsize, curpe)


pv size is clamped according to curpe

-
- availSpaceMB = availSpaceMB + pvsize
-
+ import pdb; pdb.set_trace()
+ availSpaceMB = self.origvgrequest.getActualSize(self.partitions, self.diskset)
log.debug("computeVGSize: vgsize is %s" % (availSpaceMB,))

pv size is clamped in getActualSize call according to
origvgrequest.pesize which

is not updated with user's choices in UI combobox.

- return availSpaceMB
+ return availSpaceMB

def computeLVSpaceNeeded(self, logreqs, pesize):

neededSpaceMB = 0



The logic of computing of VG size in patched method seem same as in
origvgrequest.getActualSize to me, only the pesize used to clamp PV sizes
makes difference.

Radek

_______________________________________________
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 04:43 PM.

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