]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
add support for rocksdb and wal on the same partition in non-collocated
authorKai Wembacher <kai@ktwe.de>
Thu, 13 Dec 2018 07:42:49 +0000 (08:42 +0100)
committerSébastien Han <seb@redhat.com>
Thu, 20 Dec 2018 13:21:14 +0000 (14:21 +0100)
Signed-off-by: Kai Wembacher <kai@ktwe.de>
(cherry picked from commit a273ed7f6038b51d3ddb5198d4f3ab57d45bc328)

group_vars/osds.yml.sample
roles/ceph-osd/defaults/main.yml
roles/ceph-osd/tasks/scenarios/non-collocated.yml

index 82a3b48d6302be042bd0b4224798c2e383923e20..c9bc1b21fadb87b729053bdc084767acbcdd84c4 100644 (file)
@@ -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"
index 62f19bc7deb81d7159591a903fe7777aeb00e8c1..33c84bff3d20d85ba7bb1544a09092d5042697a8 100644 (file)
@@ -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"
index 92b09d3ce67a131d367f039f8f36810e2f445ef2..26df149a179e41838eedb9eb6042769589e1a31b 100644 (file)
     - 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