From: wutianwei Date: Fri, 27 Oct 2017 03:25:11 +0000 (+0800) Subject: fix ceph reboot issue X-Git-Tag: opnfv-6.0.0~103^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=43b19eaefb31c9fc4c20e7d9402f52ab9542ef9b;p=compass4nfv.git fix ceph reboot issue 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 --- diff --git a/deploy/adapters/ansible/roles/storage/tasks/ceph.yml b/deploy/adapters/ansible/roles/storage/tasks/ceph.yml index e024c671..50476c7b 100644 --- a/deploy/adapters/ansible/roles/storage/tasks/ceph.yml +++ b/deploy/adapters/ansible/roles/storage/tasks/ceph.yml @@ -43,3 +43,10 @@ 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 }}"