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

 
 
LinkBack Thread Tools
 
Old 02-03-2009, 07:36 PM
Joel Granados Moreno
 
Default Clamp the lv size on LV device creation. (#480793)

We have managed to plug most pe size errors from the grow logic. But
sometimes when LV do not go threw the grow logic they do not get
clamped. This patch helps avoid troubles with unclamped non-growable
LVs.
---
partRequests.py | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/partRequests.py b/partRequests.py
index 2942fa6..26b77f0 100644
--- a/partRequests.py
+++ b/partRequests.py
@@ -855,7 +855,18 @@ class LogicalVolumeRequestSpec(RequestSpec):
"""Return a device which can be solidified."""
vg = partitions.getRequestByID(self.volumeGroup)
vgname = vg.volumeGroupName
- self.dev = fsset.LogicalVolumeDevice(vgname, self.size,
+
+ # we must pass the clamped size just in case. When the request has
+ # gone through a grow process, it will have the clamped size. But if
+ # it is not-growable, we need to make sure. Don't touch if its
+ # preexisting. We dont change self.size, because we don't want to be
+ # intrusive.
+ size = self.size
+ if self.preexist != 1:
+ vgreq = partitions.getRequestByID(self.volumeGroup)
+ size = lvm.clampLVSizeRequest(size, vgreq.pesize)
+
+ self.dev = fsset.LogicalVolumeDevice(vgname, size,
self.logicalVolumeName,
existing = self.preexist)
return self.dev
--
1.6.0.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 02-03-2009, 07:41 PM
Hans de Goede
 
Default Clamp the lv size on LV device creation. (#480793)

Joel Granados Moreno wrote:

We have managed to plug most pe size errors from the grow logic. But
sometimes when LV do not go threw the grow logic they do not get
clamped. This patch helps avoid troubles with unclamped non-growable
LVs.


Looks good,

Regards,

Hans

_______________________________________________
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 12:31 PM.

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