diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2015-11-19 14:31:58 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2015-11-19 14:40:49 +0100 |
commit | da50f8bee654b029e2fc818b66765fa79a70b251 (patch) | |
tree | 4cf4b1b8f826fc2163e4a91fc2f1e8fc644701be | |
parent | 795616a87bbb5fd2a3925e1445bb1a94ce718d55 (diff) | |
download | lvm2-da50f8bee654b029e2fc818b66765fa79a70b251.tar.gz |
tests: more cache conversion checks
-rw-r--r-- | test/shell/lvconvert-cache-raid.sh | 24 | ||||
-rw-r--r-- | test/shell/lvconvert-cache.sh | 12 |
2 files changed, 35 insertions, 1 deletions
diff --git a/test/shell/lvconvert-cache-raid.sh b/test/shell/lvconvert-cache-raid.sh index b0d8da255..b533bdc46 100644 --- a/test/shell/lvconvert-cache-raid.sh +++ b/test/shell/lvconvert-cache-raid.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 2014 Red Hat, Inc. All rights reserved. +# Copyright (C) 2014-2015 Red Hat, Inc. All rights reserved. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions @@ -74,4 +74,26 @@ aux wait_for_sync $vg cpool_cdata lvconvert --splitmirrors 1 --name split_meta $vg/cpool_cmeta "$dev1" lvconvert --splitmirrors 1 --name split_data $vg/cpool_cdata "$dev1" +lvremove -f $vg + + +# Test up/down raid conversion of cache pool data and metadata +lvcreate --type cache-pool $vg/cpool -l 10 +lvcreate -n corigin -H $vg/cpool -l 20 + +lvconvert -m+1 --type raid1 $vg/cpool_cmeta +check lv_field $vg/cpool_cmeta layout "raid,raid1" +check lv_field $vg/cpool_cmeta role "private,cache,pool,metadata" + +lvconvert -m+1 --type raid1 $vg/cpool_cdata +check lv_field $vg/cpool_cdata layout "raid,raid1" +check lv_field $vg/cpool_cdata role "private,cache,pool,data" + +lvconvert -m-1 $vg/cpool_cmeta +check lv_field $vg/cpool_cmeta layout "linear" +lvconvert -m-1 $vg/cpool_cdata +check lv_field $vg/cpool_cdata layout "linear" + +lvremove -f $vg + vgremove -f $vg diff --git a/test/shell/lvconvert-cache.sh b/test/shell/lvconvert-cache.sh index 5a38d9cd3..de8803216 100644 --- a/test/shell/lvconvert-cache.sh +++ b/test/shell/lvconvert-cache.sh @@ -135,6 +135,18 @@ fail lvconvert --yes --type cache-pool --chunksize 16M --poolmetadata $lv2 $vg/$ lvremove -f $vg +######################## +# Repair of cache pool # +######################## +lvcreate --type cache-pool -an -v -L 2 -n cpool $vg +lvcreate -H -L 4 -n corigin --cachepool $vg/cpool + +# unsupported yet +fail lvconvert --repair $vg/cpool 2>&1 | tee out +grep "not yet implemented" out + +lvremove -f $vg + ########################## # Prohibited conversions # ########################## |