Some more cleanup of tests.
Don't use '$mdadm', just 'mdadm'. And --stop all arrays when finished.
This commit is contained in:
parent
0aa389dc62
commit
bfd8831d1a
|
@ -21,3 +21,4 @@ mdadm -Ss
|
||||||
mdadm -As -c /dev/null --homehost=testing -vvv
|
mdadm -As -c /dev/null --homehost=testing -vvv
|
||||||
testdev $md1 1 $mdsize0 64
|
testdev $md1 1 $mdsize0 64
|
||||||
testdev $md0 1 $[mdsize0+mdsize00] 64
|
testdev $md0 1 $[mdsize0+mdsize00] 64
|
||||||
|
mdadm -Ss
|
||||||
|
|
|
@ -12,14 +12,14 @@ do
|
||||||
do dd if=/dev/urandom of=$d bs=1024 || true
|
do dd if=/dev/urandom of=$d bs=1024 || true
|
||||||
done
|
done
|
||||||
|
|
||||||
$mdadm -CR $md0 -amd -l5 -n$disks --assume-clean $devs
|
mdadm -CR $md0 -amd -l5 -n$disks --assume-clean $devs
|
||||||
$mdadm $md0 --add $dev6
|
mdadm $md0 --add $dev6
|
||||||
echo 20 > /proc/sys/dev/raid/speed_limit_max
|
echo 20 > /proc/sys/dev/raid/speed_limit_max
|
||||||
$mdadm --grow $md0 -n $[disks+1]
|
mdadm --grow $md0 -n $[disks+1]
|
||||||
check reshape
|
check reshape
|
||||||
check state $st
|
check state $st
|
||||||
$mdadm --stop $md0
|
mdadm --stop $md0
|
||||||
$mdadm --assemble $md0 $devs $dev6
|
mdadm --assemble $md0 $devs $dev6
|
||||||
check reshape
|
check reshape
|
||||||
echo 2000 > /proc/sys/dev/raid/speed_limit_max
|
echo 2000 > /proc/sys/dev/raid/speed_limit_max
|
||||||
check wait
|
check wait
|
||||||
|
@ -29,5 +29,5 @@ do
|
||||||
if [ $mm -gt 0 ]
|
if [ $mm -gt 0 ]
|
||||||
then echo >&2 "ERROR mismatch_cnt non-zero : $mm" ; exit 1
|
then echo >&2 "ERROR mismatch_cnt non-zero : $mm" ; exit 1
|
||||||
fi
|
fi
|
||||||
$mdadm -S $md0
|
mdadm -S $md0
|
||||||
done
|
done
|
||||||
|
|
|
@ -20,7 +20,7 @@ do
|
||||||
# test restore: make a raid5 from a file, then do a compare
|
# test restore: make a raid5 from a file, then do a compare
|
||||||
dd if=/dev/urandom of=/tmp/RandFile bs=1024 count=$size
|
dd if=/dev/urandom of=/tmp/RandFile bs=1024 count=$size
|
||||||
$dir/test_stripe restore /tmp/RandFile $disks $[chunk*1024] 5 $nlayout 0 $[size*1024] $devs
|
$dir/test_stripe restore /tmp/RandFile $disks $[chunk*1024] 5 $nlayout 0 $[size*1024] $devs
|
||||||
$mdadm -CR $md0 -amd -l5 -n$disks --assume-clean -c $chunk -p $layout $devs
|
mdadm -CR $md0 -amd -l5 -n$disks --assume-clean -c $chunk -p $layout $devs
|
||||||
cmp -s -n $[size*1024] $md0 /tmp/RandFile || { echo cmp failed ; exit 2; }
|
cmp -s -n $[size*1024] $md0 /tmp/RandFile || { echo cmp failed ; exit 2; }
|
||||||
|
|
||||||
# FIXME check parity
|
# FIXME check parity
|
||||||
|
@ -30,7 +30,7 @@ do
|
||||||
> /tmp/NewRand
|
> /tmp/NewRand
|
||||||
$dir/test_stripe save /tmp/NewRand $disks $[chunk*1024] 5 $nlayout 0 $[size*1024] $devs
|
$dir/test_stripe save /tmp/NewRand $disks $[chunk*1024] 5 $nlayout 0 $[size*1024] $devs
|
||||||
cmp -s -n $[size*1024] $md0 /tmp/NewRand || { echo cmp failed ; exit 2; }
|
cmp -s -n $[size*1024] $md0 /tmp/NewRand || { echo cmp failed ; exit 2; }
|
||||||
$mdadm -S $md0
|
mdadm -S $md0
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue