~ubuntu-branches/debian/sid/lvm2/sid

« back to all changes in this revision

Viewing changes to test/shell/lvcreate-cache.sh

  • Committer: Package Import Robot
  • Author(s): Bastian Blank
  • Date: 2014-08-19 15:37:06 UTC
  • mfrom: (1.1.18)
  • Revision ID: package-import@ubuntu.com-20140819153706-i1gaio8lg534dara
Tags: 2.02.109-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
# along with this program; if not, write to the Free Software Foundation,
10
10
# Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
11
11
 
12
 
. lib/test
 
12
. lib/inittest
13
13
 
14
 
aux target_at_least dm-cache 1 3 0 || skip
 
14
aux have_cache 1 3 0 || skip
15
15
 
16
16
aux prepare_vg 5 80
17
17
 
69
69
#lvcreate -H -l 2 $vg/cache_pool -n $lv1
70
70
#lvremove -f $vg
71
71
 
72
 
if [ 1 -eq 0 ]; then
 
72
# Bug 1110026
73
73
# Create origin, then cache_pool and cache
74
 
# FIXME: This case needs to use lvconvert
75
 
lvcreate -l 2 -n $lv1 $vg
76
 
lvconvert --type cache -l 1 $vg/$lv1 $mode
77
 
dmsetup table ${vg}-$lv1 | grep cache  # ensure it is loaded in kernel
78
 
lvremove -ff $vg
79
 
fi
 
74
lvcreate -aey -l 2 -n $lv1 $vg
 
75
lvcreate --type cache -l 1 $vg/$lv1
 
76
#should dmsetup table ${vg}-$lv1 | grep cache  # ensure it is loaded in kernel
 
77
lvremove -ff $vg
 
78
 
 
79
# Bug 1110026 & Bug 1095843
 
80
# Create RAID1 origin, then cache_pool and cache
 
81
lvcreate -aey -l 2 -n $lv1 $vg
 
82
lvcreate --type cache -l 1 $vg/$lv1
 
83
#should lvs -a $vg/${lv1}_corig_rimage_0        # ensure images are properly renamed
 
84
#should dmsetup table ${vg}-$lv1 | grep cache  # ensure it is loaded in kernel
 
85
lvremove -ff $vg
80
86
 
81
87
# Shorthand CLI (origin exists, create cache_pool and cache)
82
88
#lvcreate -l 1 -n $lv1 $vg
95
101
##############################
96
102
 
97
103
# Attempt to create smaller cache than origin should fail
98
 
lvcreate -l 1 -n $lv1 $vg
 
104
lvcreate -aey -l 1 -n $lv1 $vg
99
105
not lvcreate --type cache -l 2 $vg/$lv1
100
106
 
101
107