fi
fi
- if [ "$type" = "osd" ]; then
- get_conf update_crush "" "osd crush update on start"
- case "${update_crush:-1}" in 1|[Tt][Rr][Uu][Ee])
- # update location in crush
- get_conf osd_location_hook "$BINDIR/ceph-crush-location" "osd crush location hook"
- if [ ! -e "$osd_location_hook" ]; then
- EXIT_STATUS=2
- continue
- fi
- osd_location=`$osd_location_hook --cluster $cluster --id $id --type osd`
- get_conf osd_weight "" "osd crush initial weight"
- defaultweight="$(df -P -k $osd_data/. | tail -1 | awk '{ print sprintf("%.4f",$2/1073741824) }')"
- get_conf osd_keyring "$osd_data/keyring" "keyring"
- do_cmd_okfail "timeout 30 $BINDIR/ceph -c $conf --name=osd.$id --keyring=$osd_keyring osd crush create-or-move -- $id ${osd_weight:-${defaultweight:-1}} $osd_location"
- if [ "$ERR" != "0" ]; then
- EXIT_STATUS=$ERR
- continue
- fi
- esac
- fi
-
echo Starting Ceph $name on $host...
if [ ! -d $run_dir ]; then
# assume /var/run exists