Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d3e67ba8ca13115f…
Commit: d3e67ba8ca13115ffdd324e64e965240dced8ef1
Parent: f64f22e2d657346197fcd0b8e97e87b6d290ab2b
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Jul 31 16:20:24 2012 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Tue Jul 31 16:20:24 2012 +0200
systemd: add lvm2 activation generator
The lvm2 activation generator generates systemd units conditionally
based on the global/use_lvmetad lvm.conf setting.
If use_lvmetad=0, the lvm2-activation-early.service and lvm2-activation.service
units will be generated. These units are responsible for direct volume activation
by calling "vgchange -aay --sysinit" (this is actually the original on-boot
activation as it was used before). If use_lvmetad=1, no units will be generated
as we're relying on autoactivation.
Important thing to note is that the lvm2-activation units normally bring
in the udev-settle ("storage-wait") service that waits for udev to settle
(with block devices). We don't need this if lvmetad is used in conjunction
with autoactivation feature... but systemd units can't be enabled or disabled
(or dependencies added/removed) dynamically based on external configuration.
Therefore, we need the unit generator which adds support for such situations:
the units as a whole either exist or not based on the external configuration.
---
.../lvm2_activation_generator_systemd_red_hat.c | 169 ++++++++++++++++++++
1 files changed, 169 insertions(+), 0 deletions(-)
diff --git a/scripts/lvm2_activation_generator_systemd_red_hat.c b/scripts/lvm2_activation_generator_systemd_red_hat.c
new file mode 100644
index 0000000..9921004
--- /dev/null
+++ b/scripts/lvm2_activation_generator_systemd_red_hat.c
@@ -0,0 +1,169 @@
+/*
+ * Copyright (C) 2012 Red Hat, Inc. All rights reserved.
+ *
+ * This file is part of the device-mapper userspace tools.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License v.2.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+#include <stdio.h>
+#include <unistd.h>
+#include <errno.h>
+#include <stdarg.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include "lvm2app.h"
+
+#define KMSG_DEV_PATH "/dev/kmsg"
+#define LVM_CONF_USE_LVMETAD "global/use_lvmetad"
+
+#define DEFAULT_UNIT_DIR "/tmp"
+#define UNIT_NAME_EARLY "lvm2-activation-early.service"
+#define UNIT_NAME "lvm2-activation.service"
+#define UNIT_TARGET "local-fs.target"
+
+static char unit_path[PATH_MAX];
+static char target_path[PATH_MAX];
+static char message[PATH_MAX];
+static int kmsg_fd = -1;
+
+static void kmsg(const char *format, ...)
+{
+ va_list ap;
+ int n;
+
+ va_start(ap, format);
+ n = vsnprintf(message, sizeof(message), format, ap);
+ va_end(ap);
+
+ if (kmsg_fd < 0 || (n < 0 || ((unsigned) n + 1 > sizeof(message))))
+ return;
+
+ write(kmsg_fd, message, n + 1);
+}
+
+static int lvm_uses_lvmetad(void)
+{
+ lvm_t lvm;
+ int r;
+
+ if (!(lvm = lvm_init(NULL))) {
+ kmsg("LVM: Failed to initialize library context for activation generator.\n");
+ return 0;
+ }
+ r = lvm_config_find_bool(lvm, LVM_CONF_USE_LVMETAD, 0);
+ lvm_quit(lvm);
+
+ return r;
+}
+
+static int register_unit_with_target(const char *dir, const char *unit, const char *target)
+{
+ int r = 1;
+
+ if (dm_snprintf(target_path, PATH_MAX, "%s/%s.wants", dir, target) < 0) {
+ r = 0; goto out;
+ }
+ (void) dm_prepare_selinux_context(target_path, S_IFDIR);
+ if (mkdir(target_path, 0755) < 0 && errno != EEXIST) {
+ kmsg("LVM: Failed to create target directory %s: %m.\n", target_path);
+ r = 0; goto out;
+ }
+
+ if (dm_snprintf(target_path, PATH_MAX, "%s/%s.wants/%s", dir, target, unit) < 0) {
+ r = 0; goto out;
+ }
+ (void) dm_prepare_selinux_context(target_path, S_IFLNK);
+ if (symlink(unit_path, target_path) < 0) {
+ kmsg("LVM: Failed to create symlink for unit %s: %m.\n", unit);
+ r = 0;
+ }
+out:
+ dm_prepare_selinux_context(NULL, 0);
+ return r;
+}
+
+static int generate_unit(const char *dir, int early)
+{
+ FILE *f;
+ const char *unit = early ? UNIT_NAME_EARLY : UNIT_NAME;
+
+ if (dm_snprintf(unit_path, PATH_MAX, "%s/%s", dir, unit) < 0)
+ return 0;
+
+ if (!(f = fopen(unit_path, "wxe"))) {
+ kmsg("LVM: Failed to create unit file %s: %m.\n", unit);
+ return 0;
+ }
+
+ fputs("# Automatically generated by lvm2-activation-generator.\n"
+ "#\n"
+ "# This unit is responsible for direct activation of LVM2 logical volumes\n"
+ "# if lvmetad daemon is not used (global/use_lvmetad=0 lvm.conf setting),\n"
+ "# hence volume autoactivation is not applicable.\n"
+ "# Direct LVM2 activation requires udev to be settled!\n\n"
+ "[Unit]\n"
+ "Description=Activation of LVM2 logical volumes\n"
+ "Documentation=man:lvm(8) man:vgchange(8)\n"
+ "SourcePath=/etc/lvm/lvm.conf\n"
+ "DefaultDependencies=no\n", f);
+
+ if (early)
+ fputs("After=fedora-wait-storage.service\n", f);
+ else
+ fputs("After=lvm2-activation-early.service cryptsetup.target\n", f);
+
+ fputs("Before=local-fs.target shutdown.target\n"
+ "Wants=fedora-wait-storage.service\n\n"
+ "[Service]\n"
+ "ExecStart=/usr/sbin/lvm vgchange -aay --sysinit\n"
+ "Type=oneshot\n", f);
+
+ if (fclose(f) < 0) {
+ kmsg("LVM: Failed to write unit file %s: %m.\n", unit);
+ return 0;
+ }
+
+ if (!register_unit_with_target(dir, unit, UNIT_TARGET)) {
+ kmsg("LVM: Failed to register unit %s with target %s.\n", unit, UNIT_TARGET);
+ return 0;
+ }
+
+ return 1;
+}
+
+int main(int argc, char *argv[])
+{
+ const char *dir;
+ int r = EXIT_SUCCESS;
+
+ kmsg_fd = open(KMSG_DEV_PATH, O_WRONLY|O_NOCTTY|O_CLOEXEC);
+
+ if (argc > 1 && argc != 4) {
+ kmsg("LVM: Activation generator takes three or no arguments.\n");
+ r = EXIT_FAILURE; goto out;
+ }
+
+ /* If lvmetad used, rely on autoactivation instead of direct activation. */
+ if (lvm_uses_lvmetad()) {
+ kmsg("LVM: Logical Volume autoactivation enabled.\n");
+ goto out;
+ }
+
+ dir = argc > 1 ? argv[1] : DEFAULT_UNIT_DIR;
+
+ if (!generate_unit(dir, 1) || !generate_unit(dir, 0))
+ r = EXIT_FAILURE;
+out:
+ kmsg("LVM: Activation generator %s.\n", r ? "failed" : "successfully completed");
+ if (kmsg_fd != -1)
+ close(kmsg_fd);
+ return r;
+}
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f64f22e2d6573461…
Commit: f64f22e2d657346197fcd0b8e97e87b6d290ab2b
Parent: 8791d01fee7f5977b037400020db97a40821b94a
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Jul 31 16:18:01 2012 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Tue Jul 31 16:18:01 2012 +0200
lvm2app: add lvm_config_find_bool function
To effectively retrieve the setting of anything that could be enabled or disabled.
---
WHATS_NEW | 1 +
liblvm/lvm2app.h | 22 ++++++++++++++++++++++
liblvm/lvm_base.c | 5 +++++
3 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index cb3ed90..5208da9 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.97 -
===============================
+ Add lvm_config_find_bool lvm2app fn to retrieve bool value from config tree.
Respect --test also when using lvmetad.
No longer capitalise first LV attribute char for invalid snapshots.
Allow vgextend to add PVs to a VG that is missing PVs.
diff --git a/liblvm/lvm2app.h b/liblvm/lvm2app.h
index dd200e3..72c0d79 100644
--- a/liblvm/lvm2app.h
+++ b/liblvm/lvm2app.h
@@ -303,6 +303,28 @@ int lvm_config_reload(lvm_t libh);
int lvm_config_override(lvm_t libh, const char *config_string);
/**
+ * Find a boolean value in the LVM configuration.
+ *
+ * \memberof lvm_t
+ *
+ * This function finds a boolean value associated with a path
+ * in current LVM configuration.
+ *
+ * \param libh
+ * Handle obtained from lvm_init().
+ *
+ * \param config_path
+ * A path in LVM configuration
+ *
+ * \param fail
+ * Value to return if the path is not found.
+ *
+ * \return
+ * boolean value for 'config_path' (success) or the value of 'fail' (error)
+ */
+int lvm_config_find_bool(lvm_t libh, const char *config_path, int fail);
+
+/**
* Return stored error no describing last LVM API error.
*
* \memberof lvm_t
diff --git a/liblvm/lvm_base.c b/liblvm/lvm_base.c
index 599c859..2f39b46 100644
--- a/liblvm/lvm_base.c
+++ b/liblvm/lvm_base.c
@@ -94,6 +94,11 @@ int lvm_config_override(lvm_t libh, const char *config_settings)
return 0;
}
+int lvm_config_find_bool(lvm_t libh, const char *config_path, int fail)
+{
+ return find_config_tree_bool((struct cmd_context *)libh, config_path, fail);
+}
+
int lvm_errno(lvm_t libh)
{
return stored_errno();
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=20ca6d6545e6a0a8…
Commit: 20ca6d6545e6a0a8e84c117fd4530de0421bc78d
Parent: 6997943f2221729449469d1a7963055991c2361d
Author: Petr Rockai <me(a)mornfall.net>
AuthorDate: Mon Jul 30 11:21:55 2012 +0200
Committer: Petr Rockai <me(a)mornfall.net>
CommitterDate: Mon Jul 30 11:21:55 2012 +0200
TEST: Add lvmetad-test; checks --test with lvmetad.
---
test/shell/lvmetad-test.sh | 34 ++++++++++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/test/shell/lvmetad-test.sh b/test/shell/lvmetad-test.sh
new file mode 100644
index 0000000..7e801f1
--- /dev/null
+++ b/test/shell/lvmetad-test.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+# Copyright (C) 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
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+. lib/test
+
+aux prepare_pvs 2
+
+vgcreate $vg1 $dev1 $dev2 --test
+vgs | not grep $vg1
+vgcreate $vg1 $dev1 $dev2
+vgs | grep $vg1
+
+lvcreate -n bar -l 1 $vg1 --test
+lvs | not grep bar
+lvcreate -n bar -l 1 $vg1
+lvs | grep bar
+
+lvremove $vg1/bar -f --test
+lvs | grep bar
+lvremove $vg1/bar -f
+lvs | not grep bar
+
+vgremove $vg1 --test
+vgs | grep $vg1
+vgremove $vg1
+vgs | not grep $vg1
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=186a2772e8ac3c20…
Commit: 186a2772e8ac3c2088bdfc833c32d773464d666b
Parent: 45db25817ff342a86b2ddf000b4b3a4d59be8848
Author: Jonathan Brassow <jbrassow(a)redhat.com>
AuthorDate: Thu Jul 26 17:06:06 2012 -0500
Committer: Jonathan Brassow <jbrassow(a)redhat.com>
CommitterDate: Thu Jul 26 17:06:06 2012 -0500
vgextend: Allow PVs to be added to VGs that have PVs missing
Allowing people to add devices to a VG that has PVs missing helps
people avoid the inability to repair RAID LVs in certain cases.
For example, if a user creates a RAID 4/5/6 LV using all of the
available devices in a VG, there will be no spare devices to
repair the LV with if a device should fail. Further, because the
VG is missing a device, new devices cannot be added to allow the
repair. If 'vgreduce --removemissing' were attempted, the
"MISSING" PV could not be removed without also destroying the RAID
LV.
Allowing vgextend to operate solves the circular dependency.
When the PV is added by a vgextend operation, the sequence number is
incremented and the 'MISSING' flag is put on the PVs which are missing.
---
WHATS_NEW | 1 +
tools/vgextend.c | 9 +++++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 735bdba..32ebf15 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.97 -
===============================
+ Allow vgextend to add PVs to a VG that is missing PVs.
Recognise Micron PCIe SSDs in filter and move array out to device-types.h.
Fix segfault when attempting to replace RAID 4/5/6 device (2.02.97).
Fix dumpconfig <node> to print only <node> without its siblings (2.02.89).
diff --git a/tools/vgextend.c b/tools/vgextend.c
index d1adf21..161796c 100644
--- a/tools/vgextend.c
+++ b/tools/vgextend.c
@@ -66,8 +66,13 @@ int vgextend(struct cmd_context *cmd, int argc, char **argv)
return EINVALID_CMD_LINE;
}
- if (arg_count(cmd, restoremissing_ARG))
- cmd->handles_missing_pvs = 1;
+ /*
+ * It is always ok to add new PVs to a VG - even if there are
+ * missing PVs. No LVs are affected by this operation, but
+ * repair processes - particularly for RAID segtypes - can
+ * be facilitated.
+ */
+ cmd->handles_missing_pvs = 1;
log_verbose("Checking for volume group \"%s\"", vg_name);
vg = vg_read_for_update(cmd, vg_name, NULL, 0);
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9161308252336491…
Commit: 9161308252336491a107983ed16481e446853e26
Parent: e0bc3cf1a0102aff6c047a3293ef45ca5f221c10
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Jul 26 11:30:27 2012 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Jul 26 11:30:27 2012 +0200
systemd: ensure monitoring is handled after lvmetad
Monitoring is handled using "vgchange --monitor" call. Ensure that lvmetad is up
and running at the time of this call to prevent any fallback to direct scan
within the vgchange. The same applies for shutdown sequence but the other way
round - switch monitoring off and lvmetad afterwards.
---
scripts/lvm2_monitoring_systemd_red_hat.service.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/lvm2_monitoring_systemd_red_hat.service.in b/scripts/lvm2_monitoring_systemd_red_hat.service.in
index a8d5183..425cb0d 100644
--- a/scripts/lvm2_monitoring_systemd_red_hat.service.in
+++ b/scripts/lvm2_monitoring_systemd_red_hat.service.in
@@ -2,7 +2,7 @@
Description=Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling
Documentation=man:dmeventd(8) man:lvcreate(8) man:lvchange(8) man:vgchange(8)
Requires=dm-event.socket
-After=dm-event.socket fedora-storage-init.service fedora-storage-init-late.service
+After=dm-event.socket fedora-storage-init.service fedora-storage-init-late.service lvm2-lvmetad.service
Before=local-fs.target
DefaultDependencies=no
Conflicts=shutdown.target
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=e0bc3cf1a0102aff…
Commit: e0bc3cf1a0102aff6c047a3293ef45ca5f221c10
Parent: 7803756e9751117c8a2454d55c145f6e759279dd
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Thu Jul 26 02:31:06 2012 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Thu Jul 26 02:31:06 2012 +0100
filters: Add Micron PCIe SSDs (mtip32xx) [part2]
Recognise Micron PCIe SSDs in filter and move array out to device-types.h.
---
lib/filters/device-types.h | 55 ++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 55 insertions(+), 0 deletions(-)
diff --git a/lib/filters/device-types.h b/lib/filters/device-types.h
new file mode 100644
index 0000000..1208160
--- /dev/null
+++ b/lib/filters/device-types.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
+ * Copyright (C) 2004-2012 Red Hat, Inc. All rights reserved.
+ *
+ * This file is part of LVM2.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License v.2.1.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/*
+ * Devices are only checked for partition tables if their minor number
+ * is a multiple of the number corresponding to their type below
+ * i.e. this gives the granularity of whole-device minor numbers.
+ * Use 1 if the device is not partitionable.
+ *
+ * The list can be supplemented with devices/types in the config file.
+ */
+static const device_info_t _device_info[] = {
+ {"ide", 64}, /* IDE disk */
+ {"sd", 16}, /* SCSI disk */
+ {"md", 1}, /* Multiple Disk driver (SoftRAID) */
+ {"mdp", 1}, /* Partitionable MD */
+ {"loop", 1}, /* Loop device */
+ {"dasd", 4}, /* DASD disk (IBM S/390, zSeries) */
+ {"dac960", 8}, /* DAC960 */
+ {"nbd", 16}, /* Network Block Device */
+ {"ida", 16}, /* Compaq SMART2 */
+ {"cciss", 16}, /* Compaq CCISS array */
+ {"ubd", 16}, /* User-mode virtual block device */
+ {"ataraid", 16}, /* ATA Raid */
+ {"drbd", 16}, /* Distributed Replicated Block Device */
+ {"emcpower", 16}, /* EMC Powerpath */
+ {"power2", 16}, /* EMC Powerpath */
+ {"i2o_block", 16}, /* i2o Block Disk */
+ {"iseries/vd", 8}, /* iSeries disks */
+ {"gnbd", 1}, /* Network block device */
+ {"ramdisk", 1}, /* RAM disk */
+ {"aoe", 16}, /* ATA over Ethernet */
+ {"device-mapper", 1}, /* Other mapped devices */
+ {"xvd", 16}, /* Xen virtual block device */
+ {"vdisk", 8}, /* SUN's LDOM virtual block device */
+ {"ps3disk", 16}, /* PlayStation 3 internal disk */
+ {"virtblk", 8}, /* VirtIO disk */
+ {"mmc", 16}, /* MMC block device */
+ {"blkext", 1}, /* Extended device partitions */
+ {"fio", 16}, /* Fusion */
+ {"mtip32xx", 16}, /* Micron PCIe SSDs */
+ {"", 0}
+};
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1b607890203911a0…
Commit: 1b607890203911a0f92e8f5d5f55e60b52d746ad
Parent: 5555d2a000ed4e3d5a694896f3dc6a7290543f43
Author: Jonathan Brassow <jbrassow(a)redhat.com>
AuthorDate: Tue Jul 24 22:28:23 2012 -0500
Committer: Jonathan Brassow <jbrassow(a)redhat.com>
CommitterDate: Tue Jul 24 22:28:23 2012 -0500
Forgot to update WHATS_NEW for commit 5555d2a000ed4e3d5a694896f3dc6a7290543f43
---
WHATS_NEW | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index aa26622..bca890e 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.97 -
===============================
+ Fix segfault when attempting to replace RAID 4/5/6 device (2.02.97).
Fix dumpconfig <node> to print only <node> without its siblings (2.02.89).
Do not issue "Failed to handle a client connection" error if lvmetad killed.
Support changing of discard and zeroing for thin pool.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5555d2a000ed4e3d…
Commit: 5555d2a000ed4e3d5a694896f3dc6a7290543f43
Parent: 407198e17dc805dd9ce0583c8b1dbade71572af6
Author: Jonathan Brassow <jbrassow(a)redhat.com>
AuthorDate: Tue Jul 24 19:02:06 2012 -0500
Committer: Jonathan Brassow <jbrassow(a)redhat.com>
CommitterDate: Tue Jul 24 19:02:06 2012 -0500
RAID: Fix segfault when attempting to replace RAID 4/5/6 device
Commit 8767435ef847831455fadc1f7e8f4d2d94aef0d5 allowed RAID 4/5/6
LV to be extended properly, but introduced a regression in device
replacement - a critical component of fault tolerance.
When only 1 or 2 drives are being replaced, the 'area_count' needed
can be equal to the parity_count. The 'area_multiple' for RAID 4/5/6
was computed as 'area_count - parity_devs', which could result in
'area_multiple' being 0. This would ultimately lead to a division by
zero error. Therefore, in calc_area_multiple, it is important to take
into account the number of areas that are being requested - just as
we already do in _alloc_init.
---
lib/metadata/lv_manip.c | 11 ++++++++++-
test/shell/lvconvert-repair.sh | 26 +++++++++++++++++++++++++-
2 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 0d89b4a..daa90da 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -698,8 +698,17 @@ static uint32_t _calc_area_multiple(const struct segment_type *segtype,
return area_count;
/* Parity RAID (e.g. RAID 4/5/6) */
- if (segtype_is_raid(segtype) && segtype->parity_devs)
+ if (segtype_is_raid(segtype) && segtype->parity_devs) {
+ /*
+ * As articulated in _alloc_init, we can tell by
+ * the area_count whether a replacement drive is
+ * being allocated; and if this is the case, then
+ * there is no area_multiple that should be used.
+ */
+ if (area_count <= segtype->parity_devs)
+ return 1;
return area_count - segtype->parity_devs;
+ }
/* Mirrored stripes */
if (stripes)
diff --git a/test/shell/lvconvert-repair.sh b/test/shell/lvconvert-repair.sh
index 947998c..0aeeffa 100644
--- a/test/shell/lvconvert-repair.sh
+++ b/test/shell/lvconvert-repair.sh
@@ -23,7 +23,7 @@ aux lvmconf 'allocation/mirror_logs_require_separate_pvs = 1'
# fail multiple devices
# 4-way, disk log => 2-way, disk log
-aux prepare_vg 5
+aux prepare_vg 8
lvcreate -m 3 --ig -L 1 -n 4way $vg "$dev1" "$dev2" "$dev3" "$dev4" "$dev5":0
aux disable_dev "$dev2" "$dev4"
echo n | lvconvert --repair $vg/4way 2>&1 | tee 4way.out
@@ -111,4 +111,28 @@ lvconvert -y --repair $vg/mirror
vgreduce --removemissing $vg
aux enable_dev "$dev3"
vgextend $vg "$dev3"
+lvremove -ff $vg
+
+# RAID5 single replace
+lvcreate --type raid5 -i 2 -l 2 -n $lv1 $vg "$dev1" "$dev2" "$dev3"
+aux wait_for_sync $vg $lv1
+aux disable_dev "$dev3"
+lvconvert -y --repair $vg/$lv1
+vgreduce --removemissing $vg
+aux enable_dev "$dev3"
+vgextend $vg "$dev3"
+lvremove -ff $vg
+
+# RAID6 double replace
+lvcreate --type raid5 -i 3 -l 2 -n $lv1 $vg \
+ "$dev1" "$dev2" "$dev3" "$dev4" "$dev5"
+aux wait_for_sync $vg $lv1
+aux disable_dev "$dev4" "$dev5"
+lvconvert -y --repair $vg/$lv1
+vgreduce --removemissing $vg
+aux enable_dev "$dev4"
+aux enable_dev "$dev5"
+vgextend $vg "$dev4" "$dev5"
+lvremove -ff $vg
+
vgremove -ff $vg
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=753cb9204d24ceb4…
Commit: 753cb9204d24ceb4d9f8184ceb4c0262b9aacb42
Parent: 5e36b86c46f04eddae2d4b1f826e1f24995b3636
Author: Jonathan Brassow <jbrassow(a)redhat.com>
AuthorDate: Tue Jul 24 14:17:54 2012 -0500
Committer: Jonathan Brassow <jbrassow(a)redhat.com>
CommitterDate: Tue Jul 24 14:17:54 2012 -0500
TEST: Add library functions for checking and waiting for sync
Add 'in_sync' and 'wait_for_sync' to test and wait for synchronization
of a mirror or RAID logical volume.
---
test/lib/aux.sh | 12 ++++++++++++
test/lib/check.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 57 insertions(+), 0 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 91f54c9..4128f30 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -479,6 +479,18 @@ udev_wait() {
fi
}
+# wait_for_sync <VG/LV>
+wait_for_sync() {
+ local i
+ for i in {1..500} ; do
+ check in_sync $1 $2 && return
+ sleep .2
+ done
+
+ echo "Sync is taking too long - assume stuck"
+ return 1
+}
+
#
# Check wheter kernel [dm module] target exist
# at least in expected version
diff --git a/test/lib/check.sh b/test/lib/check.sh
index 9c78728..95bba4b 100644
--- a/test/lib/check.sh
+++ b/test/lib/check.sh
@@ -151,6 +151,51 @@ linear() {
$(lvl $lv -o+devices)
}
+# in_sync <VG> <LV>
+# Works for "mirror" and "raid*"
+in_sync() {
+ local a
+ local b
+ local idx
+ local type
+ local lvm_name="$1/$2"
+ local dm_name=$(echo $lvm_name | sed s:-:--: | sed s:/:-:)
+
+ if ! a=(`dmsetup status $dm_name`); then
+ die "Unable to get sync status of $1"
+ elif [ ${a[2]} = "snapshot-origin" ]; then
+ if ! a=(`dmsetup status ${dm_name}-real`); then
+ die "Unable to get sync status of $1"
+ fi
+ fi
+
+ if [ ${a[2]} = "raid" ]; then
+ # Last argument is the sync ratio for RAID
+ idx=$((${#a[@]} - 1))
+ type=${a[3]}
+ elif [ ${a[2]} = "mirror" ]; then
+ # 4th Arg tells us how far to the sync ratio
+ idx=$((${a[3]} + 4))
+ type=${a[2]}
+ else
+ die "Unable to get sync ratio for target type '${a[2]}'"
+ fi
+
+ b=( $(echo ${a[$idx]} | sed s:/:' ':) )
+
+ if [ ${b[0]} != ${b[1]} ]; then
+ echo "$lvm_name ($type) is not in-sync"
+ return 1
+ fi
+
+ if [[ ${a[$(($idx - 1))]} =~ a ]]; then
+ die "$lvm_name in-sync, but 'a' characters in health status"
+ fi
+
+ echo "$lvm_name ($type) is in-sync"
+ return 0
+}
+
active() {
local lv=$1/$2
(get lv_field $lv attr | grep "^....a...$" >/dev/null) || \
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8d5ae472e5226f87…
Commit: 8d5ae472e5226f87175d51722fb5942c531bb8bb
Parent: 48367c5be9b39cd118caeb6b8e554be347d2fd8c
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Jul 19 16:45:08 2012 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Jul 19 16:45:08 2012 +0200
daemon-server: fix error message on daemon shutdown
If a daemon (like lvmetad that is using common daemon-server code)
received a kill signal that was supposed to shut the daemon down,
a spurious message was issued: "Failed to handle a client connection".
This happened if the kill signal came just in the middle of waiting
for a client request in "select" - the request that was supposed to
be handled was blank at that moment of course.
---
WHATS_NEW | 1 +
libdaemon/server/daemon-server.c | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 925ae23..4f23c39 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.97 -
===============================
+ Do not issue "Failed to handle a client connection" error if lvmetad killed.
Support changing of discard and zeroing for thin pool.
Report used discard for thin pool and volume.
Add support for controlling discard behavior of thin pool.
diff --git a/libdaemon/server/daemon-server.c b/libdaemon/server/daemon-server.c
index 65b28e4..5ca9231 100644
--- a/libdaemon/server/daemon-server.c
+++ b/libdaemon/server/daemon-server.c
@@ -510,7 +510,7 @@ void daemon_start(daemon_state s)
if (select(FD_SETSIZE, &in, NULL, NULL, NULL) < 0 && errno != EINTR)
perror("select error");
if (FD_ISSET(s.socket_fd, &in))
- if (!handle_connect(s))
+ if (!_shutdown_requested && !handle_connect(s))
syslog(LOG_ERR, "Failed to handle a client connection.");
}
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=35ebc5d343e2e01b…
Commit: 35ebc5d343e2e01b719ce15c801d522a36e54ac4
Parent: 07e4ac7b00f680ad88aa0ff4c835ea2b27eab44b
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Mon Jul 16 10:43:04 2012 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Mon Jul 16 10:43:04 2012 +0200
conf: add a comment about obsolete .cache file
---
doc/example.conf.in | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/doc/example.conf.in b/doc/example.conf.in
index fbb9271..a085014 100644
--- a/doc/example.conf.in
+++ b/doc/example.conf.in
@@ -86,6 +86,9 @@ devices {
# It is safe to delete the contents: the tools regenerate it.
# (The old setting 'cache' is still respected if neither of
# these new ones is present.)
+ # N.B. This type of caching is obsolete and existing .cache
+ # file is removed if the list of devices is obtained from
+ # udev by setting the obtain_device_list_from_udev to 1.
cache_dir = "@DEFAULT_SYS_DIR@/@DEFAULT_CACHE_SUBDIR@"
cache_file_prefix = ""
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=cd8ea8b437de53f0…
Commit: cd8ea8b437de53f0019bd69d542a7d01f3d5b7d3
Parent: 8767435ef847831455fadc1f7e8f4d2d94aef0d5
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Jul 10 13:49:46 2012 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Tue Jul 10 14:01:33 2012 +0200
activate: skip manual activation for --sysinit -aay
When --sysinit -a ay is used with vg/lvchange and lvmetad is up and running,
we should skip manual activation as that would be a useless step - all volumes
are autoactivated once all the PVs for a VG are present.
If lvmetad is not active at the time of the vgchange --sysinit -a ay
call, the activation proceeds in standard 'manual' way.
This way, we can still have vg/lvchange --sysinit -a ay called
unconditionally in system initialization scripts no matter if lvmetad
is used or not.
---
WHATS_NEW | 1 +
man/lvchange.8.in | 5 +++++
man/vgchange.8.in | 5 +++++
tools/lvchange.c | 7 +++++++
tools/vgchange.c | 7 +++++++
5 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 02ac14a..9d6f091 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.97 -
===============================
+ Skip activation when using vg/lvchange --sysinit -a ay and lvmetad is active.
Fix extending RAID 4/5/6 logical volumes
Fix test for PV with unknown VG in process_each_pv to ignore ignored mdas.
Update man pages with --activate ay option and auto_activation_volume_list.
diff --git a/man/lvchange.8.in b/man/lvchange.8.in
index c7507d4..bf9ef48 100644
--- a/man/lvchange.8.in
+++ b/man/lvchange.8.in
@@ -105,6 +105,11 @@ this is equivalent to using \fB\-\-ignorelockingfailure\fP,
\fB\-\-ignoremonitoring\fP, \fB\-\-poll n\fP and setting
\fBLVM_SUPPRESS_LOCKING_FAILURE_MESSAGES\fP
environment variable.
+
+If \fB\-\-sysinit\fP is used in conjunction with lvmetad(8) enabled and running,
+autoactivation is preferred over manual activation via direct lvchange call.
+Logical volumes are autoactivated according to auto_activation_volume_list
+set in lvm.conf(5).
.TP
.B \-\-noudevsync
Disable udev synchronisation. The
diff --git a/man/vgchange.8.in b/man/vgchange.8.in
index 28e2623..0f5fc58 100644
--- a/man/vgchange.8.in
+++ b/man/vgchange.8.in
@@ -121,6 +121,11 @@ this is equivalent to using
.B \-\-poll n
and setting \fBLVM_SUPPRESS_LOCKING_FAILURE_MESSAGES\fP
environment variable.
+
+If \fB\-\-sysinit\fP is used in conjunction with lvmetad(8) enabled and running,
+autoactivation is preferred over manual activation via direct vgchange call.
+Logical volumes are autoactivated according to auto_activation_volume_list
+set in lvm.conf(5).
.TP
.BR \-\-noudevsync
Disable udev synchronisation. The
diff --git a/tools/lvchange.c b/tools/lvchange.c
index 9876847..9054ac7 100644
--- a/tools/lvchange.c
+++ b/tools/lvchange.c
@@ -798,6 +798,13 @@ int lvchange(struct cmd_context *cmd, int argc, char **argv)
return EINVALID_CMD_LINE;
}
+ if (arg_count(cmd, sysinit_ARG) && lvmetad_active() &&
+ arg_uint_value(cmd, activate_ARG, 0) == CHANGE_AAY) {
+ log_warn("lvmetad is active while using --sysinit -a ay, "
+ "skipping manual activation");
+ return ECMD_PROCESSED;
+ }
+
return process_each_lv(cmd, argc, argv,
update ? READ_FOR_UPDATE : 0, NULL,
&lvchange_single);
diff --git a/tools/vgchange.c b/tools/vgchange.c
index ebabb08..2013447 100644
--- a/tools/vgchange.c
+++ b/tools/vgchange.c
@@ -608,6 +608,13 @@ int vgchange(struct cmd_context *cmd, int argc, char **argv)
return EINVALID_CMD_LINE;
}
+ if (arg_count(cmd, sysinit_ARG) && lvmetad_active() &&
+ arg_uint_value(cmd, activate_ARG, 0) == CHANGE_AAY) {
+ log_warn("lvmetad is active while using --sysinit -a ay, "
+ "skipping manual activation");
+ return ECMD_PROCESSED;
+ }
+
return process_each_vg(cmd, argc, argv, update ? READ_FOR_UPDATE : 0,
NULL, &vgchange_single);
}
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8767435ef8478314…
Commit: 8767435ef847831455fadc1f7e8f4d2d94aef0d5
Parent: bf81d5607a47eb0bf3963be54f4b765b2d24b895
Author: Jonathan Brassow <jbrassow(a)redhat.com>
AuthorDate: Tue Jun 26 09:44:54 2012 -0500
Committer: Jonathan Brassow <jbrassow(a)redhat.com>
CommitterDate: Tue Jun 26 09:44:54 2012 -0500
RAID: Fix extending size of RAID 4/5/6 logical volumes.
Reducing a RAID 4/5/6 LV or extending it with a different number of
stripes is still not implemented. This patch covers the "simple" case
where the LV is extended with the same number of stripes as the orginal.
---
WHATS_NEW | 1 +
lib/metadata/lv_manip.c | 14 +++++++-
test/shell/lvresize-raid.sh | 78 +++++++++++++++++++++++++++++++++++++++++++
tools/lvresize.c | 10 ++++-
4 files changed, 100 insertions(+), 3 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 2e649b1..02ac14a 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.97 -
===============================
+ Fix extending RAID 4/5/6 logical volumes
Fix test for PV with unknown VG in process_each_pv to ignore ignored mdas.
Update man pages with --activate ay option and auto_activation_volume_list.
Fix _alloc_parallel_area to avoid picking already-full areas for raid devices.
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 21508fd..0d89b4a 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -697,6 +697,10 @@ static uint32_t _calc_area_multiple(const struct segment_type *segtype,
if (segtype_is_striped(segtype))
return area_count;
+ /* Parity RAID (e.g. RAID 4/5/6) */
+ if (segtype_is_raid(segtype) && segtype->parity_devs)
+ return area_count - segtype->parity_devs;
+
/* Mirrored stripes */
if (stripes)
return stripes;
@@ -829,7 +833,15 @@ static struct alloc_handle *_alloc_init(struct cmd_context *cmd,
ah->parity_count = parity_count;
ah->region_size = region_size;
ah->alloc = alloc;
- ah->area_multiple = _calc_area_multiple(segtype, area_count, stripes);
+
+ /*
+ * For the purposes of allocation, area_count and parity_count are
+ * kept separately. However, the 'area_count' field in an
+ * lv_segment includes both; and this is what '_calc_area_multiple'
+ * is calculated from. So, we must pass in the total count to get
+ * a correct area_multiple.
+ */
+ ah->area_multiple = _calc_area_multiple(segtype, area_count + parity_count, stripes);
ah->mirror_logs_separate = find_config_tree_bool(cmd, "allocation/mirror_logs_require_separate_pvs",
DEFAULT_MIRROR_LOGS_REQUIRE_SEPARATE_PVS);
diff --git a/test/shell/lvresize-raid.sh b/test/shell/lvresize-raid.sh
new file mode 100644
index 0000000..c6c5dd1
--- /dev/null
+++ b/test/shell/lvresize-raid.sh
@@ -0,0 +1,78 @@
+#!/bin/sh
+# Copyright (C) 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
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+. lib/test
+
+aux prepare_vg 5 80
+
+# Extend a 2-way RAID1
+for deactivate in true false; do
+ lvcreate --type raid1 -m 1 -l 2 -n $lv1 $vg
+
+ if $deactivate; then
+ lvchange -an $vg/$lv1
+ fi
+
+ lvresize -l +2 $vg/$lv1
+
+ #check raid_images_contiguous $vg $lv1
+
+ lvremove -ff $vg
+done
+
+# Reduce 2-way RAID1
+for deactivate in true false; do
+ lvcreate --type raid1 -m 1 -l 4 -n $lv1 $vg
+
+ if $deactivate; then
+ lvchange -an $vg/$lv1
+ fi
+
+ should lvresize -l -2 $vg/$lv1
+
+ #check raid_images_contiguous $vg $lv1
+
+ lvremove -ff $vg
+done
+
+# Extend 3-striped RAID 4/5/6
+for i in 4 5 6 ; do
+ for deactivate in true false; do
+ lvcreate --type raid$i -i 3 -l 3 -n $lv1 $vg
+
+ if $deactivate; then
+ lvchange -an $vg/$lv1
+ fi
+
+ lvresize -l +3 $vg/$lv1
+
+ #check raid_images_contiguous $vg $lv1
+
+ lvremove -ff $vg
+ done
+done
+
+# Reduce 3-striped RAID 4/5/6
+for i in 4 5 6 ; do
+ for deactivate in true false; do
+ lvcreate --type raid$i -i 3 -l 6 -n $lv1 $vg
+
+ if $deactivate; then
+ lvchange -an $vg/$lv1
+ fi
+
+ should lvresize -l -3 $vg/$lv1
+
+ #check raid_images_contiguous $vg $lv1
+
+ lvremove -ff $vg
+ done
+done
diff --git a/tools/lvresize.c b/tools/lvresize.c
index 55d1334..64474e0 100644
--- a/tools/lvresize.c
+++ b/tools/lvresize.c
@@ -598,11 +598,12 @@ static int _lvresize(struct cmd_context *cmd, struct volume_group *vg,
* and data LV could be any type (i.e. mirror)) */
dm_list_iterate_items(seg, seg_mirrors ? &seg_lv(mirr_seg, 0)->segments :
lv_is_thin_pool(lv) ? &seg_lv(first_seg(lv), 0)->segments : &lv->segments) {
- if (!seg_is_striped(seg))
+ if (!seg_is_striped(seg) &&
+ (!seg_is_raid(seg) || seg_is_mirrored(seg)))
continue;
sz = seg->stripe_size;
- str = seg->area_count;
+ str = seg->area_count - lp->segtype->parity_devs;
if ((seg_stripesize && seg_stripesize != sz &&
sz && !lp->stripe_size) ||
@@ -618,6 +619,11 @@ static int _lvresize(struct cmd_context *cmd, struct volume_group *vg,
if (!lp->stripes)
lp->stripes = seg_stripes;
+ else if (seg_is_raid(first_seg(lv)) &&
+ (lp->stripes != seg_stripes)) {
+ log_error("Unable to extend \"%s\" segment type with different number of stripes.", first_seg(lv)->segtype->name);
+ return ECMD_FAILED;
+ }
if (!lp->stripe_size && lp->stripes > 1) {
if (seg_stripesize) {
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=bf81d5607a47eb0b…
Commit: bf81d5607a47eb0bf3963be54f4b765b2d24b895
Parent: 7168880caa5f09da254e930313c2d59547643bb2
Author: Jonathan Brassow <jbrassow(a)redhat.com>
AuthorDate: Tue Jun 26 06:45:45 2012 -0500
Committer: Jonathan Brassow <jbrassow(a)redhat.com>
CommitterDate: Tue Jun 26 06:45:45 2012 -0500
TEST (lvconvert-raid): Turn on RAID conversion testing under snapshots
---
test/shell/lvconvert-raid.sh | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/test/shell/lvconvert-raid.sh b/test/shell/lvconvert-raid.sh
index 6c289a8..a4ebac9 100644
--- a/test/shell/lvconvert-raid.sh
+++ b/test/shell/lvconvert-raid.sh
@@ -81,11 +81,7 @@ vgcreate -c n -s 256k $vg $(cat DEVICES)
###########################################
# RAID1 convert tests
###########################################
-#
-# FIXME: Snapshots of RAID is available, but there are kernel bugs that
-# still prevent its use.
-#for under_snap in false true; do
-for under_snap in false; do
+for under_snap in false true; do
for i in 1 2 3 4; do
for j in 1 2 3 4; do
if [ $i -eq 1 ]; then
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=7168880caa5f09da…
Commit: 7168880caa5f09da254e930313c2d59547643bb2
Parent: 149ab6921e9029e12899c280f290656b1b60742f
Author: Jonathan Brassow <jbrassow(a)redhat.com>
AuthorDate: Mon Jun 25 22:25:46 2012 -0500
Committer: Jonathan Brassow <jbrassow(a)redhat.com>
CommitterDate: Mon Jun 25 22:25:46 2012 -0500
TEST (lvconvert-raid): localize a function variable
Function was overwriting a global variable because it used a variable
of the same name without first declaring it with 'local'.
---
test/shell/lvconvert-raid.sh | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/test/shell/lvconvert-raid.sh b/test/shell/lvconvert-raid.sh
index e7df164..6c289a8 100644
--- a/test/shell/lvconvert-raid.sh
+++ b/test/shell/lvconvert-raid.sh
@@ -60,6 +60,7 @@ is_in_sync_() {
# wait_for_sync <VG/LV>
wait_for_sync_() {
+ local i
for i in {1..100} ; do
is_in_sync_ $1 && return
sleep 1
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=149ab6921e9029e1…
Commit: 149ab6921e9029e12899c280f290656b1b60742f
Parent: 1d0a2b919fe173e3a25e5f19d535588bb5b214e2
Author: Jonathan Brassow <jbrassow(a)redhat.com>
AuthorDate: Mon Jun 25 22:20:24 2012 -0500
Committer: Jonathan Brassow <jbrassow(a)redhat.com>
CommitterDate: Mon Jun 25 22:20:24 2012 -0500
TEST (lvcreate-raid): Allow more time for RAID arrays to sync
My machines can run very slow sometimes causing this test to fail
when it would otherwise have succeeded given more time.
---
test/shell/lvcreate-raid.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/shell/lvcreate-raid.sh b/test/shell/lvcreate-raid.sh
index 21ab9a1..b6792c5 100644
--- a/test/shell/lvcreate-raid.sh
+++ b/test/shell/lvcreate-raid.sh
@@ -41,7 +41,7 @@ function wait_for_raid_sync()
local i=0
while ! is_raid_in_sync $1; do
- sleep .2
+ sleep 1
i=$(($i + 1))
if [ $i -gt 500 ]; then
echo "Sync is taking too long - assume stuck"