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