Unmount Ceph OSD disks as part of destroy

Change-Id: Ic0b0f5efb12eab58e7872b30611a39640dc44cc2
Closes-Bug: #1629224
This commit is contained in:
Paul Bourke 2016-09-30 09:56:20 +01:00 committed by Paul Bourke (pbourke)
parent 80c4d7e401
commit c9e4e3d907
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

@ -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