diff --git a/src/ceph-volume/ceph_volume/devices/lvm/common.py b/src/ceph-volume/ceph_volume/devices/lvm/common.py index 06fc33541a3..6cd8c59b886 100644 --- a/src/ceph-volume/ceph_volume/devices/lvm/common.py +++ b/src/ceph-volume/ceph_volume/devices/lvm/common.py @@ -66,6 +66,7 @@ def common_parser(prog, description): '--data-slots', help=('Intended number of slots on data device. The new OSD gets one' 'of those slots or 1/nth of the available capacity'), + type=int, default=1, ) @@ -110,6 +111,7 @@ def common_parser(prog, description): dest='block_db_slots', help=('Intended number of slots on db device. The new OSD gets one' 'of those slots or 1/nth of the available capacity'), + type=int, default=1, ) @@ -131,6 +133,7 @@ def common_parser(prog, description): dest='block_wal_slots', help=('Intended number of slots on wal device. The new OSD gets one' 'of those slots or 1/nth of the available capacity'), + type=int, default=1, ) diff --git a/src/ceph-volume/ceph_volume/devices/lvm/prepare.py b/src/ceph-volume/ceph_volume/devices/lvm/prepare.py index c602a705fb9..44401094174 100644 --- a/src/ceph-volume/ceph_volume/devices/lvm/prepare.py +++ b/src/ceph-volume/ceph_volume/devices/lvm/prepare.py @@ -178,6 +178,9 @@ class Prepare(object): kwargs = { 'device': device_name, 'tags': tags, + 'slots': getattr(self.args, + 'block_{}_slots'.format(device_type), + 1), } if size != 0: kwargs['size'] = disk.Size.parse(size) @@ -213,6 +216,7 @@ class Prepare(object): lv_name_prefix = "osd-{}".format(device_type) kwargs = {'device': device, 'tags': {'ceph.type': device_type}, + 'slots': self.args.data_slots, } logger.debug('data device size: {}'.format(self.args.data_size)) if self.args.data_size != 0: