From: Andrew Schoen Date: Thu, 29 Nov 2018 19:44:07 +0000 (-0600) Subject: ceph-volume: set a 1G extent size when creating vgs X-Git-Tag: v13.2.7~23^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=63affa8a4083f8e382b3db9335621fdc2e2d47ab;p=ceph.git ceph-volume: set a 1G extent size when creating vgs This allows us to create larger lvs than the default of 4m and is easier to reason about when sizing the lvs as everythign is reported as GBs. Signed-off-by: Andrew Schoen (cherry picked from commit 4a1b97efc87f3df15a39a76de074b4791f3528ca) --- diff --git a/src/ceph-volume/ceph_volume/api/lvm.py b/src/ceph-volume/ceph_volume/api/lvm.py index 74f21cd4947a..87f64881b506 100644 --- a/src/ceph-volume/ceph_volume/api/lvm.py +++ b/src/ceph-volume/ceph_volume/api/lvm.py @@ -434,6 +434,8 @@ def create_vg(devices, name=None, name_prefix=None): name = "ceph-%s" % str(uuid.uuid4()) process.run([ 'vgcreate', + '-s', + '1G', '--force', '--yes', name] + devices diff --git a/src/ceph-volume/ceph_volume/tests/api/test_lvm.py b/src/ceph-volume/ceph_volume/tests/api/test_lvm.py index ce9c3b87afb0..203c148f9a74 100644 --- a/src/ceph-volume/ceph_volume/tests/api/test_lvm.py +++ b/src/ceph-volume/ceph_volume/tests/api/test_lvm.py @@ -634,7 +634,7 @@ class TestCreateVG(object): monkeypatch.setattr(api, 'get_vg', lambda **kw: True) api.create_vg(['/dev/sda', '/dev/sdb'], name='ceph') result = fake_run.calls[0]['args'][0] - expected = ['vgcreate', '--force', '--yes', 'ceph', '/dev/sda', '/dev/sdb'] + expected = ['vgcreate', '-s', '1G', '--force', '--yes', 'ceph', '/dev/sda', '/dev/sdb'] assert result == expected def test_name_prefix(self, monkeypatch, fake_run):