public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/test/shell lvcreate-thin.sh
@ 2012-03-04 16:04 zkabelac
  0 siblings, 0 replies; 2+ messages in thread
From: zkabelac @ 2012-03-04 16:04 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2012-03-04 16:04:52

Modified files:
	test/shell     : lvcreate-thin.sh 

Log message:
	Update thin test for thin_check
	
	Test if thin_check is present in system and disable its use, when its missing.
	
	Add testing for poolmetadatasize.
	
	FIXME: Allocation policy for metadata pool might need some relaxing.
	(For now it needs to put all block on one PV.)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/shell/lvcreate-thin.sh.diff?cvsroot=lvm2&r1=1.2&r2=1.3

--- LVM2/test/shell/lvcreate-thin.sh	2011/12/21 13:45:42	1.2
+++ LVM2/test/shell/lvcreate-thin.sh	2012/03/04 16:04:52	1.3
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Copyright (C) 2011 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2011-2012 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
@@ -38,14 +38,15 @@
 #
 aux target_at_least dm-thin-pool 1 0 0 || skip
 
-aux prepare_devs 2 64
+aux prepare_pvs 2 64
 
-pvcreate $dev1 $dev2
+# disable thin_check if not present in system
+which thin_check || aux lvmconf 'global/thin_check_executable = ""'
 
 clustered=
 test -e LOCAL_CLVMD && clustered="--clustered y"
 
-vgcreate $clustered $vg -s 64K $dev1 $dev2
+vgcreate $clustered $vg -s 64K $(cat DEVICES)
 
 # Create named pool only
 lvcreate -l1 -T $vg/pool1
@@ -184,3 +185,32 @@
 lvcreate -L4M -V2G --name lv1 -T $vg/pool1
 # Origin name is not accepted
 not lvcreate -s $vg/lv1 -L4M -V2G --name $vg/lv4
+vgremove -ff $vg
+
+
+# Test --poolmetadatasize
+# allocating large devices for testing
+aux teardown_devs
+aux prepare_pvs 7 16500
+vgcreate $clustered $vg -s 64K $(cat DEVICES)
+
+lvcreate -L4M --chunksize 128 -T $vg/pool
+lvcreate -L4M --chunksize 128 --poolmetadatasize 0 -T $vg/pool1 2>out
+grep "WARNING: Minimum" out
+# FIXME: metadata allocation fails, if PV doesn't have at least 16GB
+# i.e. pool metadata device cannot be multisegment
+lvcreate -L4M --chunksize 128 --poolmetadatasize 17G -T $vg/pool2 2>out
+grep "WARNING: Maximum" out
+check lv_field $vg/pool_tmeta size  "2.00m"
+check lv_field $vg/pool1_tmeta size "2.00m"
+check lv_field $vg/pool2_tmeta size "16.00g"
+lvremove -ff $vg
+
+# check automatic calculation of poolmetadatasize
+lvcreate -L10G --chunksize 128 -T $vg/pool
+lvcreate -L10G --chunksize 256 -T $vg/pool1
+lvcreate -L60G --chunksize 1024 -T $vg/pool2
+check lv_field $vg/pool_tmeta size  "5.00m"
+check lv_field $vg/pool1_tmeta size "2.50m"
+check lv_field $vg/pool2_tmeta size "3.75m"
+vgremove -ff $vg


^ permalink raw reply	[flat|nested] 2+ messages in thread

* LVM2/test/shell lvcreate-thin.sh
@ 2011-12-21 13:45 zkabelac
  0 siblings, 0 replies; 2+ messages in thread
From: zkabelac @ 2011-12-21 13:45 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2011-12-21 13:45:43

Modified files:
	test/shell     : lvcreate-thin.sh 

Log message:
	Thin update test case
	
	Use thin-pool instead of thin_pool type.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/shell/lvcreate-thin.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2

--- LVM2/test/shell/lvcreate-thin.sh	2011/11/21 00:15:46	1.1
+++ LVM2/test/shell/lvcreate-thin.sh	2011/12/21 13:45:42	1.2
@@ -54,9 +54,9 @@
 lvcreate -l1 --type thin $vg/pool4
 lvcreate -l1 --type thin --thinpool $vg/pool5
 lvcreate -l1 --type thin --thinpool pool6 $vg
-lvcreate -l1 --type thin_pool $vg/pool7
-lvcreate -l1 --type thin_pool --thinpool $vg/pool8
-lvcreate -l1 --type thin_pool --thinpool pool9 $vg
+lvcreate -l1 --type thin-pool $vg/pool7
+lvcreate -l1 --type thin-pool --thinpool $vg/pool8
+lvcreate -l1 --type thin-pool --thinpool pool9 $vg
 
 lvremove -ff $vg/pool1 $vg/pool2 $vg/pool3 $vg/pool4 $vg/pool5 $vg/pool6 $vg/pool7 $vg/pool8 $vg/pool9
 check vg_field $vg lv_count 0
@@ -65,7 +65,7 @@
 # Create default pool name
 lvcreate -l1 -T $vg
 lvcreate -l1 --type thin $vg
-lvcreate -l1 --type thin_pool $vg
+lvcreate -l1 --type thin-pool $vg
 
 lvremove -ff $vg/lvol0 $vg/lvol1 $vg/lvol2
 check vg_field $vg lv_count 0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-04 16:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-04 16:04 LVM2/test/shell lvcreate-thin.sh zkabelac
  -- strict thread matches above, loose matches on Subject: below --
2011-12-21 13:45 zkabelac

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).