From 614c0eb77eb44dd74165613c7fe818b8330cf7ba Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 29 Jan 2020 11:41:41 -0600 Subject: [PATCH] python-common/ceph/deployment/translate: use 'prepare' instead of 'batch' for trivial case This works around ceph-volumes lack of support for preexisting LVs in the batch mode. Signed-off-by: Sage Weil --- src/python-common/ceph/deployment/translate.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/python-common/ceph/deployment/translate.py b/src/python-common/ceph/deployment/translate.py index b7b04737469..3c51db6bdb9 100644 --- a/src/python-common/ceph/deployment/translate.py +++ b/src/python-common/ceph/deployment/translate.py @@ -42,6 +42,16 @@ class to_ceph_volume(object): cmd += " --filestore" + # HORRIBLE HACK + if self.spec.objectstore == 'bluestore' and \ + not self.spec.encrypted and \ + not self.spec.osds_per_device and \ + len(data_devices) == 1 and \ + not db_devices and \ + not wal_devices: + cmd = "lvm prepare --bluestore --data %s --no-systemd" % (' '.join(data_devices)) + return cmd + if self.spec.objectstore == 'bluestore': cmd = "lvm batch --no-auto {}".format(" ".join(data_devices)) -- 2.39.5