1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

test: add checks for not 100% sync ratio after initiation of check/repair

Related: rhbz1640630
This commit is contained in:
Heinz Mauelshagen 2019-10-02 14:48:53 +02:00
parent 7368cf8e7d
commit c4aba47dd0

View File

@ -139,6 +139,7 @@ run_writemostly_check() {
check lv_attr_bit health $vg/${lv}_rimage_1 "-"
}
# run_syncaction_check <VG> <LV>
run_syncaction_check() {
local device
@ -183,17 +184,20 @@ run_syncaction_check() {
# "check" should find discrepancies but not change them
# 'lvs' should show results
lvchange --syncaction check $vg/$lv
not lv_field $vg/$lv sync_percent "100.00"
aux wait_for_sync $vg $lv
check lv_attr_bit health $vg/$lv "m"
not check lv_field $vg/$lv raid_mismatch_count "0"
# "repair" will fix discrepancies
lvchange --syncaction repair $vg/$lv
not lv_field $vg/$lv sync_percent "100.00"
aux wait_for_sync $vg $lv
# Final "check" should show no mismatches
# 'lvs' should show results
lvchange --syncaction check $vg/$lv
not lv_field $vg/$lv sync_percent "100.00"
aux wait_for_sync $vg $lv
check lv_attr_bit health $vg/$lv "-"
check lv_field $vg/$lv raid_mismatch_count "0"