summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-02-22 16:24:18 -0800
committerSage Weil <sage@inktank.com>2013-02-22 16:24:23 -0800
commit704db850131643b26bafe6594946cacce483c171 (patch)
tree38381519b739af3997727109ac8ab374e5a14f9a
parent10f50d353e3072c621f9924f11bac9f8dbf1a119 (diff)
downloadceph-704db850131643b26bafe6594946cacce483c171.tar.gz
mkcephfs: create mon data dir prior to ceph-mon --mkfs
ceph-mon now expects this directory to already exist. Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r--src/mkcephfs.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mkcephfs.in b/src/mkcephfs.in
index 446d56872e8..9c01cb0f0a6 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