diff --git a/releasenotes/notes/unmount-ceph-osds-43b7b59685bff5b4.yaml b/releasenotes/notes/unmount-ceph-osds-43b7b59685bff5b4.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b8f778b55a3a5909f3af85752b2efdaf5ce50fc6 --- /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 4d4c93eabab6e69e3aa2029ec2d60e995218df13..9800b708330602dc93de53f56f0bf33b5384ea3a 100755 --- a/tools/cleanup-host +++ b/tools/cleanup-host @@ -37,6 +37,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