1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-18 10:04:20 +03:00

tests: dd needs to hit disk

Unsure if this is feature or bug of syncaction,
but it needs to be present physically on the media
and it ignores content of buffer cache...

(maybe lvchange should implicitely fsync all disks
that are members of raid array before starting test??)
This commit is contained in:
Zdenek Kabelac 2014-05-28 15:24:41 +02:00
parent ba3e6e7c32
commit 171a668e81

View File

@ -157,22 +157,7 @@ run_syncaction_check() {
# Overwrite the last half of one of the PVs with crap # Overwrite the last half of one of the PVs with crap
dd if=/dev/urandom of="$device" bs=1k count=$size seek=$seek dd if=/dev/urandom of="$device" bs=1k count=$size seek=$seek
sync
if [ -n "$THIN_POSTFIX" ]; then
#
# Seems to work fine on real devices,
# but can't make the system notice the bad blocks
# in the testsuite - especially when thin is layered
# on top of RAID. In other cases, I can deactivate
# and reactivate and it works. Here, even that doesn't
# work.
return 0
lvchange -an $vg/$2
lvchange -ay $vg/$2
else
lvchange -an $vg/$lv
lvchange -ay $vg/$lv
fi
# "check" should find discrepancies but not change them # "check" should find discrepancies but not change them
# 'lvs' should show results # 'lvs' should show results