Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=fa0a04236c613fb82e3cd…
Commit: fa0a04236c613fb82e3cd559c6b451f5eb7102ad
Parent: bfcecbbce182570d040f3ec446dccb84ca07efcd
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Aug 30 09:54:02 2018 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Aug 30 10:00:36 2018 -0500
tests: add scan-lvs
---
test/shell/scan-lvs.sh | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 47 insertions(+), 0 deletions(-)
diff --git a/test/shell/scan-lvs.sh b/test/shell/scan-lvs.sh
new file mode 100644
index 0000000..8e8a77d
--- /dev/null
+++ b/test/shell/scan-lvs.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
+# Copyright (C) 2014 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# Test scan_lvs config setting
+
+SKIP_WITH_LVMPOLLD=1
+
+. lib/inittest
+
+aux extend_filter_LVMTEST
+
+aux lvmconf 'devices/scan_lvs = 1'
+
+aux prepare_pvs 1
+
+vgcreate $SHARED $vg1 "$dev1"
+
+lvcreate -l1 -n $lv1 $vg1
+
+pvcreate "$DM_DEV_DIR/$vg1/$lv1"
+
+pvs "$DM_DEV_DIR/$vg1/$lv1"
+
+aux lvmconf 'devices/scan_lvs = 0'
+
+not pvs "$DM_DEV_DIR/$vg1/$lv1"
+
+pvs --config devices/scan_lvs=1 "$DM_DEV_DIR/$vg1/$lv1"
+
+not pvremove "$DM_DEV_DIR/$vg1/$lv1"
+
+pvremove --config devices/scan_lvs=1 "$DM_DEV_DIR/$vg1/$lv1"
+
+lvchange -an "$vg1/$lv1"
+
+lvremove "$vg1/$lv1"
+
+vgremove $vg1
+
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=cb17ef221bdefea3625a2…
Commit: cb17ef221bdefea3625a22c19c6d8f5504441771
Parent: fade9ca3b6ee1432ae8c2878815bbf871cacf92d
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Aug 30 12:35:58 2018 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Aug 30 12:35:58 2018 +0200
scripts: add After=rbdmap.service to {lvm2-activation-net,blk-availability}.service
We need to have Ceph RBD devices mapped first before use in a stack
where LVM is on top so make sure rbdmap.service is called before
generated lvm2-activation-net.service.
On shutdown, we need to stop blk-availability first before we stop the
rbdmap.service.
Resolves: rhbz1623479
---
WHATS_NEW | 1 +
.../blk_availability_systemd_red_hat.service.in | 2 +-
.../lvm2_activation_generator_systemd_red_hat.c | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index bf03c49..8489252 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 3.0.0
=============
+ Add After=rbdmap.service to {lvm2-activation-net,blk-availability}.service.
Reduce max concurrent aios to avoid EMFILE with many devices.
Fix lvconvert conversion attempts to linear.
Fix lvconvert raid0/raid0_meta -> striped regression.
diff --git a/scripts/blk_availability_systemd_red_hat.service.in b/scripts/blk_availability_systemd_red_hat.service.in
index 1198baa..9462072 100644
--- a/scripts/blk_availability_systemd_red_hat.service.in
+++ b/scripts/blk_availability_systemd_red_hat.service.in
@@ -1,6 +1,6 @@
[Unit]
Description=Availability of block devices
-After=lvm2-activation.service lvm2-lvmetad.service iscsi-shutdown.service iscsi.service iscsid.service fcoe.service
+After=lvm2-activation.service lvm2-lvmetad.service iscsi-shutdown.service iscsi.service iscsid.service fcoe.service rbdmap.service
DefaultDependencies=no
Conflicts=shutdown.target
diff --git a/scripts/lvm2_activation_generator_systemd_red_hat.c b/scripts/lvm2_activation_generator_systemd_red_hat.c
index b3d18d2..b751841 100644
--- a/scripts/lvm2_activation_generator_systemd_red_hat.c
+++ b/scripts/lvm2_activation_generator_systemd_red_hat.c
@@ -160,7 +160,7 @@ static int generate_unit(struct generator *gen, int unit)
"SourcePath=/etc/lvm/lvm.conf\n" "DefaultDependencies=no\n", f);
if (unit == UNIT_NET) {
- fprintf(f, "After=%s iscsi.service fcoe.service\n"
+ fprintf(f, "After=%s iscsi.service fcoe.service rbdmap.service\n"
"Before=remote-fs-pre.target shutdown.target\n\n"
"[Service]\n"
"ExecStartPre=/usr/bin/udevadm settle\n", _unit_names[UNIT_MAIN]);
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=fade9ca3b6ee1432ae8c2…
Commit: fade9ca3b6ee1432ae8c2878815bbf871cacf92d
Parent: 3c966e637fe1bec587ceb9ad13aa009db64b4f8e
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Aug 24 14:46:51 2018 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Aug 24 14:55:12 2018 -0500
bcache: reduce MAX_IO to 256
This is the number of concurrent async io requests that
the scan layer will submit to the bcache layer. There
will be an open fd for each of these, so it is best to
keep this well below the default limit for max open files
(1024), otherwise lvm may get EMFILE from open(2) when
there are around 1024 devices to scan on the system.
---
WHATS_NEW | 1 +
lib/device/bcache.c | 10 +++++++++-
2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index fd1b732..bf03c49 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 3.0.0
=============
+ Reduce max concurrent aios to avoid EMFILE with many devices.
Fix lvconvert conversion attempts to linear.
Fix lvconvert raid0/raid0_meta -> striped regression.
Fix lvconvert --splitmirror for mirror type (2.02.178).
diff --git a/lib/device/bcache.c b/lib/device/bcache.c
index 8d55c36..e759997 100644
--- a/lib/device/bcache.c
+++ b/lib/device/bcache.c
@@ -198,7 +198,15 @@ static bool _async_issue(struct io_engine *ioe, enum dir d, int fd,
return true;
}
-#define MAX_IO 1024
+/*
+ * MAX_IO is returned to the layer above via bcache_max_prefetches() which
+ * tells the caller how many devices to submit io for concurrently. There will
+ * be an open file descriptor for each of these, so keep it low enough to avoid
+ * reaching the default max open file limit (1024) when there are over 1024
+ * devices being scanned.
+ */
+
+#define MAX_IO 256
#define MAX_EVENT 64
static bool _async_wait(struct io_engine *ioe, io_complete_fn fn)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=3c966e637fe1bec587ceb…
Commit: 3c966e637fe1bec587ceb9ad13aa009db64b4f8e
Parent: e83c4f07ca4a84808178d5d22cba655e5e370cd8
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Wed Aug 22 17:11:03 2018 +0200
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Wed Aug 22 17:12:44 2018 +0200
test: add striped -> raid0 test script
---
test/shell/lvconvert-striped-raid0.sh | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/test/shell/lvconvert-striped-raid0.sh b/test/shell/lvconvert-striped-raid0.sh
new file mode 100644
index 0000000..5cfb792
--- /dev/null
+++ b/test/shell/lvconvert-striped-raid0.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+
+# Copyright (C) 2018 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+SKIP_WITH_LVMPOLLD=1
+
+. lib/inittest
+
+aux have_raid 1 7 0 || skip
+
+aux prepare_vg 3 16
+
+lvcreate -aey --type striped -i 3 -l3 -n $lv $vg
+lvconvert -y --type raid0_meta $vg/$lv
+check lv_field $vg/$lv segtype "raid0_meta"
+vgremove -ff $vg