2017-07-19 23:05:42 +08:00
|
|
|
---
|
2017-10-27 07:05:52 +08:00
|
|
|
|
|
|
|
- name: list all lvm osds
|
|
|
|
command: ceph-volume lvm list
|
|
|
|
register: ceph_volume_lvm_list
|
|
|
|
failed_when: False
|
|
|
|
changed_when: False
|
|
|
|
check_mode: no
|
|
|
|
|
2017-07-27 00:23:32 +08:00
|
|
|
- name: use ceph-volume to create filestore osds with dedicated journals
|
2017-10-25 05:47:29 +08:00
|
|
|
command: "ceph-volume --cluster {{ cluster }} lvm create --filestore --data {{ item.data_vg }}/{{ item.data }} --journal {{ item.journal }}"
|
2017-10-25 01:44:11 +08:00
|
|
|
environment:
|
|
|
|
CEPH_VOLUME_DEBUG: 1
|
2017-08-23 21:59:57 +08:00
|
|
|
with_items: "{{ lvm_volumes }}"
|
2017-08-31 04:55:16 +08:00
|
|
|
when:
|
|
|
|
- item.journal_vg is not defined
|
2017-11-14 04:29:37 +08:00
|
|
|
- item.data_vg is defined
|
2017-10-24 23:05:58 +08:00
|
|
|
- osd_objectstore == 'filestore'
|
2017-10-27 07:05:52 +08:00
|
|
|
- "'{{ item.data_vg }}/{{ item.data }}' not in ceph_volume_lvm_list.stdout"
|
2017-08-31 04:55:16 +08:00
|
|
|
|
|
|
|
- name: use ceph-volume to create filestore osds with dedicated lv journals
|
2017-10-25 05:47:29 +08:00
|
|
|
command: "ceph-volume --cluster {{ cluster }} lvm create --filestore --data {{ item.data_vg }}/{{ item.data }} --journal {{item.journal_vg }}/{{ item.journal }}"
|
2017-10-25 01:44:11 +08:00
|
|
|
environment:
|
|
|
|
CEPH_VOLUME_DEBUG: 1
|
2017-08-31 04:55:16 +08:00
|
|
|
with_items: "{{ lvm_volumes }}"
|
|
|
|
when:
|
|
|
|
- item.journal_vg is defined
|
2017-11-14 04:29:37 +08:00
|
|
|
- item.data_vg is defined
|
2017-10-24 23:05:58 +08:00
|
|
|
- osd_objectstore == 'filestore'
|
2017-10-27 07:05:52 +08:00
|
|
|
- "'{{ item.data_vg }}/{{ item.data }}' not in ceph_volume_lvm_list.stdout"
|
2017-10-24 23:05:58 +08:00
|
|
|
|
|
|
|
- name: use ceph-volume to create bluestore osds with db and wal
|
2017-10-25 05:47:29 +08:00
|
|
|
command: "ceph-volume --cluster {{ cluster }} lvm create --bluestore --data {{ item.data_vg }}/{{ item.data }} --block.wal {{ item.wal_vg }}/{{ item.wal }} --block.db {{ item.db_vg }}/{{ item.db }}"
|
2017-10-25 01:44:11 +08:00
|
|
|
environment:
|
|
|
|
CEPH_VOLUME_DEBUG: 1
|
2017-10-24 23:05:58 +08:00
|
|
|
with_items: "{{ lvm_volumes }}"
|
|
|
|
when:
|
|
|
|
- osd_objectstore == 'bluestore'
|
2017-11-14 04:29:37 +08:00
|
|
|
- item.data_vg is defined
|
2017-10-24 23:05:58 +08:00
|
|
|
- item.wal is defined
|
|
|
|
- item.wal_vg is defined
|
|
|
|
- item.db is defined
|
|
|
|
- item.db_vg is defined
|
2017-10-27 07:05:52 +08:00
|
|
|
- "'{{ item.data_vg }}/{{ item.data }}' not in ceph_volume_lvm_list.stdout"
|
2017-10-24 23:05:58 +08:00
|
|
|
|
|
|
|
- name: use ceph-volume to create bluestore osds with db only
|
2017-10-25 05:47:29 +08:00
|
|
|
command: "ceph-volume --cluster {{ cluster }} lvm create --bluestore --data {{ item.data_vg }}/{{ item.data }} --block.db {{ item.db_vg }}/{{ item.db }}"
|
2017-10-25 01:44:11 +08:00
|
|
|
environment:
|
|
|
|
CEPH_VOLUME_DEBUG: 1
|
2017-10-24 23:05:58 +08:00
|
|
|
with_items: "{{ lvm_volumes }}"
|
|
|
|
when:
|
|
|
|
- osd_objectstore == 'bluestore'
|
2017-11-14 04:29:37 +08:00
|
|
|
- item.data_vg is defined
|
2017-10-24 23:05:58 +08:00
|
|
|
- item.wal is not defined
|
|
|
|
- item.wal_vg is not defined
|
|
|
|
- item.db is defined
|
|
|
|
- item.db_vg is defined
|
2017-10-27 07:05:52 +08:00
|
|
|
- "'{{ item.data_vg }}/{{ item.data }}' not in ceph_volume_lvm_list.stdout"
|
2017-10-24 23:05:58 +08:00
|
|
|
|
|
|
|
- name: use ceph-volume to create bluestore osds with wal only
|
2017-10-25 05:47:29 +08:00
|
|
|
command: "ceph-volume --cluster {{ cluster }} lvm create --bluestore --data {{ item.data_vg }}/{{ item.data }} --block.wal {{ item.wal_vg }}/{{ item.wal }}"
|
2017-10-25 01:44:11 +08:00
|
|
|
environment:
|
|
|
|
CEPH_VOLUME_DEBUG: 1
|
2017-10-24 23:05:58 +08:00
|
|
|
with_items: "{{ lvm_volumes }}"
|
|
|
|
when:
|
|
|
|
- osd_objectstore == 'bluestore'
|
|
|
|
- item.wal is defined
|
2017-11-14 04:29:37 +08:00
|
|
|
- item.data_vg is defined
|
2017-10-24 23:05:58 +08:00
|
|
|
- item.wal_vg is defined
|
|
|
|
- item.db is not defined
|
|
|
|
- item.db_vg is not defined
|
2017-10-27 07:05:52 +08:00
|
|
|
- "'{{ item.data_vg }}/{{ item.data }}' not in ceph_volume_lvm_list.stdout"
|
2017-10-24 23:05:58 +08:00
|
|
|
|
|
|
|
- name: use ceph-volume to create bluestore osds with just a data device
|
2017-10-25 05:47:29 +08:00
|
|
|
command: "ceph-volume --cluster {{ cluster }} lvm create --bluestore --data {{ item.data_vg }}/{{ item.data }}"
|
2017-10-25 01:44:11 +08:00
|
|
|
environment:
|
|
|
|
CEPH_VOLUME_DEBUG: 1
|
2017-10-24 23:05:58 +08:00
|
|
|
with_items: "{{ lvm_volumes }}"
|
|
|
|
when:
|
|
|
|
- osd_objectstore == 'bluestore'
|
|
|
|
- item.wal is not defined
|
2017-11-14 04:29:37 +08:00
|
|
|
- item.data_vg is defined
|
2017-10-24 23:05:58 +08:00
|
|
|
- item.wal_vg is not defined
|
|
|
|
- item.db is not defined
|
|
|
|
- item.db_vg is not defined
|
2017-10-27 07:05:52 +08:00
|
|
|
- "'{{ item.data_vg }}/{{ item.data }}' not in ceph_volume_lvm_list.stdout"
|
2017-11-14 04:56:51 +08:00
|
|
|
|
|
|
|
- name: use ceph-volume to create filestore osds with dedicated journals and a raw device or partition for data
|
|
|
|
command: "ceph-volume --cluster {{ cluster }} lvm create --filestore --data {{ item.data }} --journal {{ item.journal }}"
|
|
|
|
environment:
|
|
|
|
CEPH_VOLUME_DEBUG: 1
|
|
|
|
with_items: "{{ lvm_volumes }}"
|
|
|
|
when:
|
|
|
|
- item.journal_vg is not defined
|
|
|
|
- item.data_vg is not defined
|
|
|
|
- osd_objectstore == 'filestore'
|
|
|
|
- "'{{ item.data }}' not in ceph_volume_lvm_list.stdout"
|
|
|
|
|
|
|
|
- name: use ceph-volume to create filestore osds with dedicated lv journals and a raw device or partition for data
|
|
|
|
command: "ceph-volume --cluster {{ cluster }} lvm create --filestore --data {{ item.data }} --journal {{item.journal_vg }}/{{ item.journal }}"
|
|
|
|
environment:
|
|
|
|
CEPH_VOLUME_DEBUG: 1
|
|
|
|
with_items: "{{ lvm_volumes }}"
|
|
|
|
when:
|
|
|
|
- item.journal_vg is defined
|
|
|
|
- item.data_vg is not defined
|
|
|
|
- osd_objectstore == 'filestore'
|
|
|
|
- "'{{ item.data }}' not in ceph_volume_lvm_list.stdout"
|
|
|
|
|
|
|
|
- name: use ceph-volume to create bluestore osds with db and wal and a raw device or partition for data
|
|
|
|
command: "ceph-volume --cluster {{ cluster }} lvm create --bluestore --data {{ item.data }} --block.wal {{ item.wal_vg }}/{{ item.wal }} --block.db {{ item.db_vg }}/{{ item.db }}"
|
|
|
|
environment:
|
|
|
|
CEPH_VOLUME_DEBUG: 1
|
|
|
|
with_items: "{{ lvm_volumes }}"
|
|
|
|
when:
|
|
|
|
- osd_objectstore == 'bluestore'
|
|
|
|
- item.data_vg is not defined
|
|
|
|
- item.wal is defined
|
|
|
|
- item.wal_vg is defined
|
|
|
|
- item.db is defined
|
|
|
|
- item.db_vg is defined
|
|
|
|
- "'{{ item.data }}' not in ceph_volume_lvm_list.stdout"
|
|
|
|
|
|
|
|
- name: use ceph-volume to create bluestore osds with db only and a raw device or partition for data
|
|
|
|
command: "ceph-volume --cluster {{ cluster }} lvm create --bluestore --data {{ item.data }} --block.db {{ item.db_vg }}/{{ item.db }}"
|
|
|
|
environment:
|
|
|
|
CEPH_VOLUME_DEBUG: 1
|
|
|
|
with_items: "{{ lvm_volumes }}"
|
|
|
|
when:
|
|
|
|
- osd_objectstore == 'bluestore'
|
|
|
|
- item.data_vg is not defined
|
|
|
|
- item.wal is not defined
|
|
|
|
- item.wal_vg is not defined
|
|
|
|
- item.db is defined
|
|
|
|
- item.db_vg is defined
|
|
|
|
- "'{{ item.data }}' not in ceph_volume_lvm_list.stdout"
|
|
|
|
|
|
|
|
- name: use ceph-volume to create bluestore osds with wal only and a raw device or partition for data
|
|
|
|
command: "ceph-volume --cluster {{ cluster }} lvm create --bluestore --data {{ item.data }} --block.wal {{ item.wal_vg }}/{{ item.wal }}"
|
|
|
|
environment:
|
|
|
|
CEPH_VOLUME_DEBUG: 1
|
|
|
|
with_items: "{{ lvm_volumes }}"
|
|
|
|
when:
|
|
|
|
- osd_objectstore == 'bluestore'
|
|
|
|
- item.wal is defined
|
|
|
|
- item.data_vg is not defined
|
|
|
|
- item.wal_vg is defined
|
|
|
|
- item.db is not defined
|
|
|
|
- item.db_vg is not defined
|
|
|
|
- "'{{ item.data }}' not in ceph_volume_lvm_list.stdout"
|
|
|
|
|
|
|
|
- name: use ceph-volume to create bluestore osds with just a data device and a raw device or partition for data
|
|
|
|
command: "ceph-volume --cluster {{ cluster }} lvm create --bluestore --data {{ item.data }}"
|
|
|
|
environment:
|
|
|
|
CEPH_VOLUME_DEBUG: 1
|
|
|
|
with_items: "{{ lvm_volumes }}"
|
|
|
|
when:
|
|
|
|
- osd_objectstore == 'bluestore'
|
|
|
|
- item.wal is not defined
|
|
|
|
- item.data_vg is not defined
|
|
|
|
- item.wal_vg is not defined
|
|
|
|
- item.db is not defined
|
|
|
|
- item.db_vg is not defined
|
|
|
|
- "'{{ item.data }}' not in ceph_volume_lvm_list.stdout"
|