2 # Copyright (C) 2010 Red Hat, Inc. All rights reserved.
4 # This copyrighted material is made available to anyone wishing to use,
5 # modify, copy, or redistribute it subject to the terms and conditions
6 # of the GNU General Public License v.2.
8 # You should have received a copy of the GNU General Public License
9 # along with this program; if not, write to the Free Software Foundation,
10 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 vgcreate -c n -s 1k $vg $devs
18 lvcreate -n one -l 10 $vg
19 lvcreate -s -l 8 -n snapA $vg/one
20 lvcreate -s -c 4k -l 8 -n snapX1 $vg/one
21 lvcreate -s -c 8k -l 16 -n snapX2 $vg/one
23 # Check that snapshots that are too small are caught with correct error.
24 not lvcreate -s -c 8k -l 8 -n snapX3 $vg/one 2>&1 | tee lvcreate.out
25 not grep "suspend origin one" lvcreate.out
26 grep "Unable to create a snapshot" lvcreate.out
28 not lvcreate -s -l 4 -n snapB $vg/one 2>&1 | tee lvcreate.out
29 not grep "suspend origin one" lvcreate.out
30 grep "Unable to create a snapshot" lvcreate.out