summaryrefslogtreecommitdiff
path: root/test/shell/thin-large.sh
blob: 714f91e03966b5c9eb3075dc6562e1fb85cbf5e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env bash

# Copyright (C) 2017 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
# of the GNU General Public License v.2.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

# 'Exercise logic around boundary sizes of thin-pool data and chunksize


SKIP_WITH_LVMPOLLD=1

. lib/inittest

# FIXME  update test to make something useful on <16T
aux can_use_16T || skip

aux have_thin 1 0 0 || skip

# Prepare ~1P sized devices
aux prepare_vg 1 1000000000

lvcreate -an -T -L250T $vg/pool250

lvcreate -an -T -L250T --poolmetadatasize 16G $vg/pool16

fail lvcreate -an -T -L250T --chunksize 64K --poolmetadatasize 16G $vg/pool64

# Creation of thin-pool with proper chunk-size but not enough metadata size
# which can grow later needs to pass
lvcreate -an -T -L250T --chunksize 1M --poolmetadatasize 4G $vg/pool1024

# Creation of chunk should fit
lvcreate -an -T -L12T --chunksize 64K --poolmetadatasize 16G $vg/pool64

check lv_field $vg/pool64 chunksize "64.00k"

lvremove -ff $vg


### Check also lvconvert ###

lvcreate -an -L250T -n pool $vg

fail lvconvert -y --chunksize 64 --thinpool $vg/pool
lvconvert -y --chunksize 1M --thinpool $vg/pool

check lv_field $vg/pool chunksize "1.00m"

vgremove -ff $vg