fix ceph reboot issue 79/46279/2
authorwutianwei <wutianwei1@huawei.com>
Fri, 27 Oct 2017 03:25:11 +0000 (11:25 +0800)
committerwutianwei <wutianwei1@huawei.com>
Fri, 27 Oct 2017 06:19:52 +0000 (14:19 +0800)
When storage nodes reboot or shutdown,
the partitions of loop device will lose.
We add the command partprobe -s {{loopdevice}} to rc.local,
it will reload the partitions, when boot up the storage nodes.

Change-Id: I31dfca953aa254fa516421a494318b01cd39675c
Signed-off-by: wutianwei <wutianwei1@huawei.com>
deploy/adapters/ansible/roles/storage/tasks/ceph.yml

index e024c67..50476c7 100644 (file)
     line: "losetup -f /var/{{ item }}.img"
     insertbefore: "{{ rc_local_insert_before }}"
   with_items: "{{ ceph_osd_images }}"
+
+- name: Create ceph partitions at boot time
+  lineinfile:
+    dest: "{{ rc_local }}"
+    line: "partprobe -s {{ item }}"
+    insertbefore: "{{ rc_local_insert_before }}"
+  with_items: "{{ ceph_loopback.results | map(attribute='stdout') | list }}"