Joel Granados Moreno wrote:
Hi list:
Here is my second wack at solving this issue (468944). It is VERY ugly. but I felt corned and see no other way out. The bug ocurrs when the pv size (partition size) is a multiple of the pe size. This means that when you clamp the pv size in the vg size calculation there will be no difference between the unclamped and the clamped value. This means that we are calculating the vg available size as the sum of the total sizes of all the pvs (partitions) that compose the vg, which is not accurate. So to make sure that the vg size is less than the total sum of the pv sizes (partition sizes) I take away 1 pe. Its ugly I know...
When calculating VG size available for LVs we don't count space used for
metadata in.
Most of the time, clamping will protect us.
Moreover, in Fedora subtracting of one PE after clamping protects us for
sure
(though it is probably overkill). This subtracting was patched in rhel 5.3
(commit 68ab7d2823836ee90), but not fw ported to Fedora.
So subtracting one PE in rhel 5.3 as in the patch, should solve the bug
case, but as it
happens here only when clamped size is equal to partition size, it could
appear in another corner case when the partition size is clamped only by
size less then is needed
for metadata - then we wouldn't subtract the PE. I think subtracting
some reserve
(but what size?) for metadata from partition size before clamping, is
better in this sense.
Or, subtracting one PE in any case, like in Fedora.
Also, it is patched here only for interactive case, and not for
VolumeGroupRequestSpec.getActualSize
used in ks case.
Radek
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list