1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Test (RAID): Test for RAID10 activations when devices are missing

Test the fix for bug 889358.  RAID10 had been failing to activate when
there were devices that had failed in more than one mirror set.
This commit is contained in:
Jonathan Brassow 2013-01-28 12:32:33 -06:00
parent 2be83f4543
commit a3cfe9d9b7

View File

@ -13,7 +13,7 @@
aux target_at_least dm-raid 1 1 0 || skip aux target_at_least dm-raid 1 1 0 || skip
aux prepare_vg 2 aux prepare_vg 4
lvcreate --type raid1 -m 1 -l 2 -n $lv1 $vg lvcreate --type raid1 -m 1 -l 2 -n $lv1 $vg
lvchange -an $vg/$lv1 lvchange -an $vg/$lv1
@ -64,3 +64,17 @@ not lvchange --zero y $vg/$lv1
not lvchange --resync -ay $vg/$lv1 not lvchange --resync -ay $vg/$lv1
not lvchange --resync --addtag foo $vg/$lv1 not lvchange --resync --addtag foo $vg/$lv1
aux enable_dev "$dev1"
lvremove -ff $vg
# rhbz 889358
# Should be able to activate when RAID10
# has failed devs in different mirror sets.
if aux target_at_least dm-raid 1 3 2; then
lvcreate --type raid10 -m 1 -i 2 -l 2 -n $lv1 $vg
aux wait_for_sync $vg $lv1
lvchange -an $vg/$lv1
aux disable_dev "$dev1" "$dev3"
lvchange -ay $vg/$lv1 --partial
lvchange -an $vg/$lv1
fi