diskimage-builder/diskimage_builder
Steve Baker d090126c66 Parse block device lvm lvs size attributes
The block device lvm lvs `size` attribute was passed directly to
lvcreate, so using units M, G means base 2. All other block device
size values are parsed with accepted conventions of M, B being base 10
and MiB, GiB being base 2.

lvm lvs `size` attributes are now parsed the same as other size
attributes. This improves consistency and makes it practical to
calculate volume sizes to fill the partition size. This means existing
size values will now create slightly smaller volumes. Previous sizes
can be restored by changing the unit to MiB, GiB, or increasing the
value for a base 10 unit.

The impact on this change should be minimal, the only known uses of lvm
volumes (TripleO, and element block-device-efi-lvm) uses extents
percentage instead of size. The smaller sizes can always be increased
after deployment.

Requested sizes will also be rounded down to align with physical
extents (4MiB). Previously specifying a value which did not align on
4MiB would consume an extra extent which could unexpectedly consume
more than the partition size.

Change-Id: Ia109cc5105071d82cc895d8d9cb85bc47da20a7a
2022-07-06 11:27:42 +12:00
..
block_device Parse block device lvm lvs size attributes 2022-07-06 11:27:42 +12:00
elements Merge "update default python for gentoo to 3.10" 2022-07-01 00:13:39 +00:00
lib Correctly create DIB_ENV variable and dib_environment file 2022-02-28 16:46:16 +03:00
tests Switch from unittest2 compat methods to Python 3.x methods 2020-07-07 11:11:28 +08:00
__init__.py Bump hacking to 0.9.x series 2014-07-21 10:15:41 +02:00
disk_image_create.py Remove virtualenv activation 2020-06-11 16:49:15 +10:00
element_dependencies.py Uncap hacking 2020-02-24 10:34:46 +11:00
logging_config.py Add timestamp output filter 2017-06-16 15:58:50 +10:00
paths.py Move diskimage-image-create to an entry point 2016-11-02 05:12:11 +00:00
version.py Create docs site containing element READMEs 2015-02-10 11:45:35 -08:00