1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-23 21:35:29 +03:00

Updated testing script

Since attrs were extended by 2 new fields update check functions.
This commit is contained in:
Zdenek Kabelac 2011-09-09 13:19:19 +00:00
parent d8487f1f4f
commit 3f21a5341d

View File

@ -139,8 +139,8 @@ mirror() {
mirror_nonredundant() {
lv="$1/$2"
lvs -oattr "$lv" | grep "^ *m.....$" >/dev/null || {
if lvs -oattr "$lv" | grep "^ *o.....$" >/dev/null &&
lvs -oattr "$lv" | grep "^ *m.......$" >/dev/null || {
if lvs -oattr "$lv" | grep "^ *o.......$" >/dev/null &&
lvs -a | fgrep "[${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"
@ -183,7 +183,7 @@ linear() {
active() {
lv="$1/$2"
lvl -oattr "$lv" 2> /dev/null | grep "^ *....a.$" >/dev/null || {
lvl -oattr "$lv" 2> /dev/null | grep "^ *....a...$" >/dev/null || {
echo "$lv expected active, but lvs says it's not:"
lvl "$lv" -o+devices 2>/dev/null
exit 1
@ -197,7 +197,7 @@ active() {
inactive() {
lv="$1/$2"
lvl -oattr "$lv" 2> /dev/null | grep '^ *....[-isd].$' >/dev/null || {
lvl -oattr "$lv" 2> /dev/null | grep '^ *....[-isd]...$' >/dev/null || {
echo "$lv expected inactive, but lvs says it's not:"
lvl "$lv" -o+devices 2>/dev/null
exit 1