public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: zkabelac@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2/test/shell lvcreate-thin.sh
Date: Sun, 04 Mar 2012 16:04:00 -0000	[thread overview]
Message-ID: <20120304160453.17892.qmail@sourceware.org> (raw)

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


             reply	other threads:[~2012-03-04 16:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-04 16:04 zkabelac [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-12-21 13:45 zkabelac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120304160453.17892.qmail@sourceware.org \
    --to=zkabelac@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).