Skip to content

Commit

Permalink
vstart: make -k with optional mon_num.
Browse files Browse the repository at this point in the history
Default mon_num=3, if we change this and using -k to create a new
cluster. It don't work. So we must record the old mon_num.
The same for osd_num/mds_num/rgw_num.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
  • Loading branch information
majianpeng committed Mar 24, 2016
1 parent e8f56cf commit 81fa2ca
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/vstart.sh
Expand Up @@ -275,6 +275,13 @@ esac
shift
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`
fi

if [ "$start_all" -eq 1 ]; then
start_mon=1
start_mds=1
Expand Down Expand Up @@ -436,6 +443,10 @@ if [ "$start_mon" -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
[global]
fsid = $(uuidgen)
osd pg bits = 3
Expand Down

0 comments on commit 81fa2ca

Please sign in to comment.