Skip to content

Commit

Permalink
filestore-to-bluestore: umount partitions before zapping them
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
guits committed Dec 19, 2019
1 parent 2c06678 commit 8056514
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions infrastructure-playbooks/filestore-to-bluestore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,24 @@
- "{{ 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:
Expand Down

0 comments on commit 8056514

Please sign in to comment.