def __init__(self, devices, args): self.args = args self.devices = devices self.osds_per_device = args.osds_per_device # TODO: add --fast-devices and --slow-devices so these can be customized self.hdds = [device for device in devices if device.sys_api['rotational'] == '1'] self.ssds = [device for device in devices if device.sys_api['rotational'] == '0'] self.computed = {'osds': []} self.block_db_size = prepare.get_block_db_size(lv_format=False) or disk.Size(b=0) self.system_vgs = lvm.VolumeGroups() self.dbs_needed = len(self.hdds) * self.osds_per_device self.validate() self.compute()
def get_block_size(self): if self.args.block_db_size: return disk.Size(b=self.args.block_db_size) else: return prepare.get_block_db_size(lv_format=False) or disk.Size(b=0)
def get_block_size(self): if self.args.block_db_size: return disk.Size(b=self.args.block_db_size) else: return prepare.get_block_db_size(lv_format=False) or disk.Size(b=0)