From owner-p4-projects@FreeBSD.ORG Fri Jul 13 08:29:14 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5FC6016A406; Fri, 13 Jul 2007 08:29:14 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 335CC16A400 for ; Fri, 13 Jul 2007 08:29:14 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 2120913C481 for ; Fri, 13 Jul 2007 08:29:14 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l6D8TE1Z043808 for ; Fri, 13 Jul 2007 08:29:14 GMT (envelope-from lulf@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l6D8TDdd043805 for perforce@freebsd.org; Fri, 13 Jul 2007 08:29:13 GMT (envelope-from lulf@FreeBSD.org) Date: Fri, 13 Jul 2007 08:29:13 GMT Message-Id: <200707130829.l6D8TDdd043805@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to lulf@FreeBSD.org using -f From: Ulf Lilleengen To: Perforce Change Reviews Cc: Subject: PERFORCE change 123427 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2007 08:29:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=123427 Change 123427 by lulf@lulf_carrot on 2007/07/13 08:28:46 - Finish first testscript Affected files ... .. //depot/projects/soc2007/lulf/testscripts/test_raid5.sh#2 edit Differences ... ==== //depot/projects/soc2007/lulf/testscripts/test_raid5.sh#2 (text+ko) ==== @@ -14,9 +14,9 @@ echo "drive d3 device ${DEV3}" >> ${TMPFILE}; echo "volume test" >> ${TMPFILE}; echo "plex org raid5 493k" >> ${TMPFILE}; - echo "sd drive d1 len 2m" >> ${TMPFILE}; - echo "sd drive d2 len 2m" >> ${TMPFILE}; - echo "sd drive d3 len 2m" >> ${TMPFILE}; + echo "sd drive d1 len 8m" >> ${TMPFILE}; + echo "sd drive d2 len 8m" >> ${TMPFILE}; + echo "sd drive d3 len 8m" >> ${TMPFILE}; echo "Creating configuration..."; gvinum create $TMPFILE; echo "... Done:"; @@ -25,18 +25,18 @@ function raid5_init { echo "Initializing volume..." gvinum start test - sleep 4 + sleep 8 echo "... Done" } echo "1. Data initialization" create_raid5_config raid5_init -`dd if=/dev/zero of=zerofile bs=512 count=4196 > /dev/null 2> /dev/null` +`dd if=/dev/zero of=zerofile bs=512 count=8192 > /dev/null 2> /dev/null` # XXX: Bit of a hack, but we don't have any way to tell that it's up. echo "Reading volume..." -`dd if=/dev/gvinum/test of=testfile bs=512 count=4196 > /dev/null 2> /dev/null` +`dd if=/dev/gvinum/test of=testfile bs=512 count=8192 > /dev/null 2> /dev/null` echo "... Done" echo "Comparing with correct initalized data" RESULT=`diff testfile zerofile` @@ -50,19 +50,20 @@ echo "Done" gvinum resetconfig ## XXX: Input NO FUTURE +sleep 2 # Test 2 Data consistency echo "2. Data consistency" echo "Generating testdata" -dd if=/dev/random of=testdata bs=512 count=4196 > /dev/null &> /dev/null +dd if=/dev/random of=testdata bs=512 count=8192 > /dev/null &> /dev/null create_raid5_config raid5_init gvinum setstate -f stale test.p0.s0 echo "Writing testdata to degraded volume" -dd if=testdata of=/dev/gvinum/test bs=512 count=4196 > /dev/null &> /dev/null +dd if=testdata of=/dev/gvinum/test bs=512 count=8192 > /dev/null &> /dev/null echo "Reading back data from degraded volume" -dd if=/dev/gvinum/test of=testout1 bs=512 count=4196 > /dev/null &> /dev/null +dd if=/dev/gvinum/test of=testout1 bs=512 count=8192 > /dev/null &> /dev/null echo "Comparing" RESULT=`diff testdata testout1` if [ "$RESULT" == "" ]; then @@ -74,9 +75,9 @@ echo "Starting rebuild" gvinum start test -sleep 10 +sleep 15 echo "Reading back data from rebuilt volume" -dd if=/dev/gvinum/test of=testout2 bs=512 count=4196 > /dev/null &> /dev/null +dd if=/dev/gvinum/test of=testout2 bs=512 count=8192 > /dev/null &> /dev/null echo "Comparing" RESULT=`diff testdata testout2` if [ "$RESULT" == "" ]; then @@ -88,7 +89,7 @@ echo "Setting another subdisk stale" gvinum setstate -f stale test.p0.s1 echo "Reading back data from degraded volume" -dd if=/dev/gvinum/test of=testout3 bs=512 count=4196 > /dev/null &> /dev/null +dd if=/dev/gvinum/test of=testout3 bs=512 count=8192 > /dev/null &> /dev/null echo "Comparing" RESULT=`diff testdata testout3` if [ "$RESULT" == "" ]; then @@ -97,6 +98,35 @@ echo "Fail: degraded read is not correct!" ((NUMFAILED += 1)) fi +gvinum resetconfig +sleep 2 + +# Test online RAID-5 rebuild. +echo "3. Online RAID-5 rebuild" +echo "Generating testdata" +dd if=/dev/random of=testdata bs=512 count=8192 > /dev/null &> /dev/null +create_raid5_config +raid5_init +gvinum setstate -f stale test.p0.s0 +echo "Start writing testdata to degraded volume" +dd if=testdata of=/dev/gvinum/test bs=512 count=8192 > /dev/null &> /dev/null & +sleep 1 +echo "Start rebuild of volume" +gvinum start test +echo "Wait for 20 seconds" +sleep 20 +echo "Reading back data from rebuilt volume" +dd if=/dev/gvinum/test of=testout4 bs=512 count=8192 > /dev/null &> /dev/null +echo "Comparing" +RESULT=`diff testdata testout4` +if [ "$RESULT" == "" ]; then + echo "Pass: online-written data is consistent!" +else + echo "Fail: online-written data is inconsistent!" + echo $RESULT + ((NUMFAILED += 1)) +fi +gvinum resetconfig echo "Cleaning up" rm zerofile