main - tests: integrity mismatch checks for all raid levels
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1cc75317f95def9521af535f4c58fb79df816b8c Commit: 1cc75317f95def9521af535f4c58fb79df816b8c Parent: 5fef89361d45797d2e478419caff4528b5ac6150 Author: David Teigland <[email protected]> AuthorDate: Wed Nov 11 15:13:46 2020 -0600 Committer: David Teigland <[email protected]> CommitterDate: Wed Nov 11 15:13:46 2020 -0600
tests: integrity mismatch checks for all raid levels
Verify that corruption is corrected for raid levels other than raid1. For other raid levels, attempt to corrupt the given file pattern on each underlying device, since we don't know which device contains the file being corrupted. This ensures that corruption is actually be introduced when testing the other raid levels.
Verify that corruption is being corrected by checking the integritymismatches count is non-zero for the raid LV, which includes the total from all images (since we don't know which image will have the corruption.)
--- test/shell/integrity-syncaction.sh | 6 ++++ test/shell/integrity.sh | 56 ++++++++++++++++++++++++-------------- 2 files changed, 41 insertions(+), 21 deletions(-)
test/shell/integrity-syncaction.sh +6 -0
@@ -176,6 +176,8 @@ _wait_recalc $vg/${lv1}_rimage_0 _wait_recalc $vg/${lv1}_rimage_1 _wait_recalc $vg/$lv1 _test1 +lvs -o integritymismatches $vg/$lv1 |tee mismatch +not grep 0 mismatch lvchange -an $vg/$lv1 lvconvert --raidintegrity n $vg/$lv1 lvremove $vg/$lv1
@@ -187,6 +189,8 @@ _wait_recalc $vg/${lv1}_rimage_0 _wait_recalc $vg/${lv1}_rimage_1 _wait_recalc $vg/$lv1 _test2 +lvs -o integritymismatches $vg/$lv1 |tee mismatch +not grep 0 mismatch lvchange -an $vg/$lv1 lvconvert --raidintegrity n $vg/$lv1 lvremove $vg/$lv1
@@ -199,6 +203,8 @@ _wait_recalc $vg/${lv1}_rimage_1 _wait_recalc $vg/${lv1}_rimage_2 _wait_recalc $vg/$lv1 _test1 +lvs -o integritymismatches $vg/$lv1 |tee mismatch +not grep 0 mismatch lvchange -an $vg/$lv1 lvconvert --raidintegrity n $vg/$lv1 lvremove $vg/$lv1
test/shell/integrity.sh +35 -21
155 lines not on this page · raw message