* check the right path <facepalm>
* behave if the directory doesn't exist at all yet
Fixes: #2922
Signed-off-by: Sage Weil <sage@inktank.com>
fi
if [ $type = "mon" ]; then
- get_conf mon_data "/var/run/ceph/mon/ceph-$id" "mon data"
- if ! find "$mon_data" -maxdepth 0 -empty | read; then
+ get_conf mon_data "/var/lib/ceph/mon/ceph-$id" "mon data"
+ if test -d $mon_data && ! find "$mon_data" -maxdepth 0 -empty | read; then
echo "ERROR: $name mon_data directory $mon_data is not empty."
echo " Please make sure that it is empty before running mkcephfs."
exit 1