]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
ceph-volume: support splitting db even on collocated scenario
authorGuillaume Abrioux <gabrioux@ibm.com>
Tue, 11 Feb 2025 16:00:51 +0000 (16:00 +0000)
committerGuillaume Abrioux <gabrioux@ibm.com>
Mon, 24 Feb 2025 11:56:19 +0000 (11:56 +0000)
commit1e33ff4ea21f2646c9c7a9fed92fe7d593b62691
tree172a044844e0e490d5ca35b4d16127c926deaf62
parentdcffc71c2baf79b780ac73646b9c537da3db8c5e
ceph-volume: support splitting db even on collocated scenario

This change enables ceph-volume to create OSDs where the DB is
explicitly placed on a separate LVM partition, even in collocated
scenarios (i.e., block and DB on the same device).
This helps mitigate BlueStore fragmentation issues.

Given that ceph-volume can't automatically predict a proper default size for the db device,
the idea is to use the `--block-db-size` parameter:

Passing `--block-db-size` and `--db-devices` makes ceph-volume create db devices
on dedicated devices (current implementation):

```
Total OSDs: 2

  Type            Path                                                    LV Size         % of device
----------------------------------------------------------------------------------------------------
  data            /dev/vdb                                                200.00 GB       100.00%
  block_db        /dev/vdd                                                4.00 GB         2.00%
----------------------------------------------------------------------------------------------------
  data            /dev/vdc                                                200.00 GB       100.00%
  block_db        /dev/vdd                                                4.00 GB         2.00%
```

Passing `--block-db-size` without `--db-devices` makes ceph-volume create a separate
LV for db device on the same device (new behavior):
```
Total OSDs: 2

  Type            Path                                                    LV Size         % of device
----------------------------------------------------------------------------------------------------
  data            /dev/vdb                                                196.00 GB       98.00%
  block_db        /dev/vdb                                                4.00 GB         2.00%
----------------------------------------------------------------------------------------------------
  data            /dev/vdc                                                196.00 GB       98.00%
  block_db        /dev/vdc                                                4.00 GB         2.00%
```

This new behavior is supported with the `--osds-per-device` parameter:

```
Total OSDs: 4

  Type            Path                                                    LV Size         % of device
----------------------------------------------------------------------------------------------------
  data            /dev/vdb                                                96.00 GB        48.00%
  block_db        /dev/vdb                                                4.00 GB         2.00%
----------------------------------------------------------------------------------------------------
  data            /dev/vdb                                                96.00 GB        48.00%
  block_db        /dev/vdb                                                4.00 GB         2.00%
----------------------------------------------------------------------------------------------------
  data            /dev/vdc                                                96.00 GB        48.00%
  block_db        /dev/vdc                                                4.00 GB         2.00%
----------------------------------------------------------------------------------------------------
  data            /dev/vdc                                                96.00 GB        48.00%
  block_db        /dev/vdc                                                4.00 GB         2.00%
```

Fixes: https://tracker.ceph.com/issues/69996
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit 7dfeceed4a6996c32df6f56454d91d217ad32926)
src/ceph-volume/ceph_volume/devices/lvm/batch.py
src/ceph-volume/ceph_volume/tests/conftest.py
src/ceph-volume/ceph_volume/tests/devices/lvm/test_batch.py