1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
#!/bin/bash
# Test data integrity after joining a new node
. ./common
# start three sheep daemons
for i in `seq 0 6`; do
_start_sheep $i
done
_wait_for_sheep 7
_cluster_format
# create a pre-allocated vdi
_vdi_create test 80M -P
# stop the 3rd node
_kill_sheep 2
# write data to the vdi
_random | $DOG vdi write test
# restart the 3rd node
_start_sheep 2
_wait_for_sheep_recovery 0
# show md5sum of the vdi on each node
for i in `seq 0 6`; do
$DOG vdi read test -p 700$i | md5sum > $STORE/csum.$i
done
for i in `seq 1 6`; do
diff -u $STORE/csum.0 $STORE/csum.$i
done
|