diff --git a/group_vars/osds.yml.sample b/group_vars/osds.yml.sample index 68ab3ddab..b37da6031 100644 --- a/group_vars/osds.yml.sample +++ b/group_vars/osds.yml.sample @@ -44,11 +44,19 @@ dummy: # Declare devices to be used as block.db devices #dedicated_devices: -# - /dev/sda -# - /dev/sdb +# - /dev/sdx +# - /dev/sdy #dedicated_devices: [] +# Declare devices to be used as block.wal devices + +#bluestore_wal_devices: +# - /dev/nvme0n1 +# - /dev/nvme0n2 + +#bluestore_wal_devices: [] + #'osd_auto_discovery' mode prevents you from filling out the 'devices' variable above. # Device discovery is based on the Ansible fact 'ansible_devices' # which reports all the devices on a system. If chosen, all the disks diff --git a/library/ceph_volume.py b/library/ceph_volume.py index a963a027b..8398a876a 100644 --- a/library/ceph_volume.py +++ b/library/ceph_volume.py @@ -280,6 +280,7 @@ def batch(module, container_image): journal_size = module.params.get('journal_size', None) block_db_size = module.params.get('block_db_size', None) block_db_devices = module.params.get('block_db_devices', None) + wal_devices = module.params.get('wal_devices', None) dmcrypt = module.params.get('dmcrypt', None) osds_per_device = module.params.get('osds_per_device', 1) @@ -321,6 +322,9 @@ def batch(module, container_image): if block_db_devices: cmd.extend(['--db-devices', ' '.join(block_db_devices)]) + if wal_devices: + cmd.extend(['--wal-devices', ' '.join(wal_devices)]) + return cmd @@ -508,6 +512,7 @@ def run_module(): journal_size=dict(type='str', required=False, default='5120'), block_db_size=dict(type='str', required=False, default='-1'), block_db_devices=dict(type='list', required=False, default=[]), + wal_devices=dict(type='list', required=False, default=[]), report=dict(type='bool', required=False, default=False), containerized=dict(type='str', required=False, default=False), osd_fsid=dict(type='str', required=False), diff --git a/roles/ceph-osd/defaults/main.yml b/roles/ceph-osd/defaults/main.yml index 783f07a60..25f7e4295 100644 --- a/roles/ceph-osd/defaults/main.yml +++ b/roles/ceph-osd/defaults/main.yml @@ -36,11 +36,19 @@ devices: [] # Declare devices to be used as block.db devices #dedicated_devices: -# - /dev/sda -# - /dev/sdb +# - /dev/sdx +# - /dev/sdy dedicated_devices: [] +# Declare devices to be used as block.wal devices + +#bluestore_wal_devices: +# - /dev/nvme0n1 +# - /dev/nvme0n2 + +bluestore_wal_devices: [] + #'osd_auto_discovery' mode prevents you from filling out the 'devices' variable above. # Device discovery is based on the Ansible fact 'ansible_devices' # which reports all the devices on a system. If chosen, all the disks diff --git a/roles/ceph-osd/tasks/scenarios/lvm-batch.yml b/roles/ceph-osd/tasks/scenarios/lvm-batch.yml index 0b11f3a14..ce1c1c7b8 100644 --- a/roles/ceph-osd/tasks/scenarios/lvm-batch.yml +++ b/roles/ceph-osd/tasks/scenarios/lvm-batch.yml @@ -11,6 +11,7 @@ journal_size: "{{ journal_size }}" block_db_size: "{{ block_db_size }}" block_db_devices: "{{ dedicated_devices | unique if dedicated_devices | length > 0 else omit }}" + wal_devices: "{{ bluestore_wal_devices | unique if bluestore_wal_devices | length > 0 else omit }}" action: "batch" environment: CEPH_VOLUME_DEBUG: 1