aboutsummaryrefslogtreecommitdiff
path: root/tools/cleanup-host
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-04-12 07:11:08 +0000
committerGerrit Code Review <review@openstack.org>2017-04-12 07:11:08 +0000
commit3371152960d66a8eeededc560083b72f0a9d969f (patch)
treebaa63b221bce9962af1cb13e78034912ef4a74fd /tools/cleanup-host
parentf1759c3a1c83f9a2957bac6915f852c1e3c046c9 (diff)
parente27165edc5dd9c9f2539a5ed3e0e66f65f3ec934 (diff)
downloadkolla-ansible-3371152960d66a8eeededc560083b72f0a9d969f.tar.gz
kolla-ansible-3371152960d66a8eeededc560083b72f0a9d969f.zip
Merge "Unmount Ceph OSD disks as part of destroy"
Diffstat (limited to 'tools/cleanup-host')
-rwxr-xr-xtools/cleanup-host5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/cleanup-host b/tools/cleanup-host
index 4d4c93eab..9800b7083 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