master - man: lvmthin chunk and metadata sizes
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3225f8d17596b7...
Commit: 3225f8d17596b79b76ed9da5291843d02a2aa7b6
Parent: 778b66a7199b5fe05d59df55bd23e681759c2bbe
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed May 27 15:53:01 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed May 27 15:53:01 2015 -0500
man: lvmthin chunk and metadata sizes
Clear some stale information, and give a suggestion to use
a metadata size of 1GiB.
---
man/lvmthin.7.in | 54 ++++++++++++++++++++++++++++++------------------------
1 files changed, 30 insertions(+), 24 deletions(-)
diff --git a/man/lvmthin.7.in b/man/lvmthin.7.in
index 79ca40a..eb791f0 100644
--- a/man/lvmthin.7.in
+++ b/man/lvmthin.7.in
@@ -907,12 +907,12 @@ autoextend the LV by this much additional space.
To see the default values of these settings, run:
-.B lvmconfig --type default --withcomment
+.B lvmconfig \-\-type default \-\-withcomment
.RS
.B activation/thin_pool_autoextend_threshold
.RE
-.B lvmconfig --type default --withcomment
+.B lvmconfig \-\-type default \-\-withcomment
.RS
.B activation/thin_pool_autoextend_percent
.RE
@@ -973,7 +973,7 @@ file with the profile also needs to be moved.
.IP \[bu] 2
Only certain settings can be used in a VG or LV profile, see:
.br
-.B lvmconfig --type profilable-metadata.
+.B lvmconfig \-\-type profilable-metadata.
.IP \[bu] 2
An LV without a profile of its own will inherit the VG profile.
@@ -986,9 +986,9 @@ Remove a profile from an LV using the command:
.IP \[bu] 2
Commands can also have profiles applied to them. The settings that can be
applied to a command are different than the settings that can be applied
-to a VG or LV. See lvmconfig --type profilable-command. To apply a
+to a VG or LV. See lvmconfig \-\-type profilable\-command. To apply a
profile to a command, write a profile, save it in the profile directory,
-and run the command using the option: --commandprofile ProfileName.
+and run the command using the option: \-\-commandprofile ProfileName.
.SS Zeroing
@@ -1076,14 +1076,13 @@ controls the default discards mode used when creating a thin pool.
\&
-The size of data blocks managed by a thin pool can be specified with
-the \-\-chunksize option when the thin pool LV is created. The default
-unit is kilobytes and the default value is 64KiB. The value must be a
-power of two between 4KiB and 1GiB.
+The size of data blocks managed by a thin pool can be specified with the
+\-\-chunksize option when the thin pool LV is created. The default unit
+is KiB. The value must be a multiple of 64KiB between 64KiB and 1GiB.
-When a thin pool is used primarily for the thin provisioning feature,
-a larger value is optimal. To optimize for a lot of snapshotting,
-a smaller value reduces copying time and consumes less space.
+When a thin pool is used primarily for the thin provisioning feature, a
+larger value is optimal. To optimize for many snapshots, a smaller value
+reduces copying time and consumes less space.
Command to display the thin pool LV chunk size:
.br
@@ -1101,25 +1100,32 @@ Command to display the thin pool LV chunk size:
.br
controls the default chunk size used when creating a thin pool.
+The default value is shown by:
+.br
+.B lvmconfig \-\-type default allocation/thin_pool_chunk_size
+
.SS Size of pool metadata LV
\&
-The amount of thin metadata depends on how many blocks are shared
-between thin LVs (i.e. through snapshots). A thin pool with many
-snapshots may need a larger metadata LV.
+The amount of thin metadata depends on how many blocks are shared between
+thin LVs (i.e. through snapshots). A thin pool with many snapshots may
+need a larger metadata LV. Thin pool metadata LV sizes can be from 2MiB
+to 16GiB.
-The range of supported metadata LV sizes is 2MiB to 16GiB.
-.br
-The default size is estimated with the formula:
-.br
-ThinPoolLVSize / ThinPoolLVChunkSize * 64b.
+When using lvcreate to create what will become a thin metadata LV, the
+size is specified with the \-L|\-\-size option.
+
+When an LVM command automatically creates a thin metadata LV, the size is
+specified with the \-\-poolmetadatasize option. When this option is not
+given, LVM automatically chooses a size based on the data size and chunk
+size.
-When creating a thin metadata LV explicitly, the size is specified
-in the lvcreate command. When a command automatically creates a
-thin metadata LV, the \-\-poolmetadatasize option can be used specify
-a non-default size. The default unit is megabytes.
+It can be hard to predict the amount of metadata space that will be
+needed, so it is recommended to start with a size of 1GiB which should be
+enough for all practical purposes. A thin pool metadata LV can later be
+manually or automatically extended if needed.
.SS Create a thin snapshot of an external, read only LV
8 years, 10 months
master - tests: check for idle only for raid type
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=778b66a7199b5f...
Commit: 778b66a7199b5fe05d59df55bd23e681759c2bbe
Parent: 6e4c04b1becf171d6c337771839cf5a82bd901c0
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed May 27 11:59:10 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed May 27 11:59:10 2015 +0200
tests: check for idle only for raid type
---
test/lib/check.sh | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/test/lib/check.sh b/test/lib/check.sh
index 23af3a9..a6a9b38 100644
--- a/test/lib/check.sh
+++ b/test/lib/check.sh
@@ -202,6 +202,10 @@ in_sync() {
# 6th argument is the sync ratio for RAID
idx=6
type=${a[3]}
+ if [ ${a[$(($idx + 1))]} != "idle" ]; then
+ echo "$lvm_name ($type$snap) is not in-sync"
+ return 1
+ fi
elif [ ${a[2]} = "mirror" ]; then
# 4th Arg tells us how far to the sync ratio
idx=$((${a[3]} + 4))
@@ -212,7 +216,7 @@ in_sync() {
b=( $(echo ${a[$idx]} | sed s:/:' ':) )
- if [ ${a[$(($idx + 1))]} != "idle" -o ${b[0]} -eq 0 -o ${b[0]} != ${b[1]} ]; then
+ if [ ${b[0]} -eq 0 -o ${b[0]} != ${b[1]} ]; then
echo "$lvm_name ($type$snap) is not in-sync"
return 1
fi
@@ -222,7 +226,6 @@ in_sync() {
fi
echo "$lvm_name ($type$snap) is in-sync"
- return 0
}
active() {
8 years, 10 months
master - lvmetad: missing wrapper for lvmetad less compilation
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6e4c04b1becf17...
Commit: 6e4c04b1becf171d6c337771839cf5a82bd901c0
Parent: d3abc25e76d351b1269f55ff524368eb4ddf00b1
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed May 27 11:44:33 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed May 27 11:44:33 2015 +0200
lvmetad: missing wrapper for lvmetad less compilation
---
lib/cache/lvmetad.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/cache/lvmetad.h b/lib/cache/lvmetad.h
index 4ee07bb..6769f76 100644
--- a/lib/cache/lvmetad.h
+++ b/lib/cache/lvmetad.h
@@ -185,6 +185,7 @@ int lvmetad_pvscan_foreign_vgs(struct cmd_context *cmd, activation_handler handl
# define lvmetad_pv_lookup(cmd, pvid, found) (0)
# define lvmetad_pv_lookup_by_dev(cmd, dev, found) (0)
# define lvmetad_vg_list_to_lvmcache(cmd) (1)
+# define lvmetad_get_vgnameids(cmd, vgnameids) do { } while (0)
# define lvmetad_vg_lookup(cmd, vgname, vgid) (NULL)
# define lvmetad_pvscan_single(cmd, dev, handler, ignore_obsolete) (0)
# define lvmetad_pvscan_all_devs(cmd, handler) (0)
8 years, 10 months
master - tests: check for clmvd socket
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d3abc25e76d351...
Commit: d3abc25e76d351b1269f55ff524368eb4ddf00b1
Parent: f0a4955eb1e9fe070d10f451d9d296ceb665fbaa
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed May 27 10:43:24 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed May 27 11:10:43 2015 +0200
tests: check for clmvd socket
A bit hacky since it expects PID_DIR == DEFAULT_RUN_DIR for now,
just to check whether it fixes startup clvmd sync problem.
---
test/lib/aux.sh | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index fedf726..53ebd8a 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -50,7 +50,7 @@ prepare_clvmd() {
for i in {1..100} ; do
test $i -eq 100 && die "Startup of clvmd is too slow."
- test -e "$CLVMD_PIDFILE" && break
+ test -e "$CLVMD_PIDFILE" -a -e "${CLVMD_PIDFILE%/*}/lvm/clvmd.sock" && break
sleep .2
done
}
@@ -572,8 +572,8 @@ prepare_devs() {
test -f LOOP || for d in ${DEVICES[@]}; do
blkdiscard "$d" 2>/dev/null || true
# ensure disk header is always zeroed
- dd if=/dev/zero of="$d" bs=4096 count=1
- wipefs -a "$d" 2>/dev/null || dd if=/dev/zero of="$d" bs=64K count=1
+ dd if=/dev/zero of="$d" bs=32k count=1
+ wipefs -a "$d" 2>/dev/null || true
done
#for i in `seq 1 $n`; do
8 years, 10 months
master - tests: better check for array in sync
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f0a4955eb1e9fe...
Commit: f0a4955eb1e9fe070d10f451d9d296ceb665fbaa
Parent: c254743ef31f1d36f85329cad1a5c3b55fca2bb0
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue May 26 13:11:46 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed May 27 11:10:43 2015 +0200
tests: better check for array in sync
Update check for raid array being in sync - getting somewhat complex.
It's another way to fight with problems in:
https://bugzilla.redhat.com/show_bug.cgi?id=1210637
---
test/lib/check.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/lib/check.sh b/test/lib/check.sh
index 5244290..23af3a9 100644
--- a/test/lib/check.sh
+++ b/test/lib/check.sh
@@ -212,7 +212,7 @@ in_sync() {
b=( $(echo ${a[$idx]} | sed s:/:' ':) )
- if [ ${b[0]} != ${b[1]} ]; then
+ if [ ${a[$(($idx + 1))]} != "idle" -o ${b[0]} -eq 0 -o ${b[0]} != ${b[1]} ]; then
echo "$lvm_name ($type$snap) is not in-sync"
return 1
fi
8 years, 10 months
master - tests: drop debug print
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c254743ef31f1d...
Commit: c254743ef31f1d36f85329cad1a5c3b55fca2bb0
Parent: d1531ab26d047d95c03c6e5f101c52dd47d47435
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon May 25 09:59:02 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed May 27 11:10:43 2015 +0200
tests: drop debug print
---
test/lib/inittest.sh | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/test/lib/inittest.sh b/test/lib/inittest.sh
index 1af0503..0b898f3 100644
--- a/test/lib/inittest.sh
+++ b/test/lib/inittest.sh
@@ -100,7 +100,6 @@ else
aux prepare_clvmd
fi
-echo "LVM_TEST_LVMPOLLD=$LVM_TEST_LVMPOLLD"
test -n "$LVM_TEST_LVMPOLLD" && {
export LVM_LVMPOLLD_SOCKET="$TESTDIR/lvmpolld.socket"
export LVM_LVMPOLLD_PIDFILE="$TESTDIR/lvmpolld.pid"
8 years, 10 months
master - cleanup: gcc warn fix, don't hide pvs()
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d1531ab26d047d...
Commit: d1531ab26d047d95c03c6e5f101c52dd47d47435
Parent: 1aba262edb7f0bfac897223868779053f4921ff9
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri May 22 16:23:19 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed May 27 11:10:43 2015 +0200
cleanup: gcc warn fix, don't hide pvs()
---
daemons/lvmetad/lvmetad-core.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/daemons/lvmetad/lvmetad-core.c b/daemons/lvmetad/lvmetad-core.c
index 449e332..db8d918 100644
--- a/daemons/lvmetad/lvmetad-core.c
+++ b/daemons/lvmetad/lvmetad-core.c
@@ -473,8 +473,8 @@ static void mark_outdated_pv(lvmetad_state *s, const char *vgid, const char *pvi
static void chain_outdated_pvs(lvmetad_state *s, const char *vgid, struct dm_config_tree *metadata_cft, struct dm_config_node *metadata)
{
struct dm_config_tree *cft = dm_hash_lookup(s->vgid_to_outdated_pvs, vgid), *pvmeta;
- struct dm_config_node *pv, *res, *pvs = cft ? dm_config_find_node(cft->root, "outdated_pvs/pv_list") : NULL;
- struct dm_config_value *pvs_v = pvs ? pvs->v : NULL;
+ struct dm_config_node *pv, *res, *out_pvs = cft ? dm_config_find_node(cft->root, "outdated_pvs/pv_list") : NULL;
+ struct dm_config_value *pvs_v = out_pvs ? out_pvs->v : NULL;
if (!pvs_v)
return;
if (!(res = make_config_node(metadata_cft, "outdated_pvs", metadata_cft->root, 0)))
8 years, 10 months
master - lvmpolld: terminate error message with a dot and LF
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1aba262edb7f0b...
Commit: 1aba262edb7f0bfac897223868779053f4921ff9
Parent: f0268585dd962a7b0393160c042fefb72c64701c
Author: Ondrej Kozina <okozina(a)redhat.com>
AuthorDate: Wed May 27 08:24:36 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed May 27 11:10:43 2015 +0200
lvmpolld: terminate error message with a dot and LF
---
daemons/lvmpolld/lvmpolld-core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/daemons/lvmpolld/lvmpolld-core.c b/daemons/lvmpolld/lvmpolld-core.c
index c1d583e..c5b22d7 100644
--- a/daemons/lvmpolld/lvmpolld-core.c
+++ b/daemons/lvmpolld/lvmpolld-core.c
@@ -957,7 +957,7 @@ int main(int argc, char *argv[])
break;
case 't': /* --timeout in seconds */
if (!process_timeout_arg(optarg, &di.max_timeouts)) {
- fprintf(stderr, "Invalid value of timeout parameter");
+ fprintf(stderr, "Invalid value of timeout parameter.\n");
exit(EXIT_FAILURE);
}
/* 0 equals to wait indefinitely */
8 years, 10 months
master - WHATS_NEW: various updates
by okozina
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f0268585dd962a...
Commit: f0268585dd962a7b0393160c042fefb72c64701c
Parent: 8af5f54824f889c438104625dbe159f6e8dedbc4
Author: Ondrej Kozina <okozina(a)redhat.com>
AuthorDate: Tue May 26 16:08:24 2015 +0200
Committer: Ondrej Kozina <okozina(a)redhat.com>
CommitterDate: Tue May 26 16:28:04 2015 +0200
WHATS_NEW: various updates
commit c069aff21b1450923b59e98ab709a5e667cdcda9
commit 8af5f54824f889c438104625dbe159f6e8dedbc4
---
WHATS_NEW | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 29eb501..bfcc094 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,7 @@
Version 2.02.121 -
================================
+ Zero errno in before strtoul call in dmsetup if tested after the call.
+ Zero errno in before strtoul call in lvmpolld.
Fix a segfault in pvscan --cache --background command.
Fix test for AREA_PV when checking for failed mirrors.
Do not use --sysinit in lvm2-activation{-early,-net}.service if lvmpolld used.
8 years, 10 months
master - dmsetup: zero errno in before strtoul call
by okozina
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8af5f54824f889...
Commit: 8af5f54824f889c438104625dbe159f6e8dedbc4
Parent: c069aff21b1450923b59e98ab709a5e667cdcda9
Author: Ondrej Kozina <okozina(a)redhat.com>
AuthorDate: Tue May 26 16:01:40 2015 +0200
Committer: Ondrej Kozina <okozina(a)redhat.com>
CommitterDate: Tue May 26 16:27:10 2015 +0200
dmsetup: zero errno in before strtoul call
Testing errno value without explicitly setting to
zero in before the strtoul call may lead to
unexpected failures.
---
tools/dmsetup.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/tools/dmsetup.c b/tools/dmsetup.c
index 4202dbb..f200e94 100644
--- a/tools/dmsetup.c
+++ b/tools/dmsetup.c
@@ -914,6 +914,7 @@ static uint32_t _get_cookie_value(const char *str_value)
unsigned long int value;
char *p;
+ errno = 0;
if (!(value = strtoul(str_value, &p, 0)) ||
*p ||
(value == ULONG_MAX && errno == ERANGE) ||
8 years, 10 months