Skip to content

Commit

Permalink
Don't adjust actual lv size based on md metadata space requirements.
Browse files Browse the repository at this point in the history
We adjusted the amount of disk space needed, but we didn't alter the
planned device size.
  • Loading branch information
dwlehman committed Jul 28, 2015
1 parent 426e1e4 commit 547dd71
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions blivet/devicefactory.py
Expand Up @@ -1306,13 +1306,6 @@ def _get_child_factory_kwargs(self):

def _get_new_device(self, *args, **kwargs):
""" Create and return the factory device as a StorageDevice. """

if self.container_raid_level and self.container_size in [SIZE_POLICY_AUTO,
SIZE_POLICY_MAX]:
# container pushed to the limit, but we need some extra space for
# metadata, so we need to make the LV smaller
extra_md_space = lvm.LVM_PE_SIZE * len(self.disks) * 5
kwargs["size"] -= extra_md_space
return self.storage.newLV(*args, **kwargs)

def _set_name(self):
Expand Down

2 comments on commit 547dd71

@vpodzime
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we alter the planned device size too instead? Or does this calculation happen in some other place? Or do we want to drop this extra space for metadata from our calculations? If yes, we need to remove it in a few more places.

@dwlehman
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a separate calculation for the required disk/pv space (_get_total_space), which includes extra space for metadata. Having created the needed space in the PVs, there is no need to adjust the device size at all.

Please sign in to comment.