[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH] LVM VG size is not same as the device where PV is. (#480793)
- From: Joel Granados Moreno <jgranado redhat com>
- To: anaconda-devel-list redhat com
- Subject: [PATCH] LVM VG size is not same as the device where PV is. (#480793)
- Date: Thu, 26 Feb 2009 19:33:14 +0100
This takes care of the corner case in which the clamping for the vgsize
does not give us enough space for the PV metadata.
Also revert the previous attempt to fix this in autopart.py. It broke
everything else and is not a good idea.
---
autopart.py | 2 +-
partRequests.py | 2 ++
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/autopart.py b/autopart.py
index 2938d9b..2c6f5e8 100644
--- a/autopart.py
+++ b/autopart.py
@@ -534,7 +534,7 @@ def growLogicalVolumes(diskset, requests):
log("considering %s, start size = %s",req.logicalVolumeName, req.getStartSize())
# get remaining free space
- vgfree = lvm.getVGFreeSpace(vgreq, requests, diskset) - (2*vgreq.pesize)
+ vgfree = lvm.getVGFreeSpace(vgreq, requests, diskset)
# print "vgfree = ", vgfree
if DEBUG_LVM_GROW:
diff --git a/partRequests.py b/partRequests.py
index 26b77f0..f907525 100644
--- a/partRequests.py
+++ b/partRequests.py
@@ -762,6 +762,8 @@ class VolumeGroupRequestSpec(RequestSpec):
size = pvreq.getActualSize(partitions, diskset)
#log("size for pv %s is %s" % (pvid, size))
clamped = lvm.clampPVSize(size, self.pesize)
+ if clamped == long(size):
+ clamped = clamped - (2*self.pesize)
log(" got pv.size of %s, clamped to %s" % (size,clamped))
#log(" clamped size is %s" % (size,))
totalspace = totalspace + clamped
--
1.6.0.6
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]