]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: simple test for random missing objects during recovery
authorSage Weil <sage.weil@dreamhost.com>
Wed, 2 Mar 2011 00:10:49 +0000 (16:10 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Wed, 2 Mar 2011 00:10:49 +0000 (16:10 -0800)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/test/test_missing_unfound.sh [new file with mode: 0755]

diff --git a/src/test/test_missing_unfound.sh b/src/test/test_missing_unfound.sh
new file mode 100755 (executable)
index 0000000..002fa15
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+CEPH_NUM_OSD=3 ./vstart.sh -d -n -x -o 'osd recovery max active = 1'
+
+./ceph osd pool set data size 3
+
+sleep 20
+
+./init-ceph stop osd.1
+./ceph osd down 1   # faster
+
+for f in `seq 1 100`
+do
+    ./rados -p data put test_$f /etc/passwd
+done
+
+# zap some objects on both replicas
+#rm dev/osd[02]/current/*/test_40*
+
+# some on only one
+rm dev/osd0/current/*/test_5*
+rm dev/osd2/current/*/test_6*
+
+# ...and see how we fare!
+./init-ceph start osd.1
+
+