diff options
author | Petr Rockai <prockai@redhat.com> | 2012-02-23 13:11:07 +0000 |
---|---|---|
committer | Petr Rockai <prockai@redhat.com> | 2012-02-23 13:11:07 +0000 |
commit | dae0822698327e81f467c3594141d70cdafca331 (patch) | |
tree | 673c87128df8e56be79703a799c83d12acbe5b19 /test/shell/lvcreate-repair.sh | |
parent | 182d1f60d2fb1bbadef2974fa55278f553b04ed9 (diff) | |
download | lvm2-dae0822698327e81f467c3594141d70cdafca331.tar.gz lvm2-dae0822698327e81f467c3594141d70cdafca331.tar.xz lvm2-dae0822698327e81f467c3594141d70cdafca331.zip |
The lvmetad client-side integration. Only active when use_lvmetad = 1 is set in
lvm.conf *and* lvmetad is running.
Diffstat (limited to 'test/shell/lvcreate-repair.sh')
-rw-r--r-- | test/shell/lvcreate-repair.sh | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/test/shell/lvcreate-repair.sh b/test/shell/lvcreate-repair.sh index 5844fb94..55cd1ae6 100644 --- a/test/shell/lvcreate-repair.sh +++ b/test/shell/lvcreate-repair.sh @@ -14,31 +14,32 @@ aux prepare_vg 3 # fail multiple devices -for i in pv1 pv2 pv3 ; do - for j in pv2 pv3 ; do +for i in $dev1 $dev2 $dev3 ; do + for j in $dev2 $dev3 ; do if test $i = $j ; then continue ; fi vgremove -ff $vg vgcreate $vg $dev1 $dev2 $dev3 + # exit 1 lvcreate -l1 -n $lv1 $vg $dev1 - aux lvmconf "devices/filter = [ \"r/.*$i$/\", \"r/.*$j$/\", \"a/dev\/mapper\/.*pv[0-9_]*$/\", \"r/.*/\" ]" + aux disable_dev $i $j vgreduce --removemissing --force $vg # check if reduced device was removed - test $i = pv1 && dmsetup table | not egrep "$vg-$lv1: *[^ ]+" >/dev/null + test $i = $dev1 && dmsetup table | not egrep "$vg-$lv1: *[^ ]+" >/dev/null lvcreate -l1 -n $lv2 $vg - test $i != pv1 && check lv_exists $vg $lv1 + test $i != $dev1 && check lv_exists $vg $lv1 check lv_exists $vg $lv2 - aux lvmconf 'devices/filter = [ "a/dev\/mapper\/.*pv[0-9_]*$/", "r/.*/" ]' + aux enable_dev $i $j - test $i != pv1 && check lv_exists $vg $lv1 + test $i != $dev1 && check lv_exists $vg $lv1 check lv_exists $vg $lv2 done done @@ -84,6 +85,7 @@ dd if=backup_i of="$dev1" bs=256K count=1 # dirty game dd if=/dev/zero of="$dev3" bs=256K count=1 +pvscan --lvmetad $dev3 || true # udev be watching you vgreduce --removemissing --force $vg |