Re: [PATCH] make sure that we calculate a vg size that is less than the total parition size.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- "Radek Vykydal" <rvykydal@xxxxxxxxxx> wrote:

> 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 

This is true.  and it probably does.  But I think that the probabilities of the partition table being in such a state are quite low.  And the commit that you mentioned fixed bug 217913, which would come back if we were to subtrace 1 pe at that point.

> 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.

It may be safer, or it may take us back to bug 217913

> Or, subtracting one PE in any case, like in Fedora.
> Also, it is patched here only for interactive case, and not for 
> VolumeGroupRequestSpec.getActualSize

Which in this case will not break anything because if the VG already existed the value that is in the VGRequest will be used.  Only if the VG is new will we use the new code.  And after the new VG is created, VG.getActualSize will return whatever the new function calculated.

> used in ks case.
> 
> Radek
> 
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

-- 
Joel Andres Granados
Red Hat / Brno Czech Republic

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux