Recommended gmirror solution with swap?

R. B. Riddick arne_woerner at yahoo.com
Tue Jan 9 10:41:13 UTC 2007


For the stability test of a gmirror/graid5 device under regular request load
with a sudden disk failure I wrote 2 shell scripts (the one for gmirror crashes
the device after some cycles, while the one for graid5 does crash (so
quickly)).

while [ 1 ] ;do
        gnop configure -f 0 ad0s1gd.nop
        echo good
        gmirror forget fook
        gmirror insert -h fook ad0s1gd.nop
        while [ `gmirror status fook | grep -c COMPLETE` -eq 0 ]; do
                sleep 1
        done
        gnop configure -f 100 ad0s1gd.nop
        echo fail
        while [ `gmirror status fook | grep -c COMPLETE` -ne 0 ]; do
                gmirror status fook
                sleep 1
        done
done


while [ 1 ] ;do
        gnop configure -f 0 ad0s1gd.nop
        echo good
        graid5 configure -a fook
        while [ `graid5 status fook | grep -c COMPLETE` -eq 0 ]; do
                sleep 1
        done
        gnop configure -f 100 ad0s1gd.nop
        echo fail
        while [ `graid5 status fook | grep -c COMPLETE` -ne 0 ]; do
                graid5 status fook
                sleep 1
        done
done


-Arne

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the freebsd-geom mailing list