]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
lvm: add sizing arguments to prepare and create.
authorJan Fajerski <jfajerski@suse.com>
Tue, 10 Dec 2019 13:56:37 +0000 (14:56 +0100)
committerJan Fajerski <jfajerski@suse.com>
Thu, 27 Feb 2020 12:53:56 +0000 (13:53 +0100)
commit4f4d3c2b1aa26dec4cf0e27165efb24a954bc989
tree97415b84d8cf45257805debb73b7811e24e04b77
parenta124effe43f2bfbb4b0958a9b7f1195a17450d15
lvm: add sizing arguments to prepare and create.

This adds options to size to-be-created LVs in the prepare and create
subcommands. Sizing can be done explicitly by passing a sizes or
implicitly by specifying the number of slots per [data|journal|wal|db]
device. The former will try to create a LV of the specified size and use
that to create OSDs if it succeeds. The latter will carve up the device
size into $n slots and use one of those slots for the to-be-created OSD.
If partitions or LVs are passed these options are ignored.
This also creates the foundation to move to byte-based sizing, by moving
VolumeGroup lvm querying and size calculation to bytes as the base unit.

Fixes: https://tracker.ceph.com/issues/43299
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
(cherry picked from commit 8b8913ad3c0b8ceae9f458fd8d3ec292c5ff5eb1)
src/ceph-volume/ceph_volume/api/lvm.py
src/ceph-volume/ceph_volume/devices/lvm/common.py
src/ceph-volume/ceph_volume/devices/lvm/prepare.py
src/ceph-volume/ceph_volume/tests/api/test_lvm.py
src/ceph-volume/ceph_volume/tests/devices/lvm/test_prepare.py