]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
filestore-to-bluestore: umount partitions before zapping them
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 18 Dec 2019 14:48:32 +0000 (15:48 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 19 Dec 2019 08:22:25 +0000 (09:22 +0100)
When an OSD is stopped, it leaves partitions mounted.
We must umount them before zapping them, otherwise error like "Device is
busy" will show up.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1729267
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
infrastructure-playbooks/filestore-to-bluestore.yml

index 00a0c52f4d1572e3821ecec9015410a998945e6e..9b2415824831c1f644bfb54e39676d2d794d18dd 100644 (file)
             - "{{ partlabel.results }}"
           when: item.1.stdout == 'ceph data'
 
+        - name: umount osd data
+          mount:
+            path: "/var/lib/ceph/osd/{{ cluster }}-{{ (item.0.stdout | from_json).whoami }}"
+            state: unmounted
+          with_together:
+            - "{{ simple_scan.results }}"
+            - "{{ partlabel.results }}"
+          when: item.1.stdout == 'ceph data'
+
+        - name: umount osd lockbox
+          mount:
+            path: "/var/lib/ceph/osd-lockbox/{{ (item.0.stdout | from_json).data.uuid }}"
+            state: unmounted
+          with_together:
+            - "{{ simple_scan.results }}"
+            - "{{ partlabel.results }}"
+          when: item.1.stdout == 'ceph data'
+
         - name: ensure dmcrypt for data device is closed
           command: cryptsetup close "{{ (item.0.stdout | from_json).data.uuid }}"
           with_together: