aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPaul Bourke <paul.bourke@oracle.com>2016-09-30 09:56:20 +0100
committerPaul Bourke (pbourke) <paul.bourke@oracle.com>2016-11-03 13:12:43 +0000
commitc9e4e3d9076f69d541b5648c9edad431b9bacc17 (patch)
tree4952240d3f2bfd21f19b8fe9688fddbdc0e45b36 /tools
parent80c4d7e401d3c97a344d440f8c219e83dff377df (diff)
downloadkolla-c9e4e3d9076f69d541b5648c9edad431b9bacc17.tar.gz
kolla-c9e4e3d9076f69d541b5648c9edad431b9bacc17.zip
Unmount Ceph OSD disks as part of destroy
Change-Id: Ic0b0f5efb12eab58e7872b30611a39640dc44cc2 Closes-Bug: #1629224
Diffstat (limited to 'tools')
-rwxr-xr-xtools/cleanup-host5
1 files changed, 5 insertions, 0 deletions
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