From 0be60456ce98d11ca6acf73d7f7a76c4f9dc5309 Mon Sep 17 00:00:00 2001 From: Caleb Boylan Date: Thu, 28 Dec 2017 08:52:02 -0800 Subject: [PATCH] osd: Add support for multipath disks Multipath disks have partitions with a different format than what ceph-ansible currently supports, this update makes ceph-ansible aware of that format so multipath disks can be used as OSDs Signed-off-by: Caleb Boylan --- roles/ceph-osd/tasks/activate_osds.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/ceph-osd/tasks/activate_osds.yml b/roles/ceph-osd/tasks/activate_osds.yml index 7cede4541..7dbf6cc00 100644 --- a/roles/ceph-osd/tasks/activate_osds.yml +++ b/roles/ceph-osd/tasks/activate_osds.yml @@ -3,7 +3,7 @@ # partition. - name: activate osd(s) when device is a disk - command: ceph-disk activate "{{ item }}{%- if 'nvme' in item or 'cciss' in item or 'loop' in item %}{{ 'p' }}{%- endif %}{{ '1' }}" + command: ceph-disk activate "{{ item }}{%- if 'nvme' in item or 'cciss' in item or 'loop' in item %}{{ 'p' }}{%- endif %}{%- if 'mpath' in item %}{{ '-part' }}{%- endif %}{{ '1' }}" with_items: - "{{ devices|unique }}" changed_when: false @@ -14,7 +14,7 @@ - item != '/dev/dead' - name: activate osd(s) when device is a disk (dmcrypt) - command: ceph-disk activate --dmcrypt "{{ item }}{%- if 'nvme' in item or 'cciss' in item or 'loop' in item %}{{ 'p' }}{%- endif %}{{ '1' }}" + command: ceph-disk activate --dmcrypt "{{ item }}{%- if 'nvme' in item or 'cciss' in item or 'loop' in item %}{{ 'p' }}{%- endif %}{%- if 'mpath' in item %}{{ '-part' }}{%- endif %}{{ '1' }}" with_items: - "{{ devices|unique }}" changed_when: false