From e2852eb40eee8642703f03d7984bd3cd2a275dfb Mon Sep 17 00:00:00 2001 From: Kai Wembacher Date: Thu, 13 Dec 2018 08:42:49 +0100 Subject: [PATCH] add support for rocksdb and wal on the same partition in non-collocated Signed-off-by: Kai Wembacher (cherry picked from commit a273ed7f6038b51d3ddb5198d4f3ab57d45bc328) --- group_vars/osds.yml.sample | 7 +++++-- roles/ceph-osd/defaults/main.yml | 7 +++++-- roles/ceph-osd/tasks/scenarios/non-collocated.yml | 15 ++++++++++++++- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/group_vars/osds.yml.sample b/group_vars/osds.yml.sample index 82a3b48d6..c9bc1b21f 100644 --- a/group_vars/osds.yml.sample +++ b/group_vars/osds.yml.sample @@ -128,8 +128,9 @@ dummy: # - The devices listed in 'devices' will get 2 partitions, one for 'block' and one for 'data'. # 'data' is only 100MB big and do not store any of your data, it's just a bunch of Ceph metadata. # 'block' will store all your actual data. -# - The devices in 'dedicated_devices' will get 1 partition for RocksDB DB, called 'block.db' -# and one for RocksDB WAL, called 'block.wal' +# - The devices in 'dedicated_devices' will get one partition for RocksDB DB, called 'block.db' +# and one for RocksDB WAL, called 'block.wal'. To use a single partition for RocksDB and WAL together +# set bluestore_wal_devices to []. # # By default dedicated_devices will represent block.db # @@ -153,6 +154,8 @@ dummy: # By default, if 'bluestore_wal_devices' is empty, it will get the content of 'dedicated_devices'. # If set, then you will have a dedicated partition on a specific device for block.wal. # +# Set bluestore_wal_devices: [] to use the same partition for RocksDB and WAL. +# # Example of what you will get: # [root@ceph-osd0 ~]# blkid /dev/sd* # /dev/sda: PTTYPE="gpt" diff --git a/roles/ceph-osd/defaults/main.yml b/roles/ceph-osd/defaults/main.yml index 62f19bc7d..33c84bff3 100644 --- a/roles/ceph-osd/defaults/main.yml +++ b/roles/ceph-osd/defaults/main.yml @@ -120,8 +120,9 @@ valid_osd_scenarios: # - The devices listed in 'devices' will get 2 partitions, one for 'block' and one for 'data'. # 'data' is only 100MB big and do not store any of your data, it's just a bunch of Ceph metadata. # 'block' will store all your actual data. -# - The devices in 'dedicated_devices' will get 1 partition for RocksDB DB, called 'block.db' -# and one for RocksDB WAL, called 'block.wal' +# - The devices in 'dedicated_devices' will get one partition for RocksDB DB, called 'block.db' +# and one for RocksDB WAL, called 'block.wal'. To use a single partition for RocksDB and WAL together +# set bluestore_wal_devices to []. # # By default dedicated_devices will represent block.db # @@ -145,6 +146,8 @@ dedicated_devices: [] # By default, if 'bluestore_wal_devices' is empty, it will get the content of 'dedicated_devices'. # If set, then you will have a dedicated partition on a specific device for block.wal. # +# Set bluestore_wal_devices: [] to use the same partition for RocksDB and WAL. +# # Example of what you will get: # [root@ceph-osd0 ~]# blkid /dev/sd* # /dev/sda: PTTYPE="gpt" diff --git a/roles/ceph-osd/tasks/scenarios/non-collocated.yml b/roles/ceph-osd/tasks/scenarios/non-collocated.yml index 92b09d3ce..26df149a1 100644 --- a/roles/ceph-osd/tasks/scenarios/non-collocated.yml +++ b/roles/ceph-osd/tasks/scenarios/non-collocated.yml @@ -70,6 +70,18 @@ - not containerized_deployment - item.0.partitions|length == 0 +- name: manually prepare ceph "{{ osd_objectstore }}" non-containerized osd disk(s) with a dedicated device for db + command: "ceph-disk prepare {{ ceph_disk_cli_options }} --block.db {{ item.1 }} {{ item.2 }}" + with_together: + - "{{ parted_results.results | default([]) }}" + - "{{ dedicated_devices }}" + - "{{ devices | unique }}" + when: + - osd_objectstore == 'bluestore' + - not containerized_deployment + - item.0.partitions|length == 0 + - bluestore_wal_devices|length == 0 + - name: manually prepare ceph "{{ osd_objectstore }}" non-containerized osd disk(s) with a dedicated device for db and wal command: "ceph-disk prepare {{ ceph_disk_cli_options }} --block.db {{ item.1 }} --block.wal {{ item.2 }} {{ item.3 }}" with_together: @@ -80,4 +92,5 @@ when: - osd_objectstore == 'bluestore' - not containerized_deployment - - item.0.partitions|length == 0 \ No newline at end of file + - item.0.partitions|length == 0 + - bluestore_wal_devices|length > 0 \ No newline at end of file -- 2.39.5