master - tests: lvmlockd-lv-types handle new cpool renaming
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=221edf40305de4cab74...
Commit: 221edf40305de4cab7441d88adf6a15b73c556c3
Parent: 0ba260e397ba7159eaccee8c0adab8fdb0664be7
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Oct 24 13:26:33 2019 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Oct 24 13:26:33 2019 -0500
tests: lvmlockd-lv-types handle new cpool renaming
---
test/shell/lvmlockd-lv-types.sh | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/shell/lvmlockd-lv-types.sh b/test/shell/lvmlockd-lv-types.sh
index 44ff532..3503f24 100644
--- a/test/shell/lvmlockd-lv-types.sh
+++ b/test/shell/lvmlockd-lv-types.sh
@@ -131,9 +131,9 @@ check lva_field $vg/lv1 lockargs $LOCKARGS1
lvconvert -y --type cache --cachepool $vg/cache1 $vg/lv1
check lva_field $vg/lv1 lockargs $LOCKARGS1
-check lva_field $vg/cache1 lockargs ""
-check lva_field $vg/cache1_cdata lockargs ""
-check lva_field $vg/cache1_cmeta lockargs ""
+check lva_field $vg/cache1_cpool lockargs ""
+check lva_field $vg/cache1_cpool_cdata lockargs ""
+check lva_field $vg/cache1_cpool_cmeta lockargs ""
lvconvert --splitcache $vg/lv1
check lva_field $vg/lv1 lockargs $LOCKARGS1
4 years, 6 months
stable-2.02 - config: allow_mixed_block_sizes set version 2.02.187
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=96fd312e85ce38a8fc8...
Commit: 96fd312e85ce38a8fc8cb80f106f3fdc49c31a97
Parent: f53cce1804236e69b0ec99f490f0c2d2d001cf5d
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Oct 24 10:19:59 2019 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Oct 24 10:26:33 2019 -0500
config: allow_mixed_block_sizes set version 2.02.187
---
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 498ec23..429bff1 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -470,7 +470,7 @@ cfg(devices_allow_changes_with_duplicate_pvs_CFG, "allow_changes_with_duplicate_
"Enabling this setting allows the VG to be used as usual even with\n"
"uncertain devices.\n")
-cfg(devices_allow_mixed_block_sizes_CFG, "allow_mixed_block_sizes", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 3, 6), NULL, 0, NULL,
+cfg(devices_allow_mixed_block_sizes_CFG, "allow_mixed_block_sizes", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 187), NULL, 0, NULL,
"Allow PVs in the same VG with different logical block sizes.\n"
"When allowed, the user is responsible to ensure that an LV is\n"
"using PVs with matching block sizes when necessary.\n")
4 years, 6 months
stable-2.02 - config: allow_mixed_block_sizes set default to 1
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f53cce1804236e69b0e...
Commit: f53cce1804236e69b0ec99f490f0c2d2d001cf5d
Parent: e298a87f71927987c2c324e2a53e1b4cd840f186
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Oct 24 10:02:34 2019 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Oct 24 10:26:28 2019 -0500
config: allow_mixed_block_sizes set default to 1
to use the old behavior by default, which allows
using mixed block sizes. The user will need to
set it to 0 in lvm.conf to turn on the new restrictions.
---
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 7981d5d..498ec23 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -470,7 +470,7 @@ cfg(devices_allow_changes_with_duplicate_pvs_CFG, "allow_changes_with_duplicate_
"Enabling this setting allows the VG to be used as usual even with\n"
"uncertain devices.\n")
-cfg(devices_allow_mixed_block_sizes_CFG, "allow_mixed_block_sizes", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(2, 3, 6), NULL, 0, NULL,
+cfg(devices_allow_mixed_block_sizes_CFG, "allow_mixed_block_sizes", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 3, 6), NULL, 0, NULL,
"Allow PVs in the same VG with different logical block sizes.\n"
"When allowed, the user is responsible to ensure that an LV is\n"
"using PVs with matching block sizes when necessary.\n")
4 years, 6 months
stable-2.02 - Revert "tests: remove allow-mixed-block-sizes"
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e298a87f71927987c2c...
Commit: e298a87f71927987c2c324e2a53e1b4cd840f186
Parent: c2853147639ca31f16539a4e6316ef3320811497
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Oct 24 10:12:10 2019 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Oct 24 10:26:28 2019 -0500
Revert "tests: remove allow-mixed-block-sizes"
This reverts commit 4e99308b7cab21fd79d1290a5aa47aee4ee4a76e.
---
test/shell/allow-mixed-block-sizes.sh | 46 +++++++++++++++++++++++++++++++++
1 files changed, 46 insertions(+), 0 deletions(-)
diff --git a/test/shell/allow-mixed-block-sizes.sh b/test/shell/allow-mixed-block-sizes.sh
new file mode 100644
index 0000000..2f0b3a0
--- /dev/null
+++ b/test/shell/allow-mixed-block-sizes.sh
@@ -0,0 +1,46 @@
+#!/usr/bin/env bash
+
+# Copyright (C) 2019 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
+
+losetup -h | grep sector-size || skip
+
+dd if=/dev/zero of=loopa bs=$((1024*1024)) count=2 2> /dev/null
+dd if=/dev/zero of=loopb bs=$((1024*1024)) count=2 2> /dev/null
+LOOP1=$(losetup -f loopa --sector-size 4096 --show)
+LOOP2=$(losetup -f loopb --show)
+
+echo $LOOP1
+echo $LOOP2
+
+aux extend_filter "a|$LOOP1|"
+aux extend_filter "a|$LOOP2|"
+
+not vgcreate --config 'devices {allow_mixed_block_sizes=0 scan="/dev"}' $vg $LOOP1 $LOOP2
+vgcreate --config 'devices {allow_mixed_block_sizes=1 scan="/dev"}' $vg $LOOP1 $LOOP2
+vgs --config 'devices {allow_mixed_block_sizes=1 scan="/dev"}' $vg
+
+wipefs -a $LOOP1
+wipefs -a $LOOP2
+
+vgcreate --config 'devices {allow_mixed_block_sizes=1 scan="/dev"}' $vg $LOOP1
+vgs --config 'devices {allow_mixed_block_sizes=1 scan="/dev"}' $vg
+not vgextend --config 'devices {allow_mixed_block_sizes=0 scan="/dev"}' $vg $LOOP2
+vgextend --config 'devices {allow_mixed_block_sizes=1 scan="/dev"}' $vg $LOOP2
+
+losetup -d $LOOP1
+losetup -d $LOOP2
+rm loopa
+rm loopb
+
4 years, 6 months
stable-2.02 - Revert "Revert "vgcreate/vgextend: restrict PVs with mixed block sizes""
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c2853147639ca31f165...
Commit: c2853147639ca31f16539a4e6316ef3320811497
Parent: 4e99308b7cab21fd79d1290a5aa47aee4ee4a76e
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Oct 24 10:01:12 2019 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Oct 24 10:01:12 2019 -0500
Revert "Revert "vgcreate/vgextend: restrict PVs with mixed block sizes""
This reverts commit c37aa7881d840c429b858ee0068f0151e46ce0d9.
Put back the setting again, but the next commit will just
turn off the new behavior by default.
---
lib/commands/toolcontext.h | 1 +
lib/config/config_settings.h | 5 ++++
lib/metadata/metadata-exported.h | 1 +
lib/metadata/metadata.c | 44 +++++++++++++++++++++++++++++++++++
tools/lvmcmdline.c | 2 +
tools/toollib.c | 47 ++++++++++++++++++++++++++++++++++++++
tools/vgcreate.c | 2 +
7 files changed, 102 insertions(+), 0 deletions(-)
diff --git a/lib/commands/toolcontext.h b/lib/commands/toolcontext.h
index 4b2a079..497f4bd 100644
--- a/lib/commands/toolcontext.h
+++ b/lib/commands/toolcontext.h
@@ -155,6 +155,7 @@ struct cmd_context {
unsigned include_shared_vgs:1; /* report/display cmds can reveal lockd VGs */
unsigned include_active_foreign_vgs:1; /* cmd should process foreign VGs with active LVs */
unsigned vg_read_print_access_error:1; /* print access errors from vg_read */
+ unsigned allow_mixed_block_sizes:1;
unsigned force_access_clustered:1;
unsigned lockd_gl_disable:1;
unsigned lockd_vg_disable:1;
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 0e81252..7981d5d 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -470,6 +470,11 @@ cfg(devices_allow_changes_with_duplicate_pvs_CFG, "allow_changes_with_duplicate_
"Enabling this setting allows the VG to be used as usual even with\n"
"uncertain devices.\n")
+cfg(devices_allow_mixed_block_sizes_CFG, "allow_mixed_block_sizes", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(2, 3, 6), NULL, 0, NULL,
+ "Allow PVs in the same VG with different logical block sizes.\n"
+ "When allowed, the user is responsible to ensure that an LV is\n"
+ "using PVs with matching block sizes when necessary.\n")
+
cfg_array(allocation_cling_tag_list_CFG, "cling_tag_list", allocation_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 77), NULL, 0, NULL,
"Advise LVM which PVs to use when searching for new space.\n"
"When searching for free space to extend an LV, the 'cling' allocation\n"
diff --git a/lib/metadata/metadata-exported.h b/lib/metadata/metadata-exported.h
index 75caba1..9c24132 100644
--- a/lib/metadata/metadata-exported.h
+++ b/lib/metadata/metadata-exported.h
@@ -591,6 +591,7 @@ struct pvcreate_params {
unsigned is_remove : 1; /* is removing PVs, not creating */
unsigned preserve_existing : 1;
unsigned check_failed : 1;
+ unsigned check_consistent_block_size : 1;
};
struct lvresize_params {
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index cb38f66..81a6029 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -699,12 +699,40 @@ int vg_extend_each_pv(struct volume_group *vg, struct pvcreate_params *pp)
{
struct pv_list *pvl;
unsigned int max_phys_block_size = 0;
+ unsigned int physical_block_size, logical_block_size;
+ unsigned int prev_lbs = 0;
+ int inconsistent_existing_lbs = 0;
log_debug_metadata("Adding PVs to VG %s.", vg->name);
if (vg_bad_status_bits(vg, RESIZEABLE_VG))
return_0;
+ /*
+ * Check if existing PVs have inconsistent block sizes.
+ * If so, do not enforce new devices to be consistent.
+ */
+ dm_list_iterate_items(pvl, &vg->pvs) {
+ logical_block_size = 0;
+ physical_block_size = 0;
+
+ if (!dev_get_direct_block_sizes(pvl->pv->dev, &physical_block_size, &logical_block_size))
+ continue;
+
+ if (!logical_block_size)
+ continue;
+
+ if (!prev_lbs) {
+ prev_lbs = logical_block_size;
+ continue;
+ }
+
+ if (prev_lbs != logical_block_size) {
+ inconsistent_existing_lbs = 1;
+ break;
+ }
+ }
+
dm_list_iterate_items(pvl, &pp->pvs) {
log_debug_metadata("Adding PV %s to VG %s.", pv_dev_name(pvl->pv), vg->name);
@@ -715,6 +743,22 @@ int vg_extend_each_pv(struct volume_group *vg, struct pvcreate_params *pp)
return 0;
}
+ logical_block_size = 0;
+ physical_block_size = 0;
+
+ if (!dev_get_direct_block_sizes(pvl->pv->dev, &physical_block_size, &logical_block_size))
+ log_warn("WARNING: PV %s has unknown block size.", pv_dev_name(pvl->pv));
+
+ else if (prev_lbs && logical_block_size && (logical_block_size != prev_lbs)) {
+ if (vg->cmd->allow_mixed_block_sizes || inconsistent_existing_lbs)
+ log_debug("Devices have inconsistent block sizes (%u and %u)", prev_lbs, logical_block_size);
+ else {
+ log_error("Devices have inconsistent logical block sizes (%u and %u).",
+ prev_lbs, logical_block_size);
+ return 0;
+ }
+ }
+
if (!add_pv_to_vg(vg, pv_dev_name(pvl->pv), pvl->pv, 0)) {
log_error("PV %s cannot be added to VG %s.",
pv_dev_name(pvl->pv), vg->name);
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index 6a1ab11..9c39f48 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -2306,6 +2306,8 @@ static int _get_current_settings(struct cmd_context *cmd)
if (cmd->cname->flags & CAN_USE_ONE_SCAN)
cmd->can_use_one_scan = 1;
+ cmd->allow_mixed_block_sizes = find_config_tree_bool(cmd, devices_allow_mixed_block_sizes_CFG, NULL);
+
cmd->partial_activation = 0;
cmd->degraded_activation = 0;
activation_mode = find_config_tree_str(cmd, activation_mode_CFG, NULL);
diff --git a/tools/toollib.c b/tools/toollib.c
index 1b01ccc..42179d9 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -5481,6 +5481,8 @@ int pvcreate_each_device(struct cmd_context *cmd,
struct device_list *devl;
const char *pv_name;
int consistent = 0;
+ unsigned int physical_block_size, logical_block_size;
+ unsigned int prev_pbs = 0, prev_lbs = 0;
int must_use_all = (cmd->cname->flags & MUST_USE_ALL_ARGS);
int found;
unsigned i;
@@ -5559,6 +5561,51 @@ int pvcreate_each_device(struct cmd_context *cmd,
pd->dev = dev_cache_get(pd->name, cmd->full_filter);
/*
+ * Check for consistent block sizes.
+ */
+ if (pp->check_consistent_block_size) {
+ dm_list_iterate_items(pd, &pp->arg_devices) {
+ if (!pd->dev)
+ continue;
+
+ logical_block_size = 0;
+ physical_block_size = 0;
+
+ if (!dev_get_direct_block_sizes(pd->dev, &physical_block_size, &logical_block_size)) {
+ log_warn("WARNING: Unknown block size for device %s.", dev_name(pd->dev));
+ continue;
+ }
+
+ if (!logical_block_size) {
+ log_warn("WARNING: Unknown logical_block_size for device %s.", dev_name(pd->dev));
+ continue;
+ }
+
+ if (!prev_lbs) {
+ prev_lbs = logical_block_size;
+ prev_pbs = physical_block_size;
+ continue;
+ }
+
+ if (prev_lbs == logical_block_size) {
+ /* Require lbs to match, just warn about unmatching pbs. */
+ if (!cmd->allow_mixed_block_sizes && prev_pbs && physical_block_size &&
+ (prev_pbs != physical_block_size))
+ log_warn("WARNING: Devices have inconsistent physical block sizes (%u and %u).",
+ prev_pbs, physical_block_size);
+ continue;
+ }
+
+ if (!cmd->allow_mixed_block_sizes) {
+ log_error("Devices have inconsistent logical block sizes (%u and %u).",
+ prev_lbs, logical_block_size);
+ log_print("See lvm.conf allow_mixed_block_sizes.");
+ return 0;
+ }
+ }
+ }
+
+ /*
* Use process_each_pv to search all existing PVs and devices.
*
* This is a slightly different way to use process_each_pv, because the
diff --git a/tools/vgcreate.c b/tools/vgcreate.c
index 4356d99..7add53b 100644
--- a/tools/vgcreate.c
+++ b/tools/vgcreate.c
@@ -48,6 +48,8 @@ int vgcreate(struct cmd_context *cmd, int argc, char **argv)
/* Don't create a new PV on top of an existing PV like pvcreate does. */
pp.preserve_existing = 1;
+ pp.check_consistent_block_size = 1;
+
if (!vgcreate_params_set_defaults(cmd, &vp_def, NULL))
return EINVALID_CMD_LINE;
vp_def.vg_name = vg_name;
4 years, 6 months
master - man lvmthin: change wording about mounting xfs
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=0ba260e397ba7159eac...
Commit: 0ba260e397ba7159eaccee8c0adab8fdb0664be7
Parent: c8b01f33a675a4f7e35acc78d56b746a81ddec33
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Oct 24 10:09:41 2019 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Oct 24 10:10:18 2019 -0500
man lvmthin: change wording about mounting xfs
---
man/lvmthin.7_main | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/man/lvmthin.7_main b/man/lvmthin.7_main
index 27bad57..8425614 100644
--- a/man/lvmthin.7_main
+++ b/man/lvmthin.7_main
@@ -1330,12 +1330,16 @@ dummy transaction, but will require skipping the uuid check:
mount /dev/VG/SnapLV /mnt -o nouuid
-Or, the uuid can be changed on disk before mounting:
+After the first mount with the above approach, the UUID can subsequently be
+changed using:
xfs_admin -U generate /dev/VG/SnapLV
.br
mount /dev/VG/SnapLV /mnt
+Once the UUID has been changed, the mount command will no longer require
+the nouuid option.
+
If the snapshot LV is readonly, the log recovery and uuid check need to be
skipped while mounting readonly:
4 years, 6 months
stable-2.02 - tests: remove allow-mixed-block-sizes
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=4e99308b7cab21fd79d...
Commit: 4e99308b7cab21fd79d1290a5aa47aee4ee4a76e
Parent: c37aa7881d840c429b858ee0068f0151e46ce0d9
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Oct 23 13:26:19 2019 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Oct 23 13:26:19 2019 -0500
tests: remove allow-mixed-block-sizes
---
test/shell/allow-mixed-block-sizes.sh | 46 ---------------------------------
1 files changed, 0 insertions(+), 46 deletions(-)
diff --git a/test/shell/allow-mixed-block-sizes.sh b/test/shell/allow-mixed-block-sizes.sh
deleted file mode 100644
index 2f0b3a0..0000000
--- a/test/shell/allow-mixed-block-sizes.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/env bash
-
-# Copyright (C) 2019 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
-
-losetup -h | grep sector-size || skip
-
-dd if=/dev/zero of=loopa bs=$((1024*1024)) count=2 2> /dev/null
-dd if=/dev/zero of=loopb bs=$((1024*1024)) count=2 2> /dev/null
-LOOP1=$(losetup -f loopa --sector-size 4096 --show)
-LOOP2=$(losetup -f loopb --show)
-
-echo $LOOP1
-echo $LOOP2
-
-aux extend_filter "a|$LOOP1|"
-aux extend_filter "a|$LOOP2|"
-
-not vgcreate --config 'devices {allow_mixed_block_sizes=0 scan="/dev"}' $vg $LOOP1 $LOOP2
-vgcreate --config 'devices {allow_mixed_block_sizes=1 scan="/dev"}' $vg $LOOP1 $LOOP2
-vgs --config 'devices {allow_mixed_block_sizes=1 scan="/dev"}' $vg
-
-wipefs -a $LOOP1
-wipefs -a $LOOP2
-
-vgcreate --config 'devices {allow_mixed_block_sizes=1 scan="/dev"}' $vg $LOOP1
-vgs --config 'devices {allow_mixed_block_sizes=1 scan="/dev"}' $vg
-not vgextend --config 'devices {allow_mixed_block_sizes=0 scan="/dev"}' $vg $LOOP2
-vgextend --config 'devices {allow_mixed_block_sizes=1 scan="/dev"}' $vg $LOOP2
-
-losetup -d $LOOP1
-losetup -d $LOOP2
-rm loopa
-rm loopb
-
4 years, 6 months
stable-2.02 - Revert "vgcreate/vgextend: restrict PVs with mixed block sizes"
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c37aa7881d840c429b8...
Commit: c37aa7881d840c429b858ee0068f0151e46ce0d9
Parent: c65f3fd8dfaae6efd8529a846c6f2a9f604c440d
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Oct 23 13:24:02 2019 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Oct 23 13:25:25 2019 -0500
Revert "vgcreate/vgextend: restrict PVs with mixed block sizes"
This reverts commit a57b92dec396ac79c57e02e54c04e205aa85f084.
This can break existing usage, so it's not suitable for the
stable branch.
---
lib/commands/toolcontext.h | 1 -
lib/config/config_settings.h | 5 ----
lib/metadata/metadata-exported.h | 1 -
lib/metadata/metadata.c | 44 -----------------------------------
tools/lvmcmdline.c | 2 -
tools/toollib.c | 47 --------------------------------------
tools/vgcreate.c | 2 -
7 files changed, 0 insertions(+), 102 deletions(-)
diff --git a/lib/commands/toolcontext.h b/lib/commands/toolcontext.h
index 497f4bd..4b2a079 100644
--- a/lib/commands/toolcontext.h
+++ b/lib/commands/toolcontext.h
@@ -155,7 +155,6 @@ struct cmd_context {
unsigned include_shared_vgs:1; /* report/display cmds can reveal lockd VGs */
unsigned include_active_foreign_vgs:1; /* cmd should process foreign VGs with active LVs */
unsigned vg_read_print_access_error:1; /* print access errors from vg_read */
- unsigned allow_mixed_block_sizes:1;
unsigned force_access_clustered:1;
unsigned lockd_gl_disable:1;
unsigned lockd_vg_disable:1;
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 7981d5d..0e81252 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -470,11 +470,6 @@ cfg(devices_allow_changes_with_duplicate_pvs_CFG, "allow_changes_with_duplicate_
"Enabling this setting allows the VG to be used as usual even with\n"
"uncertain devices.\n")
-cfg(devices_allow_mixed_block_sizes_CFG, "allow_mixed_block_sizes", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(2, 3, 6), NULL, 0, NULL,
- "Allow PVs in the same VG with different logical block sizes.\n"
- "When allowed, the user is responsible to ensure that an LV is\n"
- "using PVs with matching block sizes when necessary.\n")
-
cfg_array(allocation_cling_tag_list_CFG, "cling_tag_list", allocation_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 77), NULL, 0, NULL,
"Advise LVM which PVs to use when searching for new space.\n"
"When searching for free space to extend an LV, the 'cling' allocation\n"
diff --git a/lib/metadata/metadata-exported.h b/lib/metadata/metadata-exported.h
index 9c24132..75caba1 100644
--- a/lib/metadata/metadata-exported.h
+++ b/lib/metadata/metadata-exported.h
@@ -591,7 +591,6 @@ struct pvcreate_params {
unsigned is_remove : 1; /* is removing PVs, not creating */
unsigned preserve_existing : 1;
unsigned check_failed : 1;
- unsigned check_consistent_block_size : 1;
};
struct lvresize_params {
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index 81a6029..cb38f66 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -699,40 +699,12 @@ int vg_extend_each_pv(struct volume_group *vg, struct pvcreate_params *pp)
{
struct pv_list *pvl;
unsigned int max_phys_block_size = 0;
- unsigned int physical_block_size, logical_block_size;
- unsigned int prev_lbs = 0;
- int inconsistent_existing_lbs = 0;
log_debug_metadata("Adding PVs to VG %s.", vg->name);
if (vg_bad_status_bits(vg, RESIZEABLE_VG))
return_0;
- /*
- * Check if existing PVs have inconsistent block sizes.
- * If so, do not enforce new devices to be consistent.
- */
- dm_list_iterate_items(pvl, &vg->pvs) {
- logical_block_size = 0;
- physical_block_size = 0;
-
- if (!dev_get_direct_block_sizes(pvl->pv->dev, &physical_block_size, &logical_block_size))
- continue;
-
- if (!logical_block_size)
- continue;
-
- if (!prev_lbs) {
- prev_lbs = logical_block_size;
- continue;
- }
-
- if (prev_lbs != logical_block_size) {
- inconsistent_existing_lbs = 1;
- break;
- }
- }
-
dm_list_iterate_items(pvl, &pp->pvs) {
log_debug_metadata("Adding PV %s to VG %s.", pv_dev_name(pvl->pv), vg->name);
@@ -743,22 +715,6 @@ int vg_extend_each_pv(struct volume_group *vg, struct pvcreate_params *pp)
return 0;
}
- logical_block_size = 0;
- physical_block_size = 0;
-
- if (!dev_get_direct_block_sizes(pvl->pv->dev, &physical_block_size, &logical_block_size))
- log_warn("WARNING: PV %s has unknown block size.", pv_dev_name(pvl->pv));
-
- else if (prev_lbs && logical_block_size && (logical_block_size != prev_lbs)) {
- if (vg->cmd->allow_mixed_block_sizes || inconsistent_existing_lbs)
- log_debug("Devices have inconsistent block sizes (%u and %u)", prev_lbs, logical_block_size);
- else {
- log_error("Devices have inconsistent logical block sizes (%u and %u).",
- prev_lbs, logical_block_size);
- return 0;
- }
- }
-
if (!add_pv_to_vg(vg, pv_dev_name(pvl->pv), pvl->pv, 0)) {
log_error("PV %s cannot be added to VG %s.",
pv_dev_name(pvl->pv), vg->name);
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index 9c39f48..6a1ab11 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -2306,8 +2306,6 @@ static int _get_current_settings(struct cmd_context *cmd)
if (cmd->cname->flags & CAN_USE_ONE_SCAN)
cmd->can_use_one_scan = 1;
- cmd->allow_mixed_block_sizes = find_config_tree_bool(cmd, devices_allow_mixed_block_sizes_CFG, NULL);
-
cmd->partial_activation = 0;
cmd->degraded_activation = 0;
activation_mode = find_config_tree_str(cmd, activation_mode_CFG, NULL);
diff --git a/tools/toollib.c b/tools/toollib.c
index 42179d9..1b01ccc 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -5481,8 +5481,6 @@ int pvcreate_each_device(struct cmd_context *cmd,
struct device_list *devl;
const char *pv_name;
int consistent = 0;
- unsigned int physical_block_size, logical_block_size;
- unsigned int prev_pbs = 0, prev_lbs = 0;
int must_use_all = (cmd->cname->flags & MUST_USE_ALL_ARGS);
int found;
unsigned i;
@@ -5561,51 +5559,6 @@ int pvcreate_each_device(struct cmd_context *cmd,
pd->dev = dev_cache_get(pd->name, cmd->full_filter);
/*
- * Check for consistent block sizes.
- */
- if (pp->check_consistent_block_size) {
- dm_list_iterate_items(pd, &pp->arg_devices) {
- if (!pd->dev)
- continue;
-
- logical_block_size = 0;
- physical_block_size = 0;
-
- if (!dev_get_direct_block_sizes(pd->dev, &physical_block_size, &logical_block_size)) {
- log_warn("WARNING: Unknown block size for device %s.", dev_name(pd->dev));
- continue;
- }
-
- if (!logical_block_size) {
- log_warn("WARNING: Unknown logical_block_size for device %s.", dev_name(pd->dev));
- continue;
- }
-
- if (!prev_lbs) {
- prev_lbs = logical_block_size;
- prev_pbs = physical_block_size;
- continue;
- }
-
- if (prev_lbs == logical_block_size) {
- /* Require lbs to match, just warn about unmatching pbs. */
- if (!cmd->allow_mixed_block_sizes && prev_pbs && physical_block_size &&
- (prev_pbs != physical_block_size))
- log_warn("WARNING: Devices have inconsistent physical block sizes (%u and %u).",
- prev_pbs, physical_block_size);
- continue;
- }
-
- if (!cmd->allow_mixed_block_sizes) {
- log_error("Devices have inconsistent logical block sizes (%u and %u).",
- prev_lbs, logical_block_size);
- log_print("See lvm.conf allow_mixed_block_sizes.");
- return 0;
- }
- }
- }
-
- /*
* Use process_each_pv to search all existing PVs and devices.
*
* This is a slightly different way to use process_each_pv, because the
diff --git a/tools/vgcreate.c b/tools/vgcreate.c
index 7add53b..4356d99 100644
--- a/tools/vgcreate.c
+++ b/tools/vgcreate.c
@@ -48,8 +48,6 @@ int vgcreate(struct cmd_context *cmd, int argc, char **argv)
/* Don't create a new PV on top of an existing PV like pvcreate does. */
pp.preserve_existing = 1;
- pp.check_consistent_block_size = 1;
-
if (!vgcreate_params_set_defaults(cmd, &vp_def, NULL))
return EINVALID_CMD_LINE;
vp_def.vg_name = vg_name;
4 years, 6 months
v2_03_06 annotated tag has been created
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=3b481062dfdf117db5c...
Commit: 3b481062dfdf117db5cbaf000230aa79ab556b45
Parent: 0000000000000000000000000000000000000000
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: 2019-10-23 07:52 +0000
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: 2019-10-23 07:52 +0000
annotated tag: v2_03_06 has been created
at 3b481062dfdf117db5cbaf000230aa79ab556b45 (tag)
tagging b9391b1b9f0b73303fa21f8f92574d17ce4c2b02 (commit)
replaces v2_03_05
Release 2.03.06
NOTABLE CHANGES:
Prevent creating VGs with PVs with different logical block sizes.
Setting 'devices/allow_mixed_block_sizes' to 1 keeps the old behavior but may
lead to data corruption.
Improvements to cache volumes handling.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAABAgAGBQJdsAf0AAoJELkRJDHlCQOf5HMP/jvPhs1Wd08ozCQrfOPkStn+
DPXuSC6ZjcHC/EWPZkGMNR0BL5gtnDHAZGUYnRXkE73+3bnH03bB8GokK4rIdARO
UQhN4s9qF3WyFoG5lgzcY39ypktwnrVX+WUM3eFKzlxWOCw8pSFjZtrroe7AXvbE
IvIBGvGb/F4uwIWs5f4aA2TsaT/V9dWbOK2tJei3/dPgoMKyQi7oCEDs7ynxlnEg
o4Ee7ogwfz2620fFLBm9DbdqAJxdHl/Ha0JUdRuDHrD3yRrltFqdwemTkTIW1fJb
l+RxbmI9ApEK1KUmwfu53/zSuTAZ1btoi9WlnTF/KdBjST0WlZlNyTed7nb/KM/2
S+IjLviAOvecx7Kal0kf9V5Avz69bx9AYtuUd701Ax7qOFEichDhRLXodxwyi/hq
8muGAQBRxhgfRRFXYSxCDLLI3oXSYIIX/VgKDD6M0mHrXWen6gWl4BE/a/bkbqXa
S4/n5lAVaArYS8oMvwLIq2MDWfr7pPSxkMLefYgwfjYMxQTE7FlajQVsLFcgez5I
3xN+SXKxetP6NoH3MA1LHOH+4y3RiE9GclYsFyqTZOIADdaUvITnHOAVCVNhnO6U
S2LoAo2E7X+mi/zeYAt0D2kE7qnEBp1bGuNpIqEREfoAaITaFmKHvZHLG8H4/q+k
7LuPOqdpcxDBsVEA1pbG
=3AeE
-----END PGP SIGNATURE-----
Bryn M. Reeves (1):
dmsetup: do not treat no groups as an error in dmstats list --group
David Teigland (112):
config: remove filter typo
vgchange: don't fail monitor command if vg is exported
metadata: include description with command in metadata areas
scanning: open devs rw when rescanning for write
exported vg handling
tests: add exported.sh
cache: warn and prompt for writeback with cachevol
scan: remove unused arg to setup_bcache
md component detection for differing PV and device sizes
pvscan: fix PV online when device has a different size
enable full md component detection at the right time
tests: extend lvm-on-md
tests: pvscan-autoactivate test unmatching dev and PV size
pvck: fix looping dump metadata_all
metadata: extend writes to zero space
tests: metadata-zero-space
tests: lvm-on-md use variable run dir
Fix rounding writes up to sector size
tests: large-physical-sector-size
WHATS_NEW: fix large physical block size
vgcreate/vgextend: restrict PVs with mixed block sizes
tests: allow-mixed-block-sizes
WHATS_NEW: vgcreate/vgextend logical block size
config: set deprecated version for segment_libraries
config: cache_policy should be cfg_runtime
Revert "config: cache_policy should be cfg_runtime"
devices: clean up block size functions
devices: put ifdef around BLKPBSZGET
increase soft open file limit
tests: open-file-limit
md component detection addition in vg_read
lvmcache: renaming functions and variables
lvmcache: replace found_duplicates variable
lvmcache: use devl list helper
improve duplicate pv handling for md components
pvscan cache: use lvmcache_label_scan
tests: duplicate-pvs-md
bcache: increase max allowed bcache size
pvscan: disable sleeping and retrying for udev
man lvmthin: remove nonexistent topic
fix duplicate pv size check
hints: fix copy of filter
hints: check for malloc failure
fix segfault for invalid characters in vg name
vgextend: check missing device during block size check
pvscan: avoid full scan for activation
bcache: change log level for prefetch message
tests: metadata-bad-text.sh with lvmlockd
pvscan: allow use of noudevsync option
tests: cache-single tests require version 1 10
tests: allow-mixed-block-sizes skip with older losetup
tests: open-file-limit skip without prlimit
tests: skip without xxd
tests: metadata-zero-space add info for debugging
tests: use standard md devices
tests: more debug in metadata-zero-space
tests: skip some without wipefs
tests: unnecessary braces causes test failures
tests: metadata-zero-space more debugging
tests: don't change real test output
tests: drop unnecessary pid from LVMTEST prefix
Revert "lvmlockd: use commonly used define NOTIFYDBUS_SUPPORT"
Revert "tests: drop unnecessary pid from LVMTEST prefix"
lvconvert: cachevol LV can have multiple segments
cachevol: add dm uuid suffixes to hidden lvs
lvchange: allow activating cachevol
lvconvert: detaching cachevol with missing PVs
tests: add cache-single-split
writecache: use dm suffixes and lv attributes
writecache: display layout and role fields
tests: update cache-single-split
drop cvol dm uuid suffix for cachevol LVs
tests: update cache-single-split
lvconvert: allow --cache shortcut for --type cache with cachevol
tests: add writecache-split
lvconvert: separate splitcache and uncache functions
lvconvert: enable --uncache with dm-cache cachevol
tests: update cache-single-split
lvremove: remove attached cachevol with removed LV
writecache: move code into new file
writecache: allow removing LV with attached writecache
lvconvert: enable --uncache with dm-writecache cachevol
tests: writecache-split check have_writecache
tests: skip md tests if system not clean
tests: mdadm stop in test cleanup
metadata: add args to metadata import functions
metadata: import device name hint from metadata
pvscan: use quick activation only with matching PV device names
scan: add PV summary info to lvmcache
scan: use PV size for choosing duplicate PV
scan: use PV device name hint for choosing duplicate PV
tests: update duplicate md tests
pvck: handle PVs with zero metadata copies
tests: update to md dev name
tests: add wipefs wrapper
lvmlockd: set failure flag for test mode
tests: improve lib wipefs_a
vgremove: remove internal lvmlock LV
man: lvmcache note dm-cache block size issue
pvmove: remove some cmirror related code
vgck: fix updatemetadata writing different descriptions
vgck: let updatemetadata repair mismatched metadata
cache: change cachevol flags for backward compat
allow activating known LVs when other LVs have unknown segtypes
cache: change default cachevol metadata sizes
writecache: add cvol suffix to attached cachevol
tests: metadata-zero-space long vgnames
pvck: dump metadata search
man: lvmcache naming updates
cachevol: use cachepool code for metadata size
vgchange: remove bogus option restriction
improve command definition matching using type
Heinz Mauelshagen (8):
lvconvert: allow --stripes/--stripesize in 'mirror' conversions
dmeventd: avoid bail out preventing repair in raid plugin
lvchange: add --resync help/manual text relative to 'R' attribute
Revert "dmeventd: avoid bail out preventing repair in raid plugin"
dmeventd: avoid bail out preventing repair in raid plugin but keep message
test: add checks for not 100% sync ratio after initiation of check/repair
test: add RAID lvextend resynchronization test
test: increase size of raid10 LV allowing tests to succeed on fast storage
Marian Csontos (16):
post-release
config: Fix default option which makes no sense
test: Fix unbound variable
test: Remove now useless clvmd test
tests: Fix unbound variable
configure: Fix the default in help string
configure: Fix setting of CLDFLAGS default
spec: Move blkdeactivate to device-mapper
build: make generate
spec: enable writecache
spec: Fix lvm2-activation-generator man page handling
test: Minimize data written by metadata-zero-space
dm: fix compilation of dmsetup
build: make generate
cov: Fix memory leak
pre-release
Mikulas Patocka (1):
dm: introduce DM_GET_TARGET_VERSION
Peter Rajnoha (2):
udev: do not overwrite ID_MODEL in 69-dm-lvm-metad.rules
udev: remove unsupported OPTIONS+="event_timeout" rule
Vojtech Trefny (1):
Fix converting dbus.UInt types to string
Zdenek Kabelac (85):
make: support comments in exported symbols
exported_symbols: comment old symbols
libdm: implement search for device names for older kernels
cov: ensure cname exists before derefering it
cov: check for socket_path being set
make: generate
tests: replaces grep -q usage
tests: fix ra checking
tests: add settle wait before issue remove
tests: accept also value 512
tests: for cluster testing we always need exclusive mirrors
tests: simplify some var settings
pvmove: correcting read_ahead setting
pvmove: add missing synchronization
activation: add synchronization point
dmsetup: debug print
activation: extend handling of pending_delete
snapshot: always activate
cache: improve vgremove loop
lv_manip: add synchronizations
dmsetup: missed trailing newline
configure: check for prlimit
configure: continue build if prlimit is missing
activation: use cmd pending mem for pending_delete
lvconvert: improve validation thin and cache pool conversion
tests: pool conversion
devices: crypto skip
thin: activate layer pool aas read-only LV
vdo: enhance activation with layer -vpool
tests: check vdo
vdo: deactivate forgotten vdo pool
vdo: properly check percentage for resize
vdo: restore monitoring of vdo pool
cmirrord: deamon links libdm
cache: report for succesful status
resize: continue change for getting vdo status before resize
display: try to show status for inactive vdopool
vdo: raise VDO default bio threads to 4
vdo: keep minimum_io_size in sectors
vdo: correct internal API for set_vdo_write_policy
vdo: introduce get_vdo_write_policy_name
vdo: field update
vdo: remember configure VDO write policy in metadata
vdo: add lvs fields to query vdo volume properties
WHATS_NEW: update
lvconvert: fix return value when zeroing fails
tests: disable caching of VDO
lvconvert: use struct initializer
cache: reload only when switched to cleaner policy
cache: recognize cachevol with lv_cache_remove
cache: correct condition
cache: enhance removal function to work with cvol
cachevol: wipe 'normal' device
cachevol: rename converted LV to _cvol
cachevol: drop LV_CACHE_VOL on detach automatically
cachevol: use writethrough for partial removal
cachevol: put _cvol as protected suffix.
cachevol: improve manipulation with dm tree
cachevol: use lv_cache_remove
cachevol: drop no longer needed functions
tests: drop manipulation with 'internal' LV
tests: cvol
cachevol: use CVOL UUID for cdata and cmeta layered devices
cache: add more comments for min meta size
cache: drop validation check
cachevol: move flag setting after taking archive
cachevol: move cvol rename
debug: missing trace
cache: single code for removal of cached volume
cachevol: support removal of cachevol
tests: skip when raid is not present
tests: cachevol needs FORMAT2
lv_manip: add lv_uniq_rename_update
lvm-string: add drop_lvname_suffix
lvconvert: use new functions
cache: drop _cpool suffix from unused cache-pool
cache: use _cpool for used cache-pools
tests: used cache_pool adds _cpool
gcc: older compiler is happier with this initilizer
gcc: all paths will set ret
gcc: avoid warning: declaration of xxx shadows a global declaration
gcc: older version can't see udev is always set
tests: more suffixes
tests: enable with 6.2.1
cache: _cpool is protected suffix now
4 years, 6 months
master - post-release
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c8b01f33a675a4f7e35...
Commit: c8b01f33a675a4f7e35acc78d56b746a81ddec33
Parent: b9391b1b9f0b73303fa21f8f92574d17ce4c2b02
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Wed Oct 23 09:47:26 2019 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Wed Oct 23 09:51:55 2019 +0200
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 faf0a28..720a8c8 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.03.06(2) (2019-10-23)
+2.03.07(2)-git (2019-10-23)
diff --git a/VERSION_DM b/VERSION_DM
index 92988a6..3045b1d 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.165 (2019-10-23)
+1.02.167-git (2019-10-23)
diff --git a/WHATS_NEW b/WHATS_NEW
index b72f172..19b7ada 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,3 +1,6 @@
+Version 2.03.07 -
+===================================
+
Version 2.03.06 - 23rd October 2019
===================================
Add _cpool suffix to cache-pool LV name when used by caching LV.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index d164d63..6fc70ca 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,3 +1,6 @@
+Version 1.02.167 -
+====================================
+
Version 1.02.165 - 23rd October 2019
====================================
Add support for DM_DEVICE_GET_TARGET_VERSION.
4 years, 6 months