Unmount Ceph OSD disks as part of destroy

This seems to have got lost during repo split. Adding it back in now.

Change-Id: Ic0b0f5efb12eab58e7872b30611a39640dc44cc2
Closes-Bug: #1629224
(cherry picked from commit e1a2f99014a1aeb3697e8ec3c999cdc12380376b)
This commit is contained in:
Paul Bourke 2016-09-30 09:56:20 +01:00 committed by Mark Duggan
parent 9a2df7e5a5
commit e27165edc5
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

@ -42,6 +42,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