1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

tests: more cache conversion checks

This commit is contained in:
Zdenek Kabelac 2015-11-19 14:31:58 +01:00
parent 795616a87b
commit da50f8bee6
2 changed files with 35 additions and 1 deletions

View File

@ -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

View File

@ -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 #
##########################