v2_02_162 annotated tag has been created
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=752a0d83dcd3ce...
Commit: 752a0d83dcd3ce8b40f42baa3522b6e5dbebf767
Parent: 0000000000000000000000000000000000000000
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: 2016-07-28 18:45 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: 2016-07-28 18:45 +0000
annotated tag: v2_02_162 has been created
at 752a0d83dcd3ce8b40f42baa3522b6e5dbebf767 (tag)
tagging 6f47e79a88ff73182825b7b07c29b4775c4698c4 (commit)
replaces v2_02_161
Release 2.02.162.
A release that mostly consists of bug fixes.
Note one behavoural change that can be reverted by setting
allocation/raid_stripe_all_devices to 1.
43 files changed, 1516 insertions(+), 641 deletions(-)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
iEYEABECAAYFAleaU7sACgkQIoGRwVZ+LBc1WACbB9/P+TwYNxSoOIiWje98jSGi
CUAAoMnhKZAJW0fS7Y9ze/Lb0aIqUmi6
=TC1b
-----END PGP SIGNATURE-----
Alasdair G Kergon (8):
post-release
raid_manip: Reorder some functions.
raid_manip: Fix stripe_size type to uint32_t.
raid_manip: Some validation functions.
segtype: Fix unrecognised flag message.
lvconvert: --trackchanges requires --splitmirrors
lvconvert: --trackchanges requires --splitmirrors 1
pre-release
Bryn M. Reeves (5):
libdm: free hist_arg in _stats_create_file_regions() (Coverity)
dmstats: free bounds string in _stats_create_file() (Coverity)
libdm: document use of dm_free() with histogram bounds
dmstats: check uuid, major, and alldevices before argc (Coverity)
dmstats: fix bounds leak in _do_stats_create_regions() (Coverity)
David Teigland (11):
lvmetad: free memory on exit
lvmetad: use committed metadata to update
lvmetad: fix use committed metadata to update
lvconvert: allow implied cache pool convert
lvconvert: change error message
lvmlockd: improve activation locking error message
lvmlockd: improve message for lock-start
lvconvert: remove warnings about deprecated split option
lvmlockd: improve error message about missing global lock
man: lvmthin clean up syntax example
vgsplit: restore check for thin pool external origin
Heinz Mauelshagen (10):
lvconvert: raid0 replace attempt segfaults
lvcreate: raid0 needs default number of stripes
lvcreate: conditionally set stripesize
vg_validate: segment check enhancements for raids to catch bogus metadata
lvcreate.c: respect DEFAULT_RAID_MAX_IMAGES on creation of any RaidLV
vg_validate: fix seg->extents_copied check introduced with
vg_validate: add missing check for raid6 segment types
vg_validate: only reject min_recovery_rate in case max_recovery_rate is set and smaller
man: lvcreate correction on --stripes explanation and examples
vgsplit: ea90a3d622 added an unconditional call to lv_is_on_pvs()
Peter Rajnoha (6):
scripts: blkdeactivate: fix typo for DEV_DIR when executing blkdeactivate -m disablequeueing
conf: regenerate example.conf.in
man: add note about 'lastlog' built-in command
libdm: report: fix json reporting to escape '"' character that may appear in reported string
metadata: fix automatic updates of PV extension headers to newest version
tests: add pv-ext-update.sh test
Tony Asleson (2):
lvmdbusd: Fix hang for Job.Wait(n)
lvmdbusd: Add '-y' to lvconvert for lv cache create
Zdenek Kabelac (12):
lvconvert: enable work with partial LVs
tests: enforce flush of cache target
lvconvert: reusing old cache pool metadata needs -Zn
man: drop .R
tests: check thin resize of raid10
lvconvert: suppress zeroing warning when converting to thin
lvconvert: tune cache-pool zeroing
lvconvert: support --zero for full cache pool conversion.
tests: adapt for new cache-pool zeroing
tests: check we don't warn when converting to thin LV
config: keep new setting commented out
tests: updates for new raid allocation logic
7 years, 8 months
master - post-release
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6b6e258e0ce1c0...
Commit: 6b6e258e0ce1c0ab58fc5a465d2617505bc7c814
Parent: 6f47e79a88ff73182825b7b07c29b4775c4698c4
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Thu Jul 28 19:58:22 2016 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Thu Jul 28 19:58:22 2016 +0100
post-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 3 +++
WHATS_NEW_DM | 3 +++
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/VERSION b/VERSION
index 297b796..32cef62 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.162(2)-git (2016-07-28)
+2.02.163(2)-git (2016-07-28)
diff --git a/VERSION_DM b/VERSION_DM
index f59b94f..41ac4ce 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.132-git (2016-07-28)
+1.02.133-git (2016-07-28)
diff --git a/WHATS_NEW b/WHATS_NEW
index 409a8ab..2ef2e09 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,3 +1,6 @@
+Version 2.02.163 -
+=================================
+
Version 2.02.162 - 28th July 2016
=================================
Extend vg_validate also to check raid configurations thoroughly.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index c8ee4ae..74722c5 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,3 +1,6 @@
+Version 1.02.133 -
+=================================
+
Version 1.02.132 - 28th July 2016
=================================
Fix json reporting to escape '"' character that may appear in reported string.
7 years, 8 months
master - pre-release
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6f47e79a88ff73...
Commit: 6f47e79a88ff73182825b7b07c29b4775c4698c4
Parent: a579ba2ac27d9651165e7e997a5ff855dc83c170
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Thu Jul 28 18:35:32 2016 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Thu Jul 28 18:36:45 2016 +0100
pre-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 7 ++++++-
WHATS_NEW_DM | 2 +-
conf/example.conf.in | 1 +
lib/config/config_settings.h | 3 ++-
tools/lvcreate.c | 5 +++++
7 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/VERSION b/VERSION
index 297fa86..297b796 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.162(2)-git (2016-07-15)
+2.02.162(2)-git (2016-07-28)
diff --git a/VERSION_DM b/VERSION_DM
index 79d0cc5..f59b94f 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.132-git (2016-07-15)
+1.02.132-git (2016-07-28)
diff --git a/WHATS_NEW b/WHATS_NEW
index 25d3b83..409a8ab 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
-Version 2.02.162 -
+Version 2.02.162 - 28th July 2016
=================================
+ Extend vg_validate also to check raid configurations thoroughly.
Support lvconvert -Zn also when doing full cache pool conversion.
Suppress not zeroing warn when converting to thin LV for non-zeroing tpool.
Fix automatic updates of PV extension headers to newest version.
@@ -7,7 +8,11 @@ Version 2.02.162 -
Add note about lastlog built-in command to lvm man page.
Fix unrecognised segtype flag message.
lvconvert not clears cache pool metadata ONLY with -Zn.
+ Add allocation/raid_stripe_all_devices to reinstate previous behaviour.
+ Create raid stripes across fixed small numbers of PVs instead of all PVs.
Enabled lvconvert --uncache to work with partial VG.
+ Disallow lvconvert --replace with raid0* LVs.
+ Fix some lvmetad changed VG metadata notifications that sent uncommitted data.
Version 2.02.161 - 15th July 2016
=================================
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 00f897a..c8ee4ae 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,4 +1,4 @@
-Version 1.02.132 -
+Version 1.02.132 - 28th July 2016
=================================
Fix json reporting to escape '"' character that may appear in reported string.
diff --git a/conf/example.conf.in b/conf/example.conf.in
index 4ac09e2..b98a19f 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -381,6 +381,7 @@ allocation {
# Stripe across all PVs when RAID stripes are not specified.
# If enabled, all PVs in the VG or on the command line are used for raid0/4/5/6/10
# when the command does not specify the number of stripes to use.
+ # This was the default behaviour until release 2.02.162.
# This configuration option has an automatic default value.
# raid_stripe_all_devices = 0
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 1e4b689..9c46667 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -464,7 +464,8 @@ cfg(allocation_mirror_logs_require_separate_pvs_CFG, "mirror_logs_require_separa
cfg(allocation_raid_stripe_all_devices_CFG, "raid_stripe_all_devices", allocation_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, DEFAULT_ALLOCATION_STRIPE_ALL_DEVICES, vsn(2, 2, 162), NULL, 0, NULL,
"Stripe across all PVs when RAID stripes are not specified.\n"
"If enabled, all PVs in the VG or on the command line are used for raid0/4/5/6/10\n"
- "when the command does not specify the number of stripes to use.\n")
+ "when the command does not specify the number of stripes to use.\n"
+ "This was the default behaviour until release 2.02.162.\n")
cfg(allocation_cache_pool_metadata_require_separate_pvs_CFG, "cache_pool_metadata_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_CACHE_POOL_METADATA_REQUIRE_SEPARATE_PVS, vsn(2, 2, 106), NULL, 0, NULL,
"Cache pool metadata and data will always use different PVs.\n")
diff --git a/tools/lvcreate.c b/tools/lvcreate.c
index 1ed39e2..5e3ddbb 100644
--- a/tools/lvcreate.c
+++ b/tools/lvcreate.c
@@ -572,6 +572,11 @@ static int _read_mirror_and_raid_params(struct cmd_context *cmd,
return 0;
}
+ /*
+ * FIXME This is working around a bug in get_stripe_params() where
+ * stripes is incorrectly assumed to be 1 when it is not supplied
+ * leading to the actual value of stripesize getting lost.
+ */
if (arg_is_set(cmd, stripesize_ARG))
lp->stripe_size = arg_uint_value(cmd, stripesize_ARG, 0);
7 years, 8 months
master - vgsplit: ea90a3d622 added an unconditional call to lv_is_on_pvs() on any thin snap external origin LV which caused a segfault when none existed as exposed by the vgsplit-thin.sh test.
by Heinz Mauelshagen
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a579ba2ac27d96...
Commit: a579ba2ac27d9651165e7e997a5ff855dc83c170
Parent: 4bc351d65879f319cf94cc59ff781ca3d649060f
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Thu Jul 28 18:34:46 2016 +0200
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Thu Jul 28 18:35:33 2016 +0200
vgsplit: ea90a3d622 added an unconditional call to lv_is_on_pvs() on any thin snap external origin LV which caused a segfault when none existed as exposed by the vgsplit-thin.sh test.
Only call lv_is_on_pvs() if an external origin LV actually
exists and correct the related splitting logic.
---
tools/vgsplit.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/vgsplit.c b/tools/vgsplit.c
index fd43650a..93161c1 100644
--- a/tools/vgsplit.c
+++ b/tools/vgsplit.c
@@ -331,8 +331,8 @@ static int _move_thins(struct volume_group *vg_from,
data_lv = seg_lv(first_seg(seg->pool_lv), 0);
/* Ignore, if no allocations on PVs of @vg_to */
- if (!lv_is_on_pvs(data_lv, &vg_to->pvs) &&
- !lv_is_on_pvs(seg->external_lv, &vg_to->pvs))
+ if (!lv_is_on_pvs(data_lv, &vg_to->pvs) ||
+ (seg->external_lv && !lv_is_on_pvs(seg->external_lv, &vg_to->pvs)))
continue;
if ((_lv_is_in_vg(vg_to, data_lv) ||
7 years, 8 months
master - lvmdbusd: Add '-y' to lvconvert for lv cache create
by tasleson
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=4bc351d65879f3...
Commit: 4bc351d65879f319cf94cc59ff781ca3d649060f
Parent: 20b21f4fd85532bd63a699aac4fc34f5786cf96d
Author: Tony Asleson <tasleson(a)redhat.com>
AuthorDate: Wed Jul 27 18:43:27 2016 -0500
Committer: Tony Asleson <tasleson(a)redhat.com>
CommitterDate: Thu Jul 28 11:13:29 2016 -0500
lvmdbusd: Add '-y' to lvconvert for lv cache create
When converting to a cache lv, tests were hanging with a prompt for
"Do you want wipe existing metadata of cache pool volume
To preserve cache metadata add option "--zero n".
WARNING: Reusing mismatched cache pool metadata MAY DESTROY YOUR DATA!"
This is new.
---
daemons/lvmdbusd/cmdhandler.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/daemons/lvmdbusd/cmdhandler.py b/daemons/lvmdbusd/cmdhandler.py
index 391757d..fac582c 100644
--- a/daemons/lvmdbusd/cmdhandler.py
+++ b/daemons/lvmdbusd/cmdhandler.py
@@ -411,7 +411,7 @@ def lv_cache_lv(cache_pool_full_name, lv_full_name, cache_options):
# lvconvert --type cache --cachepool VG/CachePoolLV VG/OriginLV
cmd = ['lvconvert']
cmd.extend(options_to_cli_args(cache_options))
- cmd.extend(['--type', 'cache', '--cachepool',
+ cmd.extend(['-y', '--type', 'cache', '--cachepool',
cache_pool_full_name, lv_full_name])
return call(cmd)
7 years, 8 months
master - lvmdbusd: Fix hang for Job.Wait(n)
by tasleson
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=20b21f4fd85532...
Commit: 20b21f4fd85532bd63a699aac4fc34f5786cf96d
Parent: 8d959b6c75a6cc98691413ec4eab5b01e992d6c1
Author: Tony Asleson <tasleson(a)redhat.com>
AuthorDate: Wed Jul 27 18:27:58 2016 -0500
Committer: Tony Asleson <tasleson(a)redhat.com>
CommitterDate: Thu Jul 28 11:13:29 2016 -0500
lvmdbusd: Fix hang for Job.Wait(n)
When a client is doing a wait on a job, any other clients will hang
when trying to do anything with the service. This is caused by
the wait code which was placing the thread that handles
incoming dbus requests to sleep until either the timeout expired or
the job operation completed.
This change creates a thread for the wait request, so that the thread
processing incoming requests can continue to run.
---
daemons/lvmdbusd/background.py | 30 +++++++++++++++++++++++++++++-
daemons/lvmdbusd/job.py | 8 +++++---
2 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/daemons/lvmdbusd/background.py b/daemons/lvmdbusd/background.py
index 2c719fc..8078b66 100644
--- a/daemons/lvmdbusd/background.py
+++ b/daemons/lvmdbusd/background.py
@@ -13,7 +13,7 @@ from . import cfg
import time
from .cmdhandler import options_to_cli_args
import dbus
-from .utils import pv_range_append, pv_dest_ranges, log_error
+from .utils import pv_range_append, pv_dest_ranges, log_error, log_debug
import traceback
_rlock = threading.RLock()
@@ -118,6 +118,7 @@ def background_reaper():
for i in range(num_threads, -1, -1):
_thread_list[i].join(0)
if not _thread_list[i].is_alive():
+ log_debug("Removing thread: %s" % _thread_list[i].name)
_thread_list.pop(i)
time.sleep(3)
@@ -171,3 +172,30 @@ def add(command, reporting_job):
with _rlock:
_thread_list.append(t)
+
+
+def wait_thread(job, timeout, cb, cbe):
+ # We need to put the wait on it's own thread, so that we don't block the
+ # entire dbus queue processing thread
+ try:
+ cb(job.state.Wait(timeout))
+ except Exception as e:
+ cbe("Wait exception: %s" % str(e))
+ return 0
+
+
+def add_wait(job, timeout, cb, cbe):
+
+ if timeout == 0:
+ # Users are basically polling, do not create thread
+ cb(job.Complete)
+ else:
+ t = threading.Thread(
+ target=wait_thread,
+ name="thread job.Wait: %s" % job.dbus_object_path(),
+ args=(job, timeout, cb, cbe)
+ )
+
+ t.start()
+ with _rlock:
+ _thread_list.append(t)
diff --git a/daemons/lvmdbusd/job.py b/daemons/lvmdbusd/job.py
index d7f8187..520f9a8 100644
--- a/daemons/lvmdbusd/job.py
+++ b/daemons/lvmdbusd/job.py
@@ -13,6 +13,7 @@ from . import cfg
from .cfg import JOB_INTERFACE
import dbus
import threading
+from . import background
# noinspection PyPep8Naming
@@ -152,9 +153,10 @@ class Job(AutomatedProperties):
@dbus.service.method(dbus_interface=JOB_INTERFACE,
in_signature='i',
- out_signature='b')
- def Wait(self, timeout):
- return self.state.Wait(timeout)
+ out_signature='b',
+ async_callbacks=('cb', 'cbe'))
+ def Wait(self, timeout, cb, cbe):
+ background.add_wait(self, timeout, cb, cbe)
@property
def Result(self):
7 years, 8 months
master - man: lvcreate correction on --stripes explanation and examples with respect to the changed, configurable default behaviour introduced with commit 7eb79091937d.
by Heinz Mauelshagen
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8d959b6c75a6cc...
Commit: 8d959b6c75a6cc98691413ec4eab5b01e992d6c1
Parent: 02ddd48c1148052175ac2178f3f762ca0629d6e9
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Thu Jul 28 17:34:42 2016 +0200
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Thu Jul 28 17:34:42 2016 +0200
man: lvcreate correction on --stripes explanation and examples with respect to the changed, configurable default behaviour introduced with commit 7eb79091937d.
E.g. raid default of 2 stripes rather than number of PVs in the VG
or on the command line minus one.
---
man/lvcreate.8.in | 29 +++++++++++++++++++++--------
1 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/man/lvcreate.8.in b/man/lvcreate.8.in
index 1cce0b6..34b6523 100644
--- a/man/lvcreate.8.in
+++ b/man/lvcreate.8.in
@@ -603,14 +603,24 @@ for online conversion to thin volumes with external origin.
.br
Gives the number of stripes.
This is equal to the number of physical volumes to scatter
-the logical volume. When creating a RAID 4/5/6 logical volume,
+the logical volume data. When creating a RAID 4/5/6 logical volume,
the extra devices which are necessary for parity are
internally accounted for. Specifying \fB\-i 3\fP
-would use 3 devices for striped logical volumes,
-4 devices for RAID 4/5, and 5 devices for RAID 6. Alternatively,
-RAID 4/5/6 will stripe across all PVs in the volume group or
-all of the PVs specified if the \fB\-i\fP
-argument is omitted.
+would cause 3 devices for striped and RAID 0 logical volumes,
+4 devices for RAID 4/5, 5 devices for RAID 6 and 6 devices for RAID 10.
+Alternatively, RAID 0 will stripe across 2 devices,
+RAID 4/5 across 3 PVs, RAID 6 across 5 PVs and RAID 10 across
+4 PVs in the volume group if the \fB\-i\fP argument is omitted.
+In order to stripe across all PVs of the VG if the \fB\-i\fP argument is
+omitted, set raid_stripe_all_devices=1 in the allocation
+section of \fBlvm.conf (5)\fP or add
+.br
+\fB\-\-config allocation/raid_stripe_all_devices=1\fP
+.br
+to the command.
+.br
+Note the current limitation of 8 stripes total in any RaidLV including parity devices.
+
Two implementations of basic striping are available in the kernel.
The original device-mapper implementation is the default and should
normally be used. The alternative implementation using MD, available
@@ -801,9 +811,12 @@ a parity drive for a total of 4 devices) and a stripesize of 64KiB:
.B lvcreate \-\-type raid5 \-L 5G \-i 3 \-I 64 \-n my_lv vg00
Creates a RAID5 logical volume "vg00/my_lv", using all of the free
-space in the VG and spanning all the PVs in the VG:
+space in the VG and spanning all the PVs in the VG (note that the command
+will fail if there's more than 8 PVs in the VG in which case \fB\-i 7\fP
+has to be used to get to the currently possible maximum of
+8 devices including parity for RaidLVs):
.sp
-.B lvcreate \-\-type raid5 \-l 100%FREE \-n my_lv vg00
+.B lvcreate \-\-config allocation/raid_stripe_all_devices=1 \-\-type raid5 \-l 100%FREE \-n my_lv vg00
Creates a 5GiB RAID10 logical volume "vg00/my_lv", with 2 stripes on
2 2-way mirrors. Note that the \fB-i\fP and \fB-m\fP arguments behave
7 years, 8 months
master - tests: updates for new raid allocation logic
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=02ddd48c114805...
Commit: 02ddd48c1148052175ac2178f3f762ca0629d6e9
Parent: edb5d12463b60b22ba6683cd9e2fd12b07f09fcf
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Jul 28 16:37:20 2016 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Jul 28 16:37:20 2016 +0200
tests: updates for new raid allocation logic
(with backward compatible settings user as well to check old logic
is still available when needed).
---
test/shell/lvcreate-raid.sh | 18 +++++++++++++++++-
test/shell/lvcreate-raid10.sh | 26 +++++++++++++++++++++-----
2 files changed, 38 insertions(+), 6 deletions(-)
diff --git a/test/shell/lvcreate-raid.sh b/test/shell/lvcreate-raid.sh
index 19c8c61..66434b0 100644
--- a/test/shell/lvcreate-raid.sh
+++ b/test/shell/lvcreate-raid.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2011-2012 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2011-2016 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
@@ -178,6 +178,22 @@ lv_devices $vg raid6 5
lvremove -ff $vg
# Implicit count comes from total #PVs in VG (always 2 for mirror though)
+# Defaults -i2 even though more PVs listed
+lvcreate --type raid1 -l1 -an -Zn -n raid1 $vg
+lv_devices $vg raid1 2
+lvcreate --type raid5 -l2 -an -Zn -n raid5 $vg
+lv_devices $vg raid5 3
+lvcreate --type raid6 -l3 -an -Zn -n raid6 $vg
+lv_devices $vg raid6 5
+lvremove -ff $vg
+
+
+########################################################
+# Try again with backward compatible old logic applied #
+########################################################
+aux lvmconf 'allocation/raid_stripe_all_devices = 1'
+
+# Implicit count comes from total #PVs in VG (always 2 for mirror though)
lvcreate --type raid1 -l1 -an -Zn -n raid1 $vg
lv_devices $vg raid1 2
lvcreate --type raid5 -l2 -an -Zn -n raid5 $vg
diff --git a/test/shell/lvcreate-raid10.sh b/test/shell/lvcreate-raid10.sh
index 2cd5ac0..bebe221 100644
--- a/test/shell/lvcreate-raid10.sh
+++ b/test/shell/lvcreate-raid10.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2012 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2016 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
@@ -67,16 +67,32 @@ lvremove -ff $vg
not lvcreate --type raid10 -l2 $vg "$dev1" "$dev2" "$dev3"
# Implicit count comes from #PVs given (always 2-way mirror)
+# Defaults -i2, which works with 4 PVs listed
lvcreate --type raid10 -l2 -an -Zn -n raid10 $vg "$dev1" "$dev2" "$dev3" "$dev4"
lv_devices $vg raid10 4
-lvremove -ff $vg
-# Implicit count comes from total #PVs in VG (always 2 for mirror though)
-lvcreate --type raid10 -l2 -an -Zn -n raid10 $vg
-lv_devices $vg raid10 6
+# Defaults -i2 even though more PVs listed
+lvcreate --type raid10 -l2 -an -Zn -n raid10_6 $vg "$dev1" "$dev2" "$dev3" "$dev4" "$dev5" "$dev6"
+lv_devices $vg raid10_6 4
+
lvremove -ff $vg
#
# FIXME: Add tests that specify particular PVs to use for creation
#
+
+
+########################################################
+# Try again with backward compatible old logic applied #
+########################################################
+aux lvmconf 'allocation/raid_stripe_all_devices = 1'
+
+# Implicit count comes from #PVs given (always 2-way mirror)
+lvcreate --type raid10 -l2 -an -Zn -n raid10 $vg "$dev1" "$dev2" "$dev3" "$dev4"
+lv_devices $vg raid10 4
+
+# Implicit count comes from total #PVs in VG (always 2 for mirror though)
+lvcreate --type raid10 -l2 -an -Zn -n raid10_vg $vg
+lv_devices $vg raid10_vg 6
+
vgremove -ff $vg
7 years, 8 months
master - config: keep new setting commented out
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=edb5d12463b60b...
Commit: edb5d12463b60b22ba6683cd9e2fd12b07f09fcf
Parent: 43f455589377cb5e3b21434a58226a7365fe1d6f
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Jul 28 15:08:11 2016 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Jul 28 15:08:11 2016 +0200
config: keep new setting commented out
---
conf/example.conf.in | 3 ++-
lib/config/config_settings.h | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/conf/example.conf.in b/conf/example.conf.in
index 1dcbf52..4ac09e2 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -381,7 +381,8 @@ allocation {
# Stripe across all PVs when RAID stripes are not specified.
# If enabled, all PVs in the VG or on the command line are used for raid0/4/5/6/10
# when the command does not specify the number of stripes to use.
- raid_stripe_all_devices = 0
+ # This configuration option has an automatic default value.
+ # raid_stripe_all_devices = 0
# Configuration option allocation/cache_pool_metadata_require_separate_pvs.
# Cache pool metadata and data will always use different PVs.
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 8b9932e..1e4b689 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -461,7 +461,7 @@ cfg(allocation_mirror_logs_require_separate_pvs_CFG, "mirror_logs_require_separa
"Mirror logs and images will always use different PVs.\n"
"The default setting changed in version 2.02.85.\n")
-cfg(allocation_raid_stripe_all_devices_CFG, "raid_stripe_all_devices", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ALLOCATION_STRIPE_ALL_DEVICES, vsn(2, 2, 162), NULL, 0, NULL,
+cfg(allocation_raid_stripe_all_devices_CFG, "raid_stripe_all_devices", allocation_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, DEFAULT_ALLOCATION_STRIPE_ALL_DEVICES, vsn(2, 2, 162), NULL, 0, NULL,
"Stripe across all PVs when RAID stripes are not specified.\n"
"If enabled, all PVs in the VG or on the command line are used for raid0/4/5/6/10\n"
"when the command does not specify the number of stripes to use.\n")
7 years, 8 months