ceph-ansible/roles/ceph-osd/tasks/journal_collocation.yml

30 lines
1.1 KiB
YAML
Raw Normal View History

---
## SCENARIO 1: JOURNAL AND OSD_DATA ON THE SAME DEVICE
- include: zap_devices.yml
2014-09-05 03:14:11 +08:00
- include: check_devices.yml
# NOTE (leseb): the prepare process must be parallelized somehow...
# if you have 64 disks with 4TB each, this will take a while
# since Ansible will sequential process the loop
# NOTE (alahouze): if the device is a partition, the parted command below has
# failed, this is why we check if the device is a partition too.
- name: automatic prepare OSD disk(s) without partitions
2014-11-13 22:19:18 +08:00
command: ceph-disk prepare "/dev/{{ item.key }}"
when: ansible_devices is defined and item.value.removable == "0" and item.value.partitions|count == 0 and journal_collocation and osd_auto_discovery
ignore_errors: True
with_dict: ansible_devices
register: prepared_osds
- name: manually Prepare OSD disk(s)
2014-09-05 03:14:11 +08:00
command: "ceph-disk prepare {{ item.2 }}"
2014-11-13 22:19:18 +08:00
when: (item.0.rc != 0 or item.1.rc != 0) and journal_collocation and not osd_auto_discovery
ignore_errors: True
with_together:
- parted.results
- ispartition.results
- devices
2014-09-05 03:14:11 +08:00
- include: activate_osds.yml