Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=10ede2cc0fdabaeb19c5b…
Commit: 10ede2cc0fdabaeb19c5b5b3341164432f6d4425
Parent: 4578411633a40c8c9068ff439ef3c33cbe78d25a
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Aug 21 12:24:35 2018 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Aug 21 12:24:35 2018 -0500
config: improve use_blkid_wiping
mention that libblkid is used to both detect
and erase signatures.
---
lib/config/config_settings.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 7882e95..1d0cc79 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -471,7 +471,7 @@ cfg(allocation_maximise_cling_CFG, "maximise_cling", allocation_CFG_SECTION, 0,
"and revert to the previous algorithm.\n")
cfg(allocation_use_blkid_wiping_CFG, "use_blkid_wiping", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_USE_BLKID_WIPING, vsn(2, 2, 105), "@DEFAULT_USE_BLKID_WIPING@", 0, NULL,
- "Use blkid to detect existing signatures on new PVs and LVs.\n"
+ "Use blkid to detect and erase existing signatures on new PVs and LVs.\n"
"The blkid library can detect more signatures than the native LVM\n"
"detection code, but may take longer. LVM needs to be compiled with\n"
"blkid wiping support for this setting to apply. LVM native detection\n"
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=4578411633a40c8c9068f…
Commit: 4578411633a40c8c9068ff439ef3c33cbe78d25a
Parent: 8b05f1f230517aa42878aa160d94383ed0534c64
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Tue Aug 21 17:12:33 2018 +0200
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Tue Aug 21 17:28:56 2018 +0200
lvconvert: fix regression preventing direct striped conversion
Conversion to striped from raid0/raid0_meta is directly possible.
Fix a regression setting superfluous interim raid5_n conversion type
introduced by commit bd7cdd0b09ba123b064937fddde08daacbed7dab.
Add new test script lvconvert-raid0-striped.sh.
Resolves: rhbz1608067
---
WHATS_NEW | 1 +
lib/metadata/raid_manip.c | 3 +++
test/shell/lvconvert-raid0-striped.sh | 25 +++++++++++++++++++++++++
3 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 0a0b6e9..0ea2789 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 3.0.0
=============
+ Fix lvconvert raid0/raid0_meta -> striped regression.
Fix lvconvert --splitmirror for mirror type (2.02.178).
Do not pair cache policy and cache metadata format.
lvconvert: reject conversions on raid1 LVs with split tracked SubLVs
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index 931b411..5441527 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -6126,6 +6126,9 @@ static int _set_convenient_raid145610_segtype_to(const struct lv_segment *seg_fr
if (seg_from->area_count == 1)
seg_flag = SEG_RAID1;
+ else if (seg_is_any_raid0(seg_from) && segtype_is_striped(*segtype))
+ ;
+
/* If this is any raid5 conversion request -> enforce raid5_n, because we convert from striped */
else if (((segtype_is_striped(*segtype) && !segtype_is_any_raid0(*segtype)) || segtype_is_any_raid5(*segtype)) &&
!segtype_is_raid5_n(*segtype))
diff --git a/test/shell/lvconvert-raid0-striped.sh b/test/shell/lvconvert-raid0-striped.sh
new file mode 100644
index 0000000..4521b34
--- /dev/null
+++ b/test/shell/lvconvert-raid0-striped.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 raid0 -i 3 -l3 -n $lv $vg
+lvconvert -y --type striped $vg/$lv
+check lv_field $vg/$lv segtype "striped"
+vgremove -ff $vg
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c34291e3bf61cc2644389…
Commit: c34291e3bf61cc2644389cbce77e9953f67a843a
Parent: 9adae653e98256901897e65aa349bb83a9f9ad5c
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Aug 7 10:33:19 2018 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Aug 7 17:57:00 2018 +0200
cache: drop metadata_format validation
Allow to use any combination of cache metadata format for policy.
---
WHATS_NEW | 1 +
lib/metadata/cache_manip.c | 5 -----
2 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 2c5b5d3..2cf7969 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 3.0.0
=============
+ Do not pair cache policy and cache metadata format.
lvconvert: reject conversions on raid1 LVs with split tracked SubLVs
lvconvert: reject conversions on raid1 split tracked SubLVs
Add basic creation support for VDO target.
diff --git a/lib/metadata/cache_manip.c b/lib/metadata/cache_manip.c
index 4132e2f..5ba353c 100644
--- a/lib/metadata/cache_manip.c
+++ b/lib/metadata/cache_manip.c
@@ -842,15 +842,10 @@ int cache_set_metadata_format(struct lv_segment *seg, cache_metadata_format_t fo
/*
* If policy is unselected, but format 2 is selected, policy smq is enforced.
- * ATM no other then smq & cleaner policy is allowed to select format 2.
*/
if (!seg->policy_name) {
if (format == CACHE_METADATA_FORMAT_2)
seg->policy_name = "smq";
- } else if (strcmp(seg->policy_name, "smq") &&
- strcmp(seg->policy_name, "cleaner")) {
- seg->cache_metadata_format = CACHE_METADATA_FORMAT_1;
- return 1;
}
/* Check if we need to search for configured cache metadata format */
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d1310242550e28dfe7c38…
Commit: d1310242550e28dfe7c386a78435235955963c95
Parent: acab59137869e2f8119d8faa09fdab5074b8c4b2
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Aug 7 10:34:59 2018 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Aug 7 17:59:50 2018 +0200
tests: splitmirror for mirror type
---
test/shell/lvconvert-mirror-split.sh | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/test/shell/lvconvert-mirror-split.sh b/test/shell/lvconvert-mirror-split.sh
new file mode 100644
index 0000000..40720a4
--- /dev/null
+++ b/test/shell/lvconvert-mirror-split.sh
@@ -0,0 +1,32 @@
+#!/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
+
+# Check --splitmirrors for mirror segtype
+
+. lib/inittest
+
+aux prepare_vg 3
+
+###########################################
+# Mirror split tests
+###########################################
+# 3-way to 2-way/linear
+lvcreate --type mirror -m 2 -l 2 -n $lv1 $vg
+aux wait_for_sync $vg $lv1
+lvconvert --splitmirrors 1 -n $lv2 -vvvv $vg/$lv1
+
+check lv_exists $vg $lv1
+check linear $vg $lv2
+check active $vg $lv2
+# FIXME: ensure no residual devices
+
+vgremove -ff $vg
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9adae653e98256901897e…
Commit: 9adae653e98256901897e65aa349bb83a9f9ad5c
Parent: 763219611c30d6870013b7cb84d66ec67a5dd7ec
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Aug 2 11:26:59 2018 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Aug 2 11:42:33 2018 -0500
mirrors: fix read_only_volume_list
If a mirror LV is listed in read_only_volume_list, it would
still be activated rw. The activation would initially be
readonly, but the monitoring function would immediately
change it to rw. This was a regression from commit
fade45b1d14c mirror: improve table update
The monitoring function needs to copy the read_only setting
into the new set of mirror activation options it uses.
---
lib/activate/activate.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/activate/activate.c b/lib/activate/activate.c
index 28d67b4..d4a20c9 100644
--- a/lib/activate/activate.c
+++ b/lib/activate/activate.c
@@ -1740,6 +1740,8 @@ int monitor_dev_for_events(struct cmd_context *cmd, const struct logical_volume
if (!laopts)
laopts = &zlaopts;
+ else
+ mirr_laopts.read_only = laopts->read_only;
/* skip dmeventd code altogether */
if (dmeventd_monitor_mode() == DMEVENTD_MONITOR_IGNORE)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=763219611c30d6870013b…
Commit: 763219611c30d6870013b7cb84d66ec67a5dd7ec
Parent: aa464aa2f6b438092a50ca20f149557550c7147b
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Aug 1 10:26:28 2018 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Aug 1 11:22:23 2018 -0500
vgcreate: close exclusive fd after pvcreate
When vgcreate does an automatic pvcreate, it opens the
dev with O_EXCL to ensure no other subsystem is using
the device. This exclusive fd remained in bcache and
prevented activation parts of lvm from using the dev.
This appeared with vgcreate of a sanlock VG because of
the unique combination where the dev is not yet a PV,
so pvcreate is needed, and the vgcreate also creates
and activates an internal LV for sanlock.
Fix this by closing the exclusive fd after it's used
by pvcreate so that it won't interfere with other
bits of lvm that may try to use the device.
---
lib/label/label.c | 6 +++---
tools/toollib.c | 7 +++++++
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/lib/label/label.c b/lib/label/label.c
index d2c8685..9fe11f6 100644
--- a/lib/label/label.c
+++ b/lib/label/label.c
@@ -1185,7 +1185,7 @@ bool dev_write_bytes(struct device *dev, uint64_t start, size_t len, void *data)
return false;
}
- if (!(dev->flags & DEV_BCACHE_WRITE)) {
+ if (_in_bcache(dev) && !(dev->flags & DEV_BCACHE_WRITE)) {
/* FIXME: avoid tossing out bcache blocks just to replace fd. */
log_debug("Close and reopen to write %s", dev_name(dev));
bcache_invalidate_fd(scan_bcache, dev->bcache_fd);
@@ -1231,7 +1231,7 @@ bool dev_write_zeros(struct device *dev, uint64_t start, size_t len)
return false;
}
- if (!(dev->flags & DEV_BCACHE_WRITE)) {
+ if (_in_bcache(dev) && !(dev->flags & DEV_BCACHE_WRITE)) {
/* FIXME: avoid tossing out bcache blocks just to replace fd. */
log_debug("Close and reopen to write %s", dev_name(dev));
bcache_invalidate_fd(scan_bcache, dev->bcache_fd);
@@ -1277,7 +1277,7 @@ bool dev_set_bytes(struct device *dev, uint64_t start, size_t len, uint8_t val)
return false;
}
- if (!(dev->flags & DEV_BCACHE_WRITE)) {
+ if (_in_bcache(dev) && !(dev->flags & DEV_BCACHE_WRITE)) {
/* FIXME: avoid tossing out bcache blocks just to replace fd. */
log_debug("Close and reopen to write %s", dev_name(dev));
bcache_invalidate_fd(scan_bcache, dev->bcache_fd);
diff --git a/tools/toollib.c b/tools/toollib.c
index 36ae125..85d44b3 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -5782,6 +5782,13 @@ do_command:
pd->name);
}
+ /*
+ * Don't keep devs open excl in bcache because the excl will prevent
+ * using that dev elsewhere.
+ */
+ dm_list_iterate_items(devl, &rescan_devs)
+ label_scan_invalidate(devl->dev);
+
dm_list_iterate_items(pd, &pp->arg_fail)
log_debug("%s: command failed for %s.",
cmd->command->name, pd->name);