2015-03-12 11:50:38 +08:00
|
|
|
---
|
2015-05-16 00:27:41 +08:00
|
|
|
- name: create filesystem pools
|
2017-10-12 20:55:53 +08:00
|
|
|
command: "{{ docker_exec_cmd }} ceph --cluster {{ cluster }} osd pool create {{ item.name }} {{ item.pgs }}"
|
2015-06-26 06:26:03 +08:00
|
|
|
changed_when: false
|
2017-10-12 20:55:53 +08:00
|
|
|
with_items:
|
|
|
|
- "{{ cephfs_pools }}"
|
2015-03-12 11:50:38 +08:00
|
|
|
|
2017-02-23 23:06:04 +08:00
|
|
|
- name: check if ceph filesystem already exists
|
2017-09-27 20:13:39 +08:00
|
|
|
command: "{{docker_exec_cmd }} ceph --cluster {{ cluster }} fs get {{ cephfs }}"
|
2017-02-23 23:06:04 +08:00
|
|
|
register: check_existing_cephfs
|
|
|
|
changed_when: false
|
|
|
|
failed_when: false
|
|
|
|
|
2015-07-24 02:01:43 +08:00
|
|
|
- name: create ceph filesystem
|
2017-09-27 20:13:39 +08:00
|
|
|
command: "{{ docker_exec_cmd}} ceph --cluster {{ cluster }} fs new {{ cephfs }} {{ cephfs_metadata }} {{ cephfs_data }}"
|
2015-06-26 06:26:03 +08:00
|
|
|
changed_when: false
|
2017-10-12 20:55:53 +08:00
|
|
|
when:
|
|
|
|
- check_existing_cephfs.rc != 0
|
2016-10-04 23:40:20 +08:00
|
|
|
|
|
|
|
- name: allow multimds
|
2017-09-27 20:13:39 +08:00
|
|
|
command: "{{ docker_exec_cmd }} ceph --cluster {{ cluster }} fs set {{ cephfs }} allow_multimds true --yes-i-really-mean-it"
|
2016-10-04 23:40:20 +08:00
|
|
|
changed_when: false
|
|
|
|
when:
|
2017-10-13 00:27:36 +08:00
|
|
|
- ceph_release_num[ceph_release] >= ceph_release_num.jewel
|
2017-02-23 23:06:04 +08:00
|
|
|
- mds_allow_multimds
|
2016-10-04 23:40:20 +08:00
|
|
|
|
|
|
|
- name: set max_mds
|
2017-09-27 20:13:39 +08:00
|
|
|
command: "{{ docker_exec_cmd }} ceph --cluster {{ cluster }} fs set {{ cephfs }} max_mds {{ mds_max_mds }}"
|
2016-10-04 23:40:20 +08:00
|
|
|
changed_when: false
|
|
|
|
when:
|
2017-10-13 00:27:36 +08:00
|
|
|
- ceph_release_num[ceph_release] >= ceph_release_num.jewel
|
2017-02-23 23:06:04 +08:00
|
|
|
- mds_allow_multimds
|
|
|
|
- mds_max_mds > 1
|