]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume lvm.batch make sure data devices don't have existing LVs on bluestore
authorAlfredo Deza <adeza@redhat.com>
Thu, 6 Sep 2018 17:03:58 +0000 (13:03 -0400)
committerAlfredo Deza <adeza@redhat.com>
Mon, 10 Sep 2018 13:17:11 +0000 (09:17 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
src/ceph-volume/ceph_volume/devices/lvm/strategies/bluestore.py

index 7b6052607af3bdb8e7c8c4c8689cce1d541d25cd..373247b76c95ff9dccdce8c61c4071248b70a788 100644 (file)
@@ -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