]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: batch mixed type scenarios have no need to calulate data size
authorAndrew Schoen <aschoen@redhat.com>
Tue, 4 Dec 2018 20:23:47 +0000 (14:23 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Thu, 6 Dec 2018 18:29:47 +0000 (12:29 -0600)
We know with a mixed type scenario the device used for data will be used
at 100% capacity. This means we do not need to be explict when asking
for the size of the data lvs, which avoids rounding errors with very
small device sizes.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
src/ceph-volume/ceph_volume/devices/lvm/strategies/bluestore.py
src/ceph-volume/ceph_volume/devices/lvm/strategies/filestore.py

index abb54c543be5b5a4f851e7004b5faae0356b06cf..f3898d759a71167054b63e3499422f6d154ca0ba 100644 (file)
@@ -292,9 +292,8 @@ class MixedType(object):
         # block.db vg from before
         for osd in self.computed['osds']:
             data_path = osd['data']['path']
-            data_lv_size = disk.Size(b=osd['data']['size']).gb.as_int()
             data_vg = data_vgs[data_path]
-            data_lv_extents = data_vg.sizing(size=data_lv_size)['extents']
+            data_lv_extents = data_vg.sizing(parts=1)['extents']
             data_lv = lvm.create_lv(
                 'osd-block', data_vg.name, extents=data_lv_extents, uuid_name=True
             )
index b94cc6ea38d545fa9e488c7a84d74f829e2d60ae..a9d04e127564f9a6851b979488cb1e5ba09805f8 100644 (file)
@@ -386,9 +386,8 @@ class MixedType(object):
 
         for osd in self.computed['osds']:
             data_path = osd['data']['path']
-            data_lv_size = disk.Size(b=osd['data']['size']).gb.as_int()
             data_vg = data_vgs[data_path]
-            data_lv_extents = data_vg.sizing(size=data_lv_size)['extents']
+            data_lv_extents = data_vg.sizing(parts=1)['extents']
             data_lv = lvm.create_lv(
                 'osd-data', data_vg.name, extents=data_lv_extents, uuid_name=True
             )