[rhinstaller/blivet/pulls/207 master] Better calculate required space for LVM cache

dwlehman installerbot-noreply at redhat.com
Mon Aug 24 20:50:25 UTC 2015


> @@ -614,10 +633,10 @@ def _setSize(self, size):
>          log.debug("trying to set lv %s size to %s", self.name, size)
>          # Don't refuse to set size if we think there's not enough space in the
>          # VG for an existing LV, since it's existence proves there is enough
> -        # space for it.
> +        # space for it. A similar reasoning applies to shrinking the LV.
>          if not self.exists and \
>             not isinstance(self, LVMThinLogicalVolumeDevice) and \
> -           size > self.vg.freeSpace + self.vgSpaceUsed:
> +           size > self.size and size > self.vg.freeSpace + self.vgSpaceUsed:

This is for the case when you are reducing the size of a planned/non-existent lv at a point where the vg's model is messed up to the point of thinking it has too little free space even for a reduced version of an lv is already contains?

-- 
To view this pull request on github, visit https://github.com/rhinstaller/blivet/pull/207#discussion_r37802805


More information about the anaconda-patches mailing list