ceph-ansible/roles/ceph-osd/tasks/scenarios/osd_directory.yml

34 lines
1.0 KiB
YAML
Raw Normal View History

---
## SCENARIO 4: USE A DIRECTORY INSTEAD OF A DISK FOR OSD
# NOTE (leseb): we do not check the filesystem underneath the directory
# so it is really up to you to configure this properly.
# Declaring more than one directory on the same filesystem will confuse Ceph.
- name: create osd directories
2015-10-19 09:24:47 +08:00
file:
path: "{{ item }}"
state: directory
owner: "ceph"
group: "ceph"
with_items: "{{ osd_directories }}"
# 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
- name: prepare osd directory disk(s)
command: "ceph-disk prepare --cluster {{ cluster }} {{ item }}"
with_items: "{{ osd_directories }}"
changed_when: false
when: osd_directory
- name: activate osd(s)
2014-09-05 03:14:11 +08:00
command: "ceph-disk activate {{ item }}"
with_items: "{{ osd_directories }}"
changed_when: false
- name: start and add osd target(s) to the systemd sequence
service:
name: ceph.target
state: started
enabled: yes