From dad4745201d4b3c0b34162896af7af58fafda2f2 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Thu, 5 Apr 2018 09:21:38 -0700 Subject: [PATCH] autotest: attempt to clean up Ceph mount This can be left mounted from a previous build. Try to clean it up before starting up Ceph again. Change-Id: I6273c2bbff53163177ea709dc4f4db4937a00a31 Signed-off-by: Daniel Verkamp Reviewed-on: https://review.gerrithub.io/406627 Tested-by: SPDK Automated Test System Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- scripts/ceph/start.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/ceph/start.sh b/scripts/ceph/start.sh index 11db81f6bf..28fed0bdf4 100755 --- a/scripts/ceph/start.sh +++ b/scripts/ceph/start.sh @@ -15,6 +15,10 @@ mnt_dir=${base_dir}/mnt dev_backend=/dev/ceph image=/var/tmp/ceph_raw.img dev=/dev/loop200 + +umount $dev || true +losetup -d $dev_backend || true + # partition osd if [ -d $base_dir ]; then rm -rf $base_dir