Joel Granados Moreno wrote:
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.
Looks good to me.
Regards,
Hans
---
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
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list