From 4a1b97efc87f3df15a39a76de074b4791f3528ca 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 --- 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 9c77b1141587..aada2186f663 100644 --- a/src/ceph-volume/ceph_volume/api/lvm.py +++ b/src/ceph-volume/ceph_volume/api/lvm.py @@ -428,6 +428,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 3dc1ac6b98a0..7b858a4fc529 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.47.3