diff options
author | Joel Granados Moreno <jgranado@redhat.com> | 2009-02-26 16:40:19 +0100 |
---|---|---|
committer | Joel Granados Moreno <jgranado@redhat.com> | 2009-02-26 23:20:09 +0100 |
commit | 6c6a206bd8dfc6910fc4061274bd4f054400c838 (patch) | |
tree | 2574c81634b047938367c026fabb2b12e017e147 | |
parent | e9539fe1006ed7025b5826b06c34aa235f166e83 (diff) | |
download | anaconda-6c6a206bd8dfc6910fc4061274bd4f054400c838.tar.gz anaconda-6c6a206bd8dfc6910fc4061274bd4f054400c838.tar.xz anaconda-6c6a206bd8dfc6910fc4061274bd4f054400c838.zip |
LVM VG size is not same as the device where PV is. (#480793)
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.
-rw-r--r-- | autopart.py | 2 | ||||
-rw-r--r-- | partRequests.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/autopart.py b/autopart.py index 2938d9b9b..2c6f5e8b2 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 26b77f05a..f90752549 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 |