From: Sage Weil Date: Sat, 23 Feb 2013 00:24:18 +0000 (-0800) Subject: mkcephfs: create mon data dir prior to ceph-mon --mkfs X-Git-Tag: v0.59~134 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=704db850131643b26bafe6594946cacce483c171;p=ceph.git mkcephfs: create mon data dir prior to ceph-mon --mkfs ceph-mon now expects this directory to already exist. Signed-off-by: Sage Weil --- diff --git a/src/mkcephfs.in b/src/mkcephfs.in index 446d56872e85..9c01cb0f0a6f 100644 --- a/src/mkcephfs.in +++ b/src/mkcephfs.in @@ -267,7 +267,8 @@ if [ -n "$initdaemon" ]; then if [ $type = "mon" ]; 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 foo; then + mkdir -p "$mon_data" + if ! find "$mon_data" -maxdepth 0 -empty | read foo; 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