From c9e4e3d9076f69d541b5648c9edad431b9bacc17 Mon Sep 17 00:00:00 2001 From: Paul Bourke Date: Fri, 30 Sep 2016 09:56:20 +0100 Subject: Unmount Ceph OSD disks as part of destroy Change-Id: Ic0b0f5efb12eab58e7872b30611a39640dc44cc2 Closes-Bug: #1629224 --- tools/cleanup-host | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools') diff --git a/tools/cleanup-host b/tools/cleanup-host index 59d463b22..392b92fee 100755 --- a/tools/cleanup-host +++ b/tools/cleanup-host @@ -47,6 +47,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 -- cgit v1.2.3