mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
tests: improve mirror_images_redundant
Use only passed VG for lvs and avoid 1 extra uneeded use of lvs.
This commit is contained in:
parent
ac18005de9
commit
d51429254f
@ -41,7 +41,6 @@ lvdevices() {
|
||||
mirror_images_redundant() {
|
||||
local vg=$1
|
||||
local lv="$vg/$2"
|
||||
lvs -a "$vg" -o+devices
|
||||
for i in $(lvdevices "$lv"); do
|
||||
echo "# $i:"
|
||||
lvdevices "$vg/$i" | sort | uniq
|
||||
@ -158,7 +157,7 @@ mirror_nonredundant() {
|
||||
attr=$(get lv_field "$lv" attr)
|
||||
(echo "$attr" | grep "^......m...$" >/dev/null) || {
|
||||
if (echo "$attr" | grep "^o.........$" >/dev/null) &&
|
||||
lvs -a | grep -F "[${2}_mimage" >/dev/null; then
|
||||
lvs -a $1 | grep -F "[${2}_mimage" >/dev/null; then
|
||||
echo "TEST WARNING: $lv is a snapshot origin and looks like a mirror,"
|
||||
echo "assuming it is actually a mirror"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user