mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
tests: check for idle only for raid type
This commit is contained in:
parent
6e4c04b1be
commit
778b66a719
@ -202,6 +202,10 @@ in_sync() {
|
|||||||
# 6th argument is the sync ratio for RAID
|
# 6th argument is the sync ratio for RAID
|
||||||
idx=6
|
idx=6
|
||||||
type=${a[3]}
|
type=${a[3]}
|
||||||
|
if [ ${a[$(($idx + 1))]} != "idle" ]; then
|
||||||
|
echo "$lvm_name ($type$snap) is not in-sync"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
elif [ ${a[2]} = "mirror" ]; then
|
elif [ ${a[2]} = "mirror" ]; then
|
||||||
# 4th Arg tells us how far to the sync ratio
|
# 4th Arg tells us how far to the sync ratio
|
||||||
idx=$((${a[3]} + 4))
|
idx=$((${a[3]} + 4))
|
||||||
@ -212,7 +216,7 @@ in_sync() {
|
|||||||
|
|
||||||
b=( $(echo ${a[$idx]} | sed s:/:' ':) )
|
b=( $(echo ${a[$idx]} | sed s:/:' ':) )
|
||||||
|
|
||||||
if [ ${a[$(($idx + 1))]} != "idle" -o ${b[0]} -eq 0 -o ${b[0]} != ${b[1]} ]; then
|
if [ ${b[0]} -eq 0 -o ${b[0]} != ${b[1]} ]; then
|
||||||
echo "$lvm_name ($type$snap) is not in-sync"
|
echo "$lvm_name ($type$snap) is not in-sync"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
@ -222,7 +226,6 @@ in_sync() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$lvm_name ($type$snap) is in-sync"
|
echo "$lvm_name ($type$snap) is in-sync"
|
||||||
return 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
active() {
|
active() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user