]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
dstartnew.sh/dstop.sh
authorSage Weil <sage@newdream.net>
Thu, 31 Jul 2008 18:04:04 +0000 (11:04 -0700)
committerSage Weil <sage@newdream.net>
Thu, 31 Jul 2008 18:05:58 +0000 (11:05 -0700)
src/dstartnew.sh
src/dstop.sh [new file with mode: 0755]

index 1ef42181942845093eb4e7fc44ecc623e4b30e61..fae270e408b882e1187ebd3cde81f628a3a03629 100755 (executable)
@@ -1,14 +1,8 @@
 #!/bin/sh
 
-./stop.sh
+./dstop.sh
 rm core*
 
-for f in 0 1 2 3
-do 
- ssh cosd$f killall cosd
-done
-
-
 test -d out || mkdir out
 rm out/*
 
@@ -29,36 +23,33 @@ 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
+./monmaptool --create --clobber --add $IP:12345 --print .ceph_monmap
+./mkmonfs --clobber mondata/mon0 --mon 0 --monmap .ceph_monmap
 
-# shared args
-
-# 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
+# monitor
+./cmon -d mondata/mon0 --debug_mon 20 --debug_ms 1
 
 # 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
+./osdmaptool --clobber --createsimple .ceph_monmap 16 --print .ceph_osdmap # --pgbits 2
+./cmonctl osd setmap -i .ceph_osdmap
+
+#ARGS="-m $IP:12345"
 
-ARGS="-d -m $IP:12345"
-for osd in 0 1 2 3 #4 5 6 7 8 9 10 11 12 13 14 15
+for host in `cd dev/hosts ; ls`
 do
-# dev="/b/osd$osd"
- dev="dev/osd$osd"
- ssh cosd$osd killall cosd
- ssh cosd$osd cd ceph/src \; ./cosd --mkfs_for_osd $osd $dev --osd_auto_weight 1
- ssh cosd$osd cd ceph/src \; ./cosd $dev -d --debug_ms 1 --debug_osd 20 --debug_filestore 10
+ ssh cosd$host killall cosd
+ for osd in `cd dev/hosts/$host ; ls`
+ do
+   dev="dev/hosts/$host/$osd"
+   echo "---- host $host osd $osd dev $dev ----"
+   ls -al $dev
+   ssh cosd$host cd ceph/src \; ./cosd --mkfs_for_osd $osd $dev # --osd_auto_weight 1
+   ssh cosd$host cd ceph/src \; ./cosd $dev -d --debug_ms 1 --debug_osd 20 --debug_filestore 10
+ done
 done
 
 # mds
-$CEPH_BIN/cmds $ARGS --debug_ms 1 --debug_mds 20 --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
+./cmds -d --debug_ms 1 --debug_mds 20 --mds_thrash_fragments 0 --mds_thrash_exports 0 #--debug_ms 20
 
-echo "started.  stop.sh to stop.  see out/* (e.g. 'tail -f out/????') for debug output."
+#echo "started.  stop.sh to stop.  see out/* (e.g. 'tail -f out/????') for debug output."
 
diff --git a/src/dstop.sh b/src/dstop.sh
new file mode 100755 (executable)
index 0000000..757ff69
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+killall cmon cmds
+
+for host in `cd dev/hosts ; ls`
+do
+ ssh cosd$host killall cosd
+done
\ No newline at end of file