]> git-server-git.apps.pok.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>
Wed, 22 Jan 2020 13:55:50 +0000 (14:55 +0100)
commit8b8913ad3c0b8ceae9f458fd8d3ec292c5ff5eb1
tree661eb8cdd6d3e0510d45f374c7321b79f4823404
parentdd89f467a0b89a436371c314bc69cf71a6e9ce72
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>
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