mirror of https://github.com/ceph/ceph-ansible.git
ceph-osd skip lvm creation if they are already in use
Signed-off-by: Alfredo Deza <adeza@redhat.com>pull/2100/head
parent
d3b427e169
commit
517a2b3feb
|
@ -1,4 +1,12 @@
|
|||
---
|
||||
|
||||
- name: list all lvm osds
|
||||
command: ceph-volume lvm list
|
||||
register: ceph_volume_lvm_list
|
||||
failed_when: False
|
||||
changed_when: False
|
||||
check_mode: no
|
||||
|
||||
- name: use ceph-volume to create filestore osds with dedicated journals
|
||||
command: "ceph-volume --cluster {{ cluster }} lvm create --filestore --data {{ item.data_vg }}/{{ item.data }} --journal {{ item.journal }}"
|
||||
environment:
|
||||
|
@ -7,6 +15,7 @@
|
|||
when:
|
||||
- item.journal_vg is not defined
|
||||
- osd_objectstore == 'filestore'
|
||||
- "'{{ item.data_vg }}/{{ item.data }}' not in ceph_volume_lvm_list.stdout"
|
||||
|
||||
- name: use ceph-volume to create filestore osds with dedicated lv journals
|
||||
command: "ceph-volume --cluster {{ cluster }} lvm create --filestore --data {{ item.data_vg }}/{{ item.data }} --journal {{item.journal_vg }}/{{ item.journal }}"
|
||||
|
@ -16,6 +25,7 @@
|
|||
when:
|
||||
- item.journal_vg is defined
|
||||
- osd_objectstore == 'filestore'
|
||||
- "'{{ item.data_vg }}/{{ item.data }}' not in ceph_volume_lvm_list.stdout"
|
||||
|
||||
- name: use ceph-volume to create bluestore osds with db and wal
|
||||
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 }}"
|
||||
|
@ -28,6 +38,7 @@
|
|||
- item.wal_vg is defined
|
||||
- item.db is defined
|
||||
- item.db_vg is defined
|
||||
- "'{{ item.data_vg }}/{{ item.data }}' not in ceph_volume_lvm_list.stdout"
|
||||
|
||||
- name: use ceph-volume to create bluestore osds with db only
|
||||
command: "ceph-volume --cluster {{ cluster }} lvm create --bluestore --data {{ item.data_vg }}/{{ item.data }} --block.db {{ item.db_vg }}/{{ item.db }}"
|
||||
|
@ -40,6 +51,7 @@
|
|||
- item.wal_vg is not defined
|
||||
- item.db is defined
|
||||
- item.db_vg is defined
|
||||
- "'{{ item.data_vg }}/{{ item.data }}' not in ceph_volume_lvm_list.stdout"
|
||||
|
||||
- name: use ceph-volume to create bluestore osds with wal only
|
||||
command: "ceph-volume --cluster {{ cluster }} lvm create --bluestore --data {{ item.data_vg }}/{{ item.data }} --block.wal {{ item.wal_vg }}/{{ item.wal }}"
|
||||
|
@ -52,6 +64,7 @@
|
|||
- item.wal_vg is defined
|
||||
- item.db is not defined
|
||||
- item.db_vg is not defined
|
||||
- "'{{ item.data_vg }}/{{ item.data }}' not in ceph_volume_lvm_list.stdout"
|
||||
|
||||
- name: use ceph-volume to create bluestore osds with just a data device
|
||||
command: "ceph-volume --cluster {{ cluster }} lvm create --bluestore --data {{ item.data_vg }}/{{ item.data }}"
|
||||
|
@ -64,3 +77,4 @@
|
|||
- item.wal_vg is not defined
|
||||
- item.db is not defined
|
||||
- item.db_vg is not defined
|
||||
- "'{{ item.data_vg }}/{{ item.data }}' not in ceph_volume_lvm_list.stdout"
|
||||
|
|
Loading…
Reference in New Issue