ceph plugin installation: umount correct device if it existed.

The loopback device is created for ceph osd. If the directory
${storage_data_dir} has been mounted when create disk, we should
umount ${storage_data_dir} instead of ${storage_data_dir}/drives/sdb1.

Change-Id: Ie9fe81c820c485dab9f049cf5a81c02424925728
Closes-Bug: #1689089
This commit is contained in:
liumk 2017-12-13 15:09:02 +08:00
parent 924b1149c8
commit 38a23d901a

View File

@ -712,7 +712,7 @@ function create_disk {
# Create a loopback disk and format it to XFS.
if [[ -e ${disk_image} ]]; then
if egrep -q ${storage_data_dir} /proc/mounts; then
sudo umount ${storage_data_dir}/drives/sdb1
sudo umount ${storage_data_dir}
sudo rm -f ${disk_image}
fi
fi