]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test with multiple monitors
authorSage Weil <sage@newdream.net>
Mon, 30 Jun 2008 21:57:04 +0000 (14:57 -0700)
committerSage Weil <sage@newdream.net>
Mon, 30 Jun 2008 21:57:04 +0000 (14:57 -0700)
src/montest.sh [new file with mode: 0755]
src/vstartnew.sh

diff --git a/src/montest.sh b/src/montest.sh
new file mode 100755 (executable)
index 0000000..c2f72bb
--- /dev/null
@@ -0,0 +1,53 @@
+#!/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 -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."
+
index f8eb90a250a09a18ee741e6e54c27e36f5c56f53..0a981c95027e5f87b5ed45f23392b7c559639365 100755 (executable)
@@ -23,18 +23,12 @@ then
 fi
 
 # build a fresh fs monmap, mon fs
-$CEPH_BIN/monmaptool --create --clobber --add $IP:12345 --print .ceph_monmap
-$CEPH_BIN/mkmonfs --clobber mondata/mon0 --mon 0 --monmap .ceph_monmap
-
-# shared args
-ARGS="-d"
-
-# start monitor
-#valgrind --tool=massif 
-#valgrind --leak-check=full --show-reachable=yes $CEPH_BIN/cmon mondata/mon0 --debug_mon 20 --debug_ms 1 > out/mon0 &
-#valgrind --tool=massif $CEPH_BIN/cmon mondata/mon0 --debug_mon 20 --debug_ms 1 > out/mon0 &
-#sleep 1
-$CEPH_BIN/cmon -d mondata/mon0 --debug_mon 20 --debug_ms 1
+$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
 
 # build and inject an initial osd map
 $CEPH_BIN/osdmaptool --clobber --createsimple .ceph_monmap 4 --print .ceph_osdmap # --pgbits 2
@@ -48,8 +42,8 @@ do
 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
+$CEPH_BIN/cmds -d --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 -d --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."