[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH] Clamp the lv size on LV device creation. (#480793)
- From: Joel Granados Moreno <jgranado redhat com>
- To: anaconda-devel-list redhat com
- Subject: [PATCH] Clamp the lv size on LV device creation. (#480793)
- Date: Tue, 3 Feb 2009 21:36:25 +0100
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
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]