]>
git.proxmox.com Git - ceph.git/blob - ceph/src/mstart.sh
3 usage
="usage: $0 <name> [vstart options]..\n"
10 [ $# -lt 1 ] && usage_exit
16 vstart_path
=`dirname $0`
18 root_path
=`dirname $0`
19 root_path
=`(cd $root_path; pwd)`
21 [ -z "$BUILD_DIR" ] && BUILD_DIR
=build
23 if [ -e CMakeCache.txt
]; then
25 elif [ -e $root_path/..
/${BUILD_DIR}/CMakeCache.txt
]; then
26 cd $root_path/..
/${BUILD_DIR}
29 RUN_ROOT_PATH
=${root_path}/run
31 mkdir
-p $RUN_ROOT_PATH
33 if [ -z "$CLUSTERS_LIST" ]
35 CLUSTERS_LIST
=$RUN_ROOT_PATH/.clusters.list
38 if [ ! -f $CLUSTERS_LIST ]; then
42 pos
=`grep -n -w $instance $CLUSTERS_LIST`
44 echo $instance >> $CLUSTERS_LIST
45 pos
=`grep -n -w $instance $CLUSTERS_LIST`
48 pos
=`echo $pos | cut -d: -f1`
49 base_port
=$
((6800+pos
*20))
50 rgw_port
=$
((8000+pos
*1))
52 export VSTART_DEST
=$RUN_ROOT_PATH/$instance
53 export CEPH_PORT
=$base_port
54 export CEPH_RGW_PORT
=$rgw_port
58 echo "Cluster dest path: $VSTART_DEST"
59 echo "monitors base port: $CEPH_PORT"
60 echo "rgw base port: $CEPH_RGW_PORT"
62 $vstart_path/vstart.sh
"$@"