mirror of
https://github.com/ceph/ceph
synced 2025-01-19 17:41:39 +00:00
mkcephfs: fix mon_data check
* 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>
This commit is contained in:
parent
a4428bd0e1
commit
24a26c6274
@ -266,8 +266,8 @@ if [ -n "$initdaemon" ]; then
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user