diff options
author | Michael Tokarev <mjt@tls.msk.ru> | 2014-12-20 08:48:44 +0000 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2014-12-20 08:48:44 +0000 |
commit | 489bea7ee8e1dbecfa517b8415568044ab57c73a (patch) | |
tree | 44d4878d4c7da3f4908ea9a765ef9b8f9c141756 /tests/19repair-does-not-destroy |
mdadm (3.3.2-5) unstable; urgency=medium
* use-tempnode-not-devnode.patch: change udev rules file to use
$tempnode which works both on wheezy and jessie udev, instead
of $devnode which only works in jessie. At this stage it is
better to make rules file compatible with old version instead
of adding versioned dependency. Should be removed for jessie+1.
(Closes: #770883)
* fix Closes: list in previous entry (Closes: #771852)
# imported from the archive
Diffstat (limited to 'tests/19repair-does-not-destroy')
-rw-r--r-- | tests/19repair-does-not-destroy | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/19repair-does-not-destroy b/tests/19repair-does-not-destroy new file mode 100644 index 00000000..1d3b9b45 --- /dev/null +++ b/tests/19repair-does-not-destroy @@ -0,0 +1,29 @@ +number_of_disks=7 +chunksize_in_kib=512 +array_data_size_in_kib=$[chunksize_in_kib*(number_of_disks-2)*number_of_disks] +array_data_size_in_b=$[array_data_size_in_kib*1024] +devs="$dev0 $dev1 $dev2 $dev3 $dev4 $dev5 $dev6" + +dd if=/dev/urandom of=/tmp/RandFile bs=1024 count=$array_data_size_in_kib +mdadm -CR $md0 -l6 -n$number_of_disks -c $chunksize_in_kib $devs +dd if=/tmp/RandFile of=$md0 bs=1024 count=$array_data_size_in_kib +blockdev --flushbufs $md0; sync +check wait +blockdev --flushbufs $devs; sync +echo 3 > /proc/sys/vm/drop_caches +$dir/raid6check $md0 repair 1 2 3 > /dev/null # D D +$dir/raid6check $md0 repair 8 2 5 > /dev/null # D P +$dir/raid6check $md0 repair 15 4 6 > /dev/null # D Q +$dir/raid6check $md0 repair 22 5 6 > /dev/null # P Q +$dir/raid6check $md0 repair 3 4 0 > /dev/null # Q D +$dir/raid6check $md0 repair 3 3 1 > /dev/null # P D +$dir/raid6check $md0 repair 6 4 5 > /dev/null # D<D +$dir/raid6check $md0 repair 13 5 4 > /dev/null # D>D +blockdev --flushbufs $devs; sync +echo 3 > /proc/sys/vm/drop_caches +$dir/raid6check $md0 0 0 2>&1 | grep -qs "Error" && { echo errors detected; exit 2; } +cmp -s -n $array_data_size_in_b $md0 /tmp/RandFile || { echo should not mess up correct stripe ; exit 2; } + +mdadm -S $md0 +udevadm settle +blockdev --flushbufs $md0 $devs; sync |