From 704db850131643b26bafe6594946cacce483c171 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 22 Feb 2013 16:24:18 -0800 Subject: [PATCH] mkcephfs: create mon data dir prior to ceph-mon --mkfs ceph-mon now expects this directory to already exist. Signed-off-by: Sage Weil --- src/mkcephfs.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mkcephfs.in b/src/mkcephfs.in index 446d56872e85f..9c01cb0f0a6fc 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 -- 2.39.5