master - tests: more cache conversion checks
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=da50f8bee654b029e2fc818b66765fa79a70b251 Commit: da50f8bee654b029e2fc818b66765fa79a70b251 Parent: 795616a87bbb5fd2a3925e1445bb1a94ce718d55 Author: Zdenek Kabelac <[email protected]> AuthorDate: Thu Nov 19 14:31:58 2015 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Thu Nov 19 14:40:49 2015 +0100
tests: more cache conversion checks
--- test/shell/lvconvert-cache-raid.sh | 24 +++++++++++++++++++++++- test/shell/lvconvert-cache.sh | 12 ++++++++++++ 2 files changed, 35 insertions(+), 1 deletions(-)
test/shell/lvconvert-cache-raid.sh +23 -1
@@ -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
test/shell/lvconvert-cache.sh +12 -0
@@ -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 # ##########################