]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: set a 1G extent size when creating vgs
authorAndrew Schoen <aschoen@redhat.com>
Thu, 29 Nov 2018 19:44:07 +0000 (13:44 -0600)
committerJan Fajerski <jfajerski@suse.com>
Tue, 29 Oct 2019 16:35:51 +0000 (17:35 +0100)
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 <aschoen@redhat.com>
(cherry picked from commit 4a1b97efc87f3df15a39a76de074b4791f3528ca)

src/ceph-volume/ceph_volume/api/lvm.py
src/ceph-volume/ceph_volume/tests/api/test_lvm.py

index 74f21cd4947a465f9ffbd1240d5ccd070f6936df..87f64881b506eae7ac971bd10fe105e42028932f 100644 (file)
@@ -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
index ce9c3b87afb065de40d5d6728d83d5333cc86fd2..203c148f9a744267ec0aa4fdc96f5f88efebc81a 100644 (file)
@@ -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):