]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
initscripts: clean out old scripts
authorSage Weil <sage@newdream.net>
Mon, 2 Mar 2009 19:09:04 +0000 (11:09 -0800)
committerSage Weil <sage@newdream.net>
Mon, 2 Mar 2009 19:11:23 +0000 (11:11 -0800)
src/ceph_init [deleted file]
src/cephd [deleted file]
src/montest.sh [deleted file]
src/restart.sh [deleted file]

diff --git a/src/ceph_init b/src/ceph_init
deleted file mode 100755 (executable)
index bac9943..0000000
+++ /dev/null
@@ -1,184 +0,0 @@
-#!/bin/bash
-
-# some defaults
-def_mon_data_path=mondata
-def_mon_data_file="mon\$mon"
-def_mon_port=6789
-def_num_mon=3
-def_num_osd=1
-def_num_mds=1
-def_osd_dev=dev/osd\$osd
-def_startup_conf_file="/etc/ceph/startup.conf"
-
-SCRIPT_BIN=`dirname $0`
-. $SCRIPT_BIN/ceph_common.sh
-
-let debug=0
-let do_init=0
-let select_mon=0
-let select_mds=0
-let select_osd=0
-let localhost=0
-let noselection=1
-norestart=""
-valgrind=""
-MON_ADDR=""
-
-usage="usage: $0 init [option]... [mon] [mds] [osd]\n"
-usage=$usage"options:\n"
-usage=$usage"\t-m ip:port\t\tspecify monitor address\n"
-usage=$usage"\t--conf_file filename\n"
-
-usage_exit() {
-       printf "$usage"
-       exit
-}
-
-while [ $# -ge 1 ]; do
-case $1 in
-        -l | --localhost )
-       localhost=1
-       ;;
-       --norestart )
-       norestart="--norestart"
-       ;;
-       mon | cmon )
-       select_mon=1
-       noselection=0
-       ;;
-       mds | cmds )
-       select_mds=1
-       noselection=0
-       ;;
-       osd | cosd )
-       select_osd=1
-       noselection=0
-       ;;
-       init )
-       do_init=1
-       ;;
-       * )
-       usage_exit
-esac
-shift
-done
-
-[ $do_init -eq 0 ] && usage_exit
-
-[ "$startup_conf_file" == "" ] && startup_conf_file=$def_startup_conf_file
-
-CCONF="$CCONF_BIN --conf_file $startup_conf_file"
-
-if [ $noselection -eq 1 ]; then
-       select_mon=1
-       select_mds=1
-       select_osd=1
-fi
-
-get_val CEPH_NUM_MON "$CEPH_NUM_MON" global num_mon $def_num_mon
-get_val CEPH_NUM_OSD "$CEPH_NUM_OSD" global "osd num" $def_num_osd
-get_val CEPH_NUM_MDS "$CEPH_NUM_MDS" global num_mds $def_num_mds
-
-ARGS="-f"
-
-if [ $debug -eq 0 ]; then
-       CMON_ARGS="--debug_mon 10 --debug_ms 1"
-       COSD_ARGS=""
-       CMDS_ARGS="--debug_ms 1"
-else
-       echo "** going verbose **"
-       CMON_ARGS="--lockdep 1 --debug_mon 20 --debug_ms 1 --debug_paxos 20"
-       COSD_ARGS="--lockdep 1 --debug_osd 25 --debug_journal 20 --debug_filestore 10 --debug_ms 1" # --debug_journal 20 --debug_osd 20 --debug_filestore 20 --debug_ebofs 20
-       CMDS_ARGS="--lockdep 1 --mds_cache_size 500 --mds_log_max_segments 2 --debug_ms 1 --debug_mds 20 --mds_thrash_fragments 0 --mds_thrash_exports 1"
-fi
-
-# get_val MON_HOST "$MON_HOST" global "mon host" ""
-# [ "$MON_HOST" != "" ] && get_val MON_PORT "$MON_PORT" global "mon port" ""
-# [ "$MON_PORT" != "" ] && MON_ADDR=$MON_HOST:$MON_PORT
-
-if [ "$MON_ADDR" != "" ]; then
-       CMON_ARGS=$CMON_ARGS" -m "$MON_ADDR
-       COSD_ARGS=$COSD_ARGS" -m "$MON_ADDR
-       CMDS_ARGS=$CMDS_ARGS" -m "$MON_ADDR
-fi
-
-
-# lockdep everywhere?
-# export CEPH_ARGS="--lockdep 1"
-
-$SUDO rm -f core*
-
-test -d out || mkdir out
-$SUDO rm -f out/*
-test -d gmon && $SUDO rm -rf gmon/*
-
-
-# figure machine's ip
-if [ $localhost -eq 1 ]; then
-    IP="127.0.0.1"
-else
-    HOSTNAME=`hostname`
-    echo hostname $HOSTNAME
-    IP=`host $HOSTNAME | grep 'has address' | cut -d ' ' -f 4`
-fi
-echo "ip $IP"
-if [ `echo $IP | grep '^127\\.'` ]
-then
-       echo
-       echo "WARNING: hostname resolves to loopback; remote hosts will not be able to"
-       echo "  connect.  either adjust /etc/hosts, or edit this script to use your"
-       echo "  machine's real IP."
-       echo
-fi
-
-[ "$CEPH_BIN" == "" ] && CEPH_BIN=`dirname $0`
-[ "$MON_PORT" == "" ] && MON_PORT=$def_mon_port
-[ "$MON_HOST" == "" ] && MON_HOST=$IP
-
-#mon
-if [ $select_mon -eq 1 ]; then
-       $CEPH_BIN/osdmaptool --clobber --createsimple 4 .ceph_osdmap # --pgbits 2
-
-       str="$CEPH_BIN/monmaptool --create --clobber"
-       for mon in `seq 0 $((CEPH_NUM_MON-1))`; do
-               get_conf mon_data_path $def_mon_data_path "mon data path" mon$mon mon global
-               get_conf mon_data_file $def_mon_data_file "mon data file" mon$mon mon global
-               get_conf conf_file $startup_conf_file "conf file" mon$mon mon global
-               get_conf MON_PORT $MON_PORT "mon port" mon$mon mon global
-               get_conf CEPH_HOST $MON_HOST "mon host" mon$mon mon global
-
-               # build a fresh fs monmap, mon fs
-               # $CEPH_BIN/monmaptool --create --clobber --print .ceph_monmap
-               str=$str" --add $CEPH_HOST:$(($MON_PORT+$mon))"
-       done
-       str=$str" --print .ceph_monmap"
-       echo $str
-       $str
-
-       for mon in `seq 0 $((CEPH_NUM_MON-1))`; do
-               $CEPH_BIN/mkmonfs --clobber mondata/mon$mon --mon $mon --monmap .ceph_monmap --osdmap .ceph_osdmap
-       done
-fi
-
-#osd
-if [ $select_osd -eq 1 ]; then
-       for osd in `seq 0 $((CEPH_NUM_OSD-1))`
-       do
-               get_conf_bool use_sudo 0 sudo osd$osd osd global
-               get_conf osd_dev $def_osd_dev "osd dev" osd$osd osd global
-               get_conf conf_file $startup_conf_file "conf file" osd$osd osd global
-               get_conf MON_PORT $MON_PORT "mon port" osd$osd osd global
-               get_conf CEPH_HOST $MON_HOST "mon host" osd$osd osd global
-
-               [ "$use_sudo" != "0" ] && SUDO="sudo" || SUDO=""
-
-               get_conf ssh_host "" "ssh host" osd$osd osd global
-               [ "$ssh_host" != "" ] && SSH_HOST="ssh $ssh_host" || SSH_HOST=""
-               get_conf cd_path "" "ssh path" osd$osd osd global
-               [ "$ssh_host" != "" ] && CD_PATH="cd $cd_path \\;" || CD_PATH=""
-
-               echo mkfs osd$osd
-               $SSH_HOST $CD_PATH \
-                       $SUDO $CEPH_BIN/cosd --mkfs_for_osd $osd $osd_dev
-       done
-fi
diff --git a/src/cephd b/src/cephd
deleted file mode 100755 (executable)
index aca0f5b..0000000
--- a/src/cephd
+++ /dev/null
@@ -1,253 +0,0 @@
-#!/bin/bash
-
-# some defaults
-def_mon_data_path=mondata
-def_mon_data_file="mon\$mon"
-def_mon_port=6789
-def_num_mon=3
-def_num_osd=1
-def_num_mds=1
-def_debug=0
-def_osd_dev=dev/osd\$osd
-def_osd_journal=""
-
-
-SCRIPT_BIN=`dirname $0`
-. $SCRIPT_BIN/ceph_common.sh
-
-let debug=$def_debug
-let do_start=0
-let do_stop=0
-let select_mon=0
-let select_mds=0
-let select_osd=0
-let localhost=0
-let noselection=1
-norestart=""
-valgrind=""
-MON_ADDR=""
-
-usage="usage: $0 < start | stop | restart > [option]... [mon] [mds] [osd]\n"
-usage=$usage"options:\n"
-usage=$usage"\t-d, --debug\n"
-usage=$usage"\t--norestart\n"
-usage=$usage"\t--valgrind\n"
-usage=$usage"\t-m ip:port\t\tspecify monitor address\n"
-usage=$usage"\t--conf_file filename\n"
-
-usage_exit() {
-       printf "$usage"
-       exit
-}
-
-while [ $# -ge 1 ]; do
-case $1 in
-       -d | --debug )
-       debug=1
-       ;;
-        -l | --localhost )
-       localhost=1
-       ;;
-       --norestart )
-       norestart="--norestart"
-       ;;
-       --valgrind )
-       valgrind="--valgrind"
-       ;;
-       mon | cmon )
-       select_mon=1
-       noselection=0
-       ;;
-       mds | cmds )
-       select_mds=1
-       noselection=0
-       ;;
-       osd | cosd )
-       select_osd=1
-       noselection=0
-       ;;
-       start )
-       [ $do_stop -eq 1 ] && usage_exit
-       do_start=1
-       ;;
-       stop )
-       [ $do_start -eq 1 ] && usage_exit
-       do_stop=1
-       ;;
-       restart )
-       [ $do_start -eq 1 ] && usage_exit
-       [ $do_stop -eq 1 ] && usage_exit
-       do_start=1
-       do_stop=1
-       ;;
-       -m )
-       [ "$2" == "" ] && usage_exit
-       MON_ADDR=$2
-       shift
-       ;;
-       --conf_file )
-       [ "$2" == "" ] && usage_exit
-       startup_conf_file=$2
-       shift
-       ;;
-       * )
-       usage_exit
-esac
-shift
-done
-
-[ $do_start -eq 0 ] && [ $do_stop -eq 0 ] && usage_exit
-
-if [ $do_stop -eq 1 ]; then
-       stop_str=""
-       [ $select_mon -eq 1 ] && stop_str=$stop_str" mon"
-       [ $select_mds -eq 1 ] && stop_str=$stop_str" mds"
-       [ $select_osd -eq 1 ] && stop_str=$stop_str" osd"
-       $SCRIPT_BIN/ceph_stop $stop_str
-fi
-
-[ $do_start -eq 0 ] && exit
-
-
-[ "$startup_conf_file" == "" ] && startup_conf_file="startup.conf"
-
-CCONF="$CCONF_BIN --conf_file $startup_conf_file"
-
-if [ $noselection -eq 1 ]; then
-       select_mon=1
-       select_mds=1
-       select_osd=1
-fi
-
-get_val CEPH_NUM_MON "$CEPH_NUM_MON" global num_mon $def_num_mon
-get_val CEPH_NUM_OSD "$CEPH_NUM_OSD" global "osd num" $def_num_osd
-get_val CEPH_NUM_MDS "$CEPH_NUM_MDS" global num_mds $def_num_mds
-
-[ $debug -eq 0 ] && get_conf_bool debug 0 debug global
-
-ARGS="-f"
-
-if [ $debug -eq 0 ]; then
-       CMON_ARGS="--debug_mon 10 --debug_ms 1"
-       COSD_ARGS=""
-       CMDS_ARGS="--debug_ms 1"
-else
-       echo "** going verbose **"
-       CMON_ARGS="--lockdep 1 --debug_mon 20 --debug_ms 1 --debug_paxos 20"
-       COSD_ARGS="--lockdep 1 --debug_osd 25 --debug_journal 20 --debug_filestore 10 --debug_ms 1" # --debug_journal 20 --debug_osd 20 --debug_filestore 20 --debug_ebofs 20
-       CMDS_ARGS="--lockdep 1 --mds_cache_size 500 --mds_log_max_segments 2 --debug_ms 1 --debug_mds 20 --mds_thrash_fragments 0 --mds_thrash_exports 1"
-fi
-
-# get_val MON_HOST "$MON_HOST" global "mon host" ""
-# [ "$MON_HOST" != "" ] && get_val MON_PORT "$MON_PORT" global "mon port" ""
-# [ "$MON_PORT" != "" ] && MON_ADDR=$MON_HOST:$MON_PORT
-
-if [ "$MON_ADDR" != "" ]; then
-       CMON_ARGS=$CMON_ARGS" -m "$MON_ADDR
-       COSD_ARGS=$COSD_ARGS" -m "$MON_ADDR
-       CMDS_ARGS=$CMDS_ARGS" -m "$MON_ADDR
-fi
-
-
-# lockdep everywhere?
-# export CEPH_ARGS="--lockdep 1"
-
-$SUDO rm -f core*
-
-test -d out || mkdir out
-$SUDO rm -f out/*
-test -d gmon && $SUDO rm -rf gmon/*
-
-
-# figure machine's ip
-if [ $localhost -eq 1 ]; then
-    IP="127.0.0.1"
-else
-    HOSTNAME=`hostname`
-    echo hostname $HOSTNAME
-    IP=`host $HOSTNAME | grep 'has address' | cut -d ' ' -f 4`
-fi
-echo "ip $IP"
-
-[ "$CEPH_BIN" == "" ] && CEPH_BIN=.
-[ "$MON_PORT" == "" ] && MON_PORT=$def_mon_port
-[ "$MON_HOST" == "" ] && MON_HOST=$IP
-
-#mon
-if [ $select_mon -eq 1 ]; then
-       for mon in `seq 0 $((CEPH_NUM_MON-1))`; do
-               get_conf mon_data_path $def_mon_data_path "mon data path" mon$mon mon global
-               get_conf mon_data_file $def_mon_data_file "mon data file" mon$mon mon global
-               get_conf conf_file $startup_conf_file "conf file" mon$mon mon global
-               get_conf MON_PORT $MON_PORT "mon port" mon$mon mon global
-               get_conf CEPH_HOST $MON_HOST "mon host" mon$mon mon global
-
-               get_conf ssh_host "" "ssh host" mon$mon mon global
-               [ "$ssh_host" != "" ] && SSH_HOST="ssh $ssh_host" || SSH_HOST=""
-               get_conf cd_path "" "ssh path" mon$mon mon global
-               [ "$ssh_host" != "" ] && CD_PATH="cd $cd_path \\;" || CD_PATH=""
-
-               $SSH_HOST $CD_PATH \
-               $CEPH_BIN/crun $norestart $valgrind $CEPH_BIN/cmon $ARGS $CMON_ARGS $mon_data_path/$mon_data_file &
-               echo $SSH_HOST $CD_PATH \
-               $CEPH_BIN/crun $norestart $valgrind $CEPH_BIN/cmon $ARGS $CMON_ARGS $mon_data_path/$mon_data_file &
-       done
-       sleep 1
-fi
-
-#osd
-if [ $select_osd -eq 1 ]; then
-       for osd in `seq 0 $((CEPH_NUM_OSD-1))`
-       do
-               get_conf_bool use_sudo 0 sudo osd$osd osd global
-               get_conf osd_dev $def_osd_dev "osd dev" osd$osd osd global
-               [ "$def_osd_journal" == "" ] && [ -ne $def_osd_journal ] && def_osd_journal=""
-               get_conf osd_journal $def_osd_journal "osd journal" osd$osd osd global
-               get_conf conf_file $startup_conf_file "conf file" osd$osd osd global
-               get_conf MON_PORT $MON_PORT "mon port" osd$osd osd global
-               get_conf CEPH_HOST $MON_HOST "mon host" osd$osd osd global
-
-               [ "$use_sudo" != "0" ] && SUDO="sudo" || SUDO=""
-
-               get_conf ssh_host "" "ssh host" osd$osd osd global
-               [ "$ssh_host" != "" ] && SSH_HOST="ssh $ssh_host" || SSH_HOST=""
-               get_conf cd_path "" "ssh path" osd$osd osd global
-               [ "$ssh_host" != "" ] && CD_PATH="cd $cd_path \\;" || CD_PATH=""
-
-               [ "$osd_journal" != "" ] && JOURNAL_OPT="-j $osd_journal"
-
-               echo start osd$osd
-               echo $SSH_HOST $CD_PATH \
-               $CEPH_BIN/crun $norestart $valgrind $SUDO $CEPH_BIN/cosd --conf_file $conf_file \
-                       $osd_dev $JOURNAL_OPT $ARGS $COSD_ARGS -m $MON_HOST:$MON_PORT &
-               $SSH_HOST $CD_PATH \
-               $CEPH_BIN/crun $norestart $valgrind $SUDO $CEPH_BIN/cosd --conf_file $conf_file \
-                       $osd_dev $JOURNAL_OPT $ARGS $COSD_ARGS -m $MON_HOST:$MON_PORT &
-       done
-fi
-
-# mds
-if [ $select_mds -eq 1 ]; then
-       for mds in `seq 0 $((CEPH_NUM_MDS-1))`
-       do
-               get_conf conf_file $startup_conf_file "conf file" mds$mds mds global
-               get_conf ssh_host "" "ssh host" mds$mds mds global
-               get_conf MON_PORT $MON_PORT "mon port" mds$osd mds global
-               get_conf CEPH_HOST $MON_HOST "mon host" mds$osd mds global
-               [ "$ssh_host" != "" ] && SSH_HOST="ssh $ssh_host" || SSH_HOST=""
-               get_conf cd_path "" "ssh path" mds$mds mds global
-               [ "$ssh_host" != "" ] && CD_PATH="cd $cd_path \\;" || CD_PATH=""
-
-               echo $SSH_HOST $CD_PATH \
-               $CEPH_BIN/crun $norestart $valgrind $CEPH_BIN/cmds --conf_file $conf_file \
-                       $ARGS $CMDS_ARGS &
-               $SSH_HOST $CD_PATH \
-               $CEPH_BIN/crun $norestart $valgrind $CEPH_BIN/cmds --conf_file $conf_file \
-                       $ARGS $CMDS_ARGS &
-       done
-       echo $CEPH_BIN/ceph mds set_max_mds $CEPH_NUM_MDS
-       $CEPH_BIN/ceph mds set_max_mds $CEPH_NUM_MDS
-fi
-
-echo "started. stop.sh to stop.  see out/* (e.g. 'tail -f out/????') for debug output."
-
diff --git a/src/montest.sh b/src/montest.sh
deleted file mode 100755 (executable)
index b2c897e..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/sh
-
-./stop.sh
-rm core*
-
-test -d out || mkdir out
-rm out/*
-
-# figure machine's ip
-HOSTNAME=`hostname`
-IP=`host $HOSTNAME | grep $HOSTNAME | cut -d ' ' -f 4`
-[ "$CEPH_BIN" == "" ] && CEPH_BIN=.
-
-echo hostname $HOSTNAME
-echo "ip $IP"
-if [ `echo $IP | grep '^127\\.'` ]
-then
-       echo
-       echo "WARNING: hostname resolves to loopback; remote hosts will not be able to"
-       echo "  connect.  either adjust /etc/hosts, or edit this script to use your"
-       echo "  machine's real IP."
-       echo
-fi
-
-# build a fresh fs monmap, mon fs
-$CEPH_BIN/monmaptool --create --clobber --add $IP:12345 --add $IP:12346 --add $IP:12347 --print .ceph_monmap
-for f in 0 1 2
-do
- $CEPH_BIN/mkmonfs --clobber mondata/mon$f --mon $f --monmap .ceph_monmap
- $CEPH_BIN/cmon -d mondata/mon$f --debug_mon 20 --debug_ms 1 --debug_paxos 10
-done
-
-# shared args
-ARGS="-d"
-
-# build and inject an initial osd map
-$CEPH_BIN/osdmaptool --clobber --createsimple .ceph_monmap 4 --print .ceph_osdmap # --pgbits 2
-$CEPH_BIN/cmonctl osd setmap 2 -i .ceph_osdmap
-
-for osd in 0 #1 2 3 #4 5 6 7 8 9 10 11 12 13 14 15
-do
- $CEPH_BIN/cosd --mkfs_for_osd $osd dev/osd$osd  # initialize empty object store
- #valgrind --leak-check=full --show-reachable=yes $CEPH_BIN/cosd dev/osd$osd --debug_ms 1 --debug_osd 20 --debug_filestore 10 1>out/o$osd & #--debug_osd 40
- $CEPH_BIN/cosd dev/osd$osd -d --debug_ms 1 --debug_osd 20 # --debug_filestore 10
-done
-
-# mds
-$CEPH_BIN/cmds $ARGS --debug_ms 1 --debug_mds 20 --mds_log_max_segments 10 --mds_thrash_fragments 0 --mds_thrash_exports 0 #--debug_ms 20
-#$CEPH_BIN/cmds $ARGS --debug_ms 1 --debug_mds 20 --mds_thrash_fragments 0 --mds_thrash_exports 0 #--debug_ms 20
-#./cmonctl mds set_max_mds 2
-
-echo "started.  stop.sh to stop.  see out/* (e.g. 'tail -f out/????') for debug output."
-
diff --git a/src/restart.sh b/src/restart.sh
deleted file mode 100755 (executable)
index ef70318..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/bash
-
-./stop.sh
-rm core*
-
-test -d out || mkdir out
-rm out/*
-
-# figure machine's ip
-HOSTNAME=`hostname`
-IP=`host $HOSTNAME | cut -d ' ' -f 4`
-[ "$CEPH_BIN" == "" ] && CEPH_BIN=.
-
-echo hostname $HOSTNAME
-echo "ip $IP"
-if [ `echo $IP | grep '^127\\.'` ]
-then
-       echo
-       echo "WARNING: hostname resolves to loopback; remote hosts will not be able to"
-       echo "  connect.  either adjust /etc/hosts, or edit this script to use your"
-       echo "  machine's real IP."
-       echo
-fi
-
-# shared args
-ARGS="-d --debug_ms 1"
-
-# monitor
-$CEPH_BIN/cmon $ARGS mondata/mon0 --debug_mon 20 --debug_ms 1
-
-# osds
-for osd in 0 1 2 3 
-do
- $CEPH_BIN/cosd $ARGS dev/osd$osd
-done
-
-# mds
-$CEPH_BIN/cmds $ARGS
-
-echo "started.  stop.sh to stop.  see out/* (e.g. 'tail -f out/????') for debug output."
-