Merge "Unmount Ceph OSD disks as part of destroy"

This commit is contained in:
Jenkins 2017-04-12 07:11:08 +00:00 committed by Gerrit Code Review
commit 3371152960
2 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,3 @@
---
features:
- Unmount Ceph OSD disks as part of 'kolla-ansible destroy'

View File

@ -37,6 +37,11 @@ fi
echo "Creating a fstab backup..." echo "Creating a fstab backup..."
sudo cp /etc/fstab /etc/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..." echo "Removing ceph references from fstab..."
sudo sed -i '/\/var\/lib\/ceph\/osd\//d' /etc/fstab sudo sed -i '/\/var\/lib\/ceph\/osd\//d' /etc/fstab