From e27165edc5dd9c9f2539a5ed3e0e66f65f3ec934 Mon Sep 17 00:00:00 2001 From: Paul Bourke Date: Fri, 30 Sep 2016 09:56:20 +0100 Subject: [PATCH] Unmount Ceph OSD disks as part of destroy This seems to have got lost during repo split. Adding it back in now. Change-Id: Ic0b0f5efb12eab58e7872b30611a39640dc44cc2 Closes-Bug: #1629224 (cherry picked from commit e1a2f99014a1aeb3697e8ec3c999cdc12380376b) --- releasenotes/notes/unmount-ceph-osds-43b7b59685bff5b4.yaml | 3 +++ tools/cleanup-host | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 releasenotes/notes/unmount-ceph-osds-43b7b59685bff5b4.yaml diff --git a/releasenotes/notes/unmount-ceph-osds-43b7b59685bff5b4.yaml b/releasenotes/notes/unmount-ceph-osds-43b7b59685bff5b4.yaml new file mode 100644 index 0000000000..b8f778b55a --- /dev/null +++ b/releasenotes/notes/unmount-ceph-osds-43b7b59685bff5b4.yaml @@ -0,0 +1,3 @@ +--- +features: + - Unmount Ceph OSD disks as part of 'kolla-ansible destroy' diff --git a/tools/cleanup-host b/tools/cleanup-host index c319ce0b83..ee7a50c7bb 100755 --- a/tools/cleanup-host +++ b/tools/cleanup-host @@ -42,6 +42,11 @@ fi echo "Creating a fstab backup..." sudo cp /etc/fstab /etc/fstab_backup +echo "Unmounting Ceph OSD disks" +for mount in $(mount | awk '/\/var\/lib\/ceph/ { print $3 }'); do + umount $mount +done + echo "Removing ceph references from fstab..." sudo sed -i '/\/var\/lib\/ceph\/osd\//d' /etc/fstab