From 63affa8a4083f8e382b3db9335621fdc2e2d47ab Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Thu, 29 Nov 2018 13:44:07 -0600 Subject: [PATCH] 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) --- src/ceph-volume/ceph_volume/api/lvm.py | 2 ++ src/ceph-volume/ceph_volume/tests/api/test_lvm.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ceph-volume/ceph_volume/api/lvm.py b/src/ceph-volume/ceph_volume/api/lvm.py index 74f21cd4947a4..87f64881b506e 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 ce9c3b87afb06..203c148f9a744 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): -- 2.39.5