From 6e0b4614e3911c9ff4ee743345a325e9ec274390 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Thu, 6 Sep 2018 13:03:58 -0400 Subject: [PATCH] ceph-volume lvm.batch make sure data devices don't have existing LVs on bluestore Signed-off-by: Alfredo Deza (cherry picked from commit d2ea49a4e64820fc3cd95c2a6ca8869309638e00) --- .../ceph_volume/devices/lvm/strategies/bluestore.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ceph-volume/ceph_volume/devices/lvm/strategies/bluestore.py b/src/ceph-volume/ceph_volume/devices/lvm/strategies/bluestore.py index 7b6052607af3b..373247b76c95f 100644 --- a/src/ceph-volume/ceph_volume/devices/lvm/strategies/bluestore.py +++ b/src/ceph-volume/ceph_volume/devices/lvm/strategies/bluestore.py @@ -51,6 +51,9 @@ class SingleType(object): # validate minimum size for all devices validators.minimum_device_size(self.devices) + # make sure that data devices do not have any LVs + validators.no_lvm_membership(self.hdds) + def compute(self): """ Go through the rules needed to properly size the lvs, return @@ -231,6 +234,9 @@ class MixedType(object): # validate minimum size for all devices validators.minimum_device_size(self.devices) + # make sure that data devices do not have any LVs + validators.no_lvm_membership(self.hdds) + # add all the size available in solid drives and divide it by the # expected number of osds, the expected output should be larger than # the minimum alllowed for block.db -- 2.39.5