ceph-volume: pass *-slots arguments to LV creation

Fixes: https://tracker.ceph.com/issues/44494

Signed-off-by: Jan Fajerski <jfajerski@suse.com>
This commit is contained in:
Jan Fajerski 2020-03-02 15:16:39 +01:00
parent 4a81b4a2fb
commit 61f0c3af0b
2 changed files with 7 additions and 0 deletions

View File

@ -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,
)

View File

@ -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: