]>
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 if [ -e CMakeCache.txt
]; then
23 elif [ -e $root_path/..
/build
/CMakeCache.txt
]; then
24 cd $root_path/..
/build
27 RUN_ROOT_PATH
=${root_path}/run
28 CLUSTERS_LIST
=$RUN_ROOT_PATH/.clusters.list
30 mkdir
-p $RUN_ROOT_PATH
33 if [ ! -f $CLUSTERS_LIST ]; then
37 pos
=`grep -n -w $instance $CLUSTERS_LIST`
39 echo $instance >> $CLUSTERS_LIST
40 pos
=`grep -n -w $instance $CLUSTERS_LIST`
43 pos
=`echo $pos | cut -d: -f1`
44 base_port
=$
((6800+pos
*20))
45 rgw_port
=$
((8000+pos
*1))
47 export VSTART_DEST
=$RUN_ROOT_PATH/$instance
48 export CEPH_PORT
=$base_port
49 export CEPH_RGW_PORT
=$rgw_port
53 echo "Cluster dest path: $VSTART_DEST"
54 echo "monitors base port: $CEPH_PORT"
55 echo "rgw base port: $CEPH_RGW_PORT"
57 $vstart_path/vstart.sh
"$@"