memstore=0
bluestore=0
+VSTART_SEC="client.vstart.sh"
+
MON_ADDR=""
conf_fn="$CEPH_CONF_PATH/ceph.conf"
done
if [ "$overwrite_conf" -eq 0 ]; then
- CEPH_NUM_MON=`awk -F= '/CEPH_NUM_MON/{print $2}' $conf_fn`
- CEPH_NUM_OSD=`awk -F= '/CEPH_NUM_OSD/{print $2}' $conf_fn`
- CEPH_NUM_MDS=`awk -F= '/CEPH_NUM_MDS/{print $2}' $conf_fn`
- CEPH_NUM_RGW=`awk -F= '/CEPH_NUM_RGW/{print $2}' $conf_fn`
+ MON=`$CEPH_BIN/ceph-conf -c $conf_fn --name $VSTART_SEC num_mon 2>/dev/null` && \
+ CEPH_NUM_MON="$MON"
+ OSD=`$CEPH_BIN/ceph-conf -c $conf_fn --name $VSTART_SEC num_osd 2>/dev/null` && \
+ CEPH_NUM_OSD="$OSD"
+ MDS=`$CEPH_BIN/ceph-conf -c $conf_fn --name $VSTART_SEC num_mds 2>/dev/null` && \
+ CEPH_NUM_MDS="$MDS"
+ RGW=`$CEPH_BIN/ceph-conf -c $conf_fn --name $VSTART_SEC num_rgw 2>/dev/null` && \
+ CEPH_NUM_RGW="$RGW"
fi
if [ "$start_all" -eq 1 ]; then
if [ $overwrite_conf -eq 1 ]; then
cat <<EOF > $conf_fn
; generated by vstart.sh on `date`
-; CEPH_NUM_MON=$CEPH_NUM_MON
-; CEPH_NUM_OSD=$CEPH_NUM_OSD
-; CEPH_NUM_MDS=$CEPH_NUM_MDS
-; CEPH_NUM_RGW=$CEPH_NUM_RGW
+[$VSTART_SEC]
+ num mon = $CEPH_NUM_MON
+ num osd = $CEPH_NUM_OSD
+ num mds = $CEPH_NUM_MDS
+ num rgw = $CEPH_NUM_RGW
+
[global]
fsid = $(uuidgen)
osd pg bits = 3