do_root_cmd "modprobe $fs_type ; egrep -q '^[^ ]+ $fs_path' /proc/mounts || mount -t $fs_type $fs_opt $first_dev $fs_path"
fi
fi
+
+ if [ "$type" = "osd" ]; then
+ get_conf update_crush "" "osd crush update on start"
+ if [ "${update_crush:-1}" = "1" -o "{$update_crush:-1}" = "true" ]; then
+ # update location in crush; put in some suitable defaults on the
+ # command line, ceph.conf can override what it wants
+ get_conf osd_location "" "osd crush location"
+ get_conf osd_weight "" "osd crush initial weight"
+ defaultweight=`df /var/lib/ceph/osd/ceph-$id/ | tail -1 | awk '{ d= $2/1073741824 ; r = sprintf("%.2f", d); print r }'`
+ get_conf osd_keyring "/var/lib/ceph/osd/ceph-$id/keyring" "keyring"
+ $BINDIR/ceph \
+ --name="osd.$id" \
+ --keyring="$osd_keyring" \
+ osd crush create-or-move \
+ -- \
+ "$id" \
+ "${osd_weight:-${defaultweight:-1}}" \
+ root=default \
+ host="$(hostname -s)" \
+ $osd_location \
+ || :
+ fi
+ fi
+
echo Starting Ceph $name on $host...
mkdir -p $RUN_DIR
get_conf pre_start_eval "" "pre start eval"