diff --git a/src/ceph-osd-prestart.sh b/src/ceph-osd-prestart.sh index ea6666540bb..2e45724299c 100644 --- a/src/ceph-osd-prestart.sh +++ b/src/ceph-osd-prestart.sh @@ -18,6 +18,13 @@ if [ -z "$id" ]; then fi data="/var/lib/ceph/osd/${cluster:-ceph}-$id" + +# assert data directory exists - see http://tracker.ceph.com/issues/17091 +if [ ! -d "$data" ]; then + echo "OSD data directory $data does not exist; bailing out." 1>&2 + exit 1 +fi + journal="$data/journal" if [ -L "$journal" -a ! -e "$journal" ]; then