diff --git a/pym/calculate/lib/utils/partition.py b/pym/calculate/lib/utils/partition.py index 66a7a58..619a13b 100644 --- a/pym/calculate/lib/utils/partition.py +++ b/pym/calculate/lib/utils/partition.py @@ -630,13 +630,15 @@ class RoundableVolumesBuilder(VolumesBuilder): def is_roundable_size(self, size): if (size is not VolumesBuilder.SizeAllFree and size and - abs(size - self.free_size) < size * self.rounding): + abs(size - self.free_size) < min(size * self.rounding, + 100 * Sizes.M)): return True return False def refined_size(self, size): if size is VolumesBuilder.SizeAllFree and self.minimal: - if self.minimal > self.free_size: + if (self.minimal > self.free_size and + not self.is_roundable_size(self.minimal)): return self.minimal if self.last_partition: if self.is_roundable_size(size): @@ -1040,7 +1042,7 @@ class SchemeBuilder(object): self.update = False self.calculate = False self.rootall = False - self.rounding = 0.01 + self.rounding = 0.1 self.vgname = "calculate" self.extsize = None