mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-17 06:04:23 +03:00
tests: check for raid sync in progress
TODO: this needs to be built-in in lvm command itself.
This commit is contained in:
parent
accf324ccb
commit
26fb6b5e8d
@ -232,10 +232,11 @@ lvcreate -aey -l 2 -n $lv1 $vg "$dev1"
|
|||||||
lvconvert -y -m 1 $vg/$lv1 \
|
lvconvert -y -m 1 $vg/$lv1 \
|
||||||
--config 'global { mirror_segtype_default = "raid1" }' "$dev2"
|
--config 'global { mirror_segtype_default = "raid1" }' "$dev2"
|
||||||
lvs --noheadings -o attr $vg/$lv1 | grep '^[[:space:]]*r'
|
lvs --noheadings -o attr $vg/$lv1 | grep '^[[:space:]]*r'
|
||||||
|
# FIXME: lvconvert/lvcreate should trace state of target
|
||||||
for i in {1..10}; do
|
for i in {1..10}; do
|
||||||
check raid_leg_status $vg $lv1 "Aa" && break
|
dmsetup status | grep $vg-$lv1: | tee out
|
||||||
check raid_leg_status $vg $lv1 "aa" || die "Cannot wait for Aa on $vg/$lv1"
|
grep -E "recover|rebuild" out && break
|
||||||
sleep .1
|
sleep .05
|
||||||
done
|
done
|
||||||
not lvconvert --yes -m 0 $vg/$lv1 "$dev1"
|
not lvconvert --yes -m 0 $vg/$lv1 "$dev1"
|
||||||
lvconvert --yes -m 0 $vg/$lv1 "$dev2"
|
lvconvert --yes -m 0 $vg/$lv1 "$dev2"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user