summaryrefslogtreecommitdiff
path: root/src/mkcephfs.in
diff options
context:
space:
mode:
authorSage Weil <sage.weil@dreamhost.com>2011-05-19 09:29:11 -0700
committerSage Weil <sage.weil@dreamhost.com>2011-05-19 09:29:11 -0700
commitecb7c961678c4c6f12943964676e33ccfbf2b740 (patch)
treecb7dfde7e34a37957c41f0aab9014d5ae700deda /src/mkcephfs.in
parent0d79f1dedc0ccad304d348eb72e2adb3d55b1316 (diff)
downloadceph-ecb7c961678c4c6f12943964676e33ccfbf2b740.tar.gz
mkcephfs: pick rdir based on whether current daemon is local or not
We need to pick $rdir as local or remote inside the for name loop. Fixes: #1094 Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'src/mkcephfs.in')
-rw-r--r--src/mkcephfs.in13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/mkcephfs.in b/src/mkcephfs.in
index e87709c6690..8558754e58c 100644
--- a/src/mkcephfs.in
+++ b/src/mkcephfs.in
@@ -391,14 +391,6 @@ if [ $allhosts -eq 1 ]; then
trap "rm -rf $dir ; exit" INT TERM EXIT
fi
- # temp dir on remote nodes
- if [ -n "$ssh" ]; then
- rdir="/tmp/mkfs.ceph.$$"
- echo "remote temp dir is $rdir"
- else
- rdir=$dir
- fi
-
$0 --prepare-monmap -d $dir -c $conf
# osd, mds
@@ -412,10 +404,13 @@ if [ $allhosts -eq 1 ]; then
check_host || continue
if [ -n "$ssh" ]; then
- echo pushing conf and monmap to $host
+ rdir="/tmp/mkfs.ceph.$$"
+ echo pushing conf and monmap to $host:$rdir
do_cmd "mkdir -p $rdir"
scp -q $dir/conf $host:$rdir
scp -q $dir/monmap $host:$rdir
+ else
+ rdir=$dir
fi
if [ $mkbtrfs -eq 1 ] && [ "$type" = "osd" ]; then