1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-18 10:04:20 +03:00

tests: check for real mirror target type

Use new available attr instead of guessing...
This commit is contained in:
Zdenek Kabelac 2013-06-04 11:08:45 +02:00
parent fce7243427
commit 215ab4c9ce

View File

@ -118,7 +118,7 @@ mirror() {
mirror_nonredundant() { mirror_nonredundant() {
local lv=$1/$2 local lv=$1/$2
local attr=$(get lv_field $lv attr) local attr=$(get lv_field $lv attr)
(echo "$attr" | grep "^m........$" >/dev/null) || { (echo "$attr" | grep "^......m..$" >/dev/null) || {
if (echo "$attr" | grep "^o........$" >/dev/null) && if (echo "$attr" | grep "^o........$" >/dev/null) &&
lvs -a | fgrep "[${2}_mimage" >/dev/null; then lvs -a | fgrep "[${2}_mimage" >/dev/null; then
echo "TEST WARNING: $lv is a snapshot origin and looks like a mirror," echo "TEST WARNING: $lv is a snapshot origin and looks like a mirror,"