From: Sage Weil Date: Wed, 29 Jan 2020 17:41:41 +0000 (-0600) Subject: python-common/ceph/deployment/translate: use 'prepare' instead of 'batch' for trivial... X-Git-Tag: v15.1.1~612^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F32972%2Fhead;p=ceph.git 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 --- diff --git a/src/python-common/ceph/deployment/translate.py b/src/python-common/ceph/deployment/translate.py index b7b047374692..3c51db6bdb97 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))