|
|
146ac4 |
conf/example.conf.in | 11 +++++++++++
|
|
|
146ac4 |
lib/config/config_settings.h | 11 +++++++++++
|
|
|
146ac4 |
lib/metadata/mirror.c | 10 +++++++---
|
|
|
146ac4 |
test/shell/lvconvert-mirror.sh | 2 ++
|
|
|
146ac4 |
test/shell/lvconvert-repair-replace.sh | 4 +++-
|
|
|
146ac4 |
test/shell/lvconvert-repair.sh | 4 +++-
|
|
|
146ac4 |
test/shell/lvconvert-twostep.sh | 4 +++-
|
|
|
146ac4 |
test/shell/lvcreate-operation.sh | 4 +++-
|
|
|
146ac4 |
test/shell/snapshots-of-mirrors.sh | 4 +++-
|
|
|
146ac4 |
test/shell/vgsplit-operation.sh | 4 +++-
|
|
|
146ac4 |
10 files changed, 49 insertions(+), 9 deletions(-)
|
|
|
146ac4 |
|
|
|
146ac4 |
diff --git a/conf/example.conf.in b/conf/example.conf.in
|
|
|
146ac4 |
index 7e29aaa..0c2d378 100644
|
|
|
146ac4 |
--- a/conf/example.conf.in
|
|
|
146ac4 |
+++ b/conf/example.conf.in
|
|
|
146ac4 |
@@ -897,6 +897,17 @@ global {
|
|
|
146ac4 |
#
|
|
|
146ac4 |
mirror_segtype_default = "@DEFAULT_MIRROR_SEGTYPE@"
|
|
|
146ac4 |
|
|
|
146ac4 |
+ # Configuration option global/support_mirrored_mirror_log.
|
|
|
146ac4 |
+ # Enable mirrored 'mirror' log type for testing.
|
|
|
146ac4 |
+ #
|
|
|
146ac4 |
+ # This type is deprecated to create or convert to but can
|
|
|
146ac4 |
+ # be enabled to test that activation of existing mirrored
|
|
|
146ac4 |
+ # logs and conversion to disk/core works.
|
|
|
146ac4 |
+ #
|
|
|
146ac4 |
+ # Not supported for regular operation!
|
|
|
146ac4 |
+ #
|
|
|
146ac4 |
+ support_mirrored_mirror_log = 0
|
|
|
146ac4 |
+
|
|
|
146ac4 |
# Configuration option global/raid10_segtype_default.
|
|
|
146ac4 |
# The segment type used by the -i -m combination.
|
|
|
146ac4 |
# The --type raid10|mirror option overrides this setting.
|
|
|
146ac4 |
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
|
|
|
146ac4 |
index b725343..92ceb04 100644
|
|
|
146ac4 |
--- a/lib/config/config_settings.h
|
|
|
146ac4 |
+++ b/lib/config/config_settings.h
|
|
|
146ac4 |
@@ -961,6 +961,17 @@ cfg(global_mirror_segtype_default_CFG, "mirror_segtype_default", global_CFG_SECT
|
|
|
146ac4 |
" fashion in a cluster.\n"
|
|
|
146ac4 |
"#\n")
|
|
|
146ac4 |
|
|
|
146ac4 |
+cfg(global_support_mirrored_mirror_log_CFG, "support_mirrored_mirror_log", global_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(2, 3, 2), NULL, 0, NULL,
|
|
|
146ac4 |
+ "Configuration option global/support_mirrored_mirror_log.\n"
|
|
|
146ac4 |
+ "Enable mirrored 'mirror' log type for testing.\n"
|
|
|
146ac4 |
+ "#\n"
|
|
|
146ac4 |
+ "This type is deprecated to create or convert to but can\n"
|
|
|
146ac4 |
+ "be enabled to test that activation of existing mirrored\n"
|
|
|
146ac4 |
+ "logs and conversion to disk/core works.\n"
|
|
|
146ac4 |
+ "#\n"
|
|
|
146ac4 |
+ "Not supported for regular operation!\n"
|
|
|
146ac4 |
+ "\n")
|
|
|
146ac4 |
+
|
|
|
146ac4 |
cfg(global_raid10_segtype_default_CFG, "raid10_segtype_default", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_RAID10_SEGTYPE, vsn(2, 2, 99), "@DEFAULT_RAID10_SEGTYPE@", 0, NULL,
|
|
|
146ac4 |
"The segment type used by the -i -m combination.\n"
|
|
|
146ac4 |
"The --type raid10|mirror option overrides this setting.\n"
|
|
|
146ac4 |
diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c
|
|
|
146ac4 |
index 8b20979..6950546 100644
|
|
|
146ac4 |
--- a/lib/metadata/mirror.c
|
|
|
146ac4 |
+++ b/lib/metadata/mirror.c
|
|
|
146ac4 |
@@ -1,6 +1,6 @@
|
|
|
146ac4 |
/*
|
|
|
146ac4 |
* Copyright (C) 2003-2004 Sistina Software, Inc. All rights reserved.
|
|
|
146ac4 |
- * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
|
|
|
146ac4 |
+ * Copyright (C) 2004-2008,2018 Red Hat, Inc. All rights reserved.
|
|
|
146ac4 |
*
|
|
|
146ac4 |
* This file is part of LVM2.
|
|
|
146ac4 |
*
|
|
|
146ac4 |
@@ -1908,8 +1908,12 @@ int add_mirror_log(struct cmd_context *cmd, struct logical_volume *lv,
|
|
|
146ac4 |
}
|
|
|
146ac4 |
|
|
|
146ac4 |
if (log_count > 1) {
|
|
|
146ac4 |
- log_err("Log type \"mirrored\" is DEPRECATED. Use RAID1 LV or disk log instead.");
|
|
|
146ac4 |
- return 0;
|
|
|
146ac4 |
+ if (find_config_tree_bool(cmd, global_support_mirrored_mirror_log_CFG, NULL))
|
|
|
146ac4 |
+ log_warn("Log type \"mirrored\" creation/conversion is not supported for regular operation!");
|
|
|
146ac4 |
+ else {
|
|
|
146ac4 |
+ log_err("Log type \"mirrored\" is DEPRECATED. Use RAID1 LV or disk log instead.");
|
|
|
146ac4 |
+ return 0;
|
|
|
146ac4 |
+ }
|
|
|
146ac4 |
}
|
|
|
146ac4 |
|
|
|
146ac4 |
if (!(parallel_areas = build_parallel_areas_from_lv(lv, 0, 0)))
|
|
|
146ac4 |
diff --git a/test/shell/lvconvert-mirror.sh b/test/shell/lvconvert-mirror.sh
|
|
|
146ac4 |
index 39ba1c5..a422557 100644
|
|
|
146ac4 |
--- a/test/shell/lvconvert-mirror.sh
|
|
|
146ac4 |
+++ b/test/shell/lvconvert-mirror.sh
|
|
|
146ac4 |
@@ -14,6 +14,8 @@
|
|
|
146ac4 |
|
|
|
146ac4 |
. lib/inittest
|
|
|
146ac4 |
|
|
|
146ac4 |
+aux lvmconf "global/support_mirrored_mirror_log=1"
|
|
|
146ac4 |
+
|
|
|
146ac4 |
aux prepare_pvs 5
|
|
|
146ac4 |
get_devs
|
|
|
146ac4 |
|
|
|
146ac4 |
diff --git a/test/shell/lvconvert-repair-replace.sh b/test/shell/lvconvert-repair-replace.sh
|
|
|
146ac4 |
index 3d1cd66..cd17e0b 100644
|
|
|
146ac4 |
--- a/test/shell/lvconvert-repair-replace.sh
|
|
|
146ac4 |
+++ b/test/shell/lvconvert-repair-replace.sh
|
|
|
146ac4 |
@@ -1,6 +1,6 @@
|
|
|
146ac4 |
#!/usr/bin/env bash
|
|
|
146ac4 |
|
|
|
146ac4 |
-# Copyright (C) 2008 Red Hat, Inc. All rights reserved.
|
|
|
146ac4 |
+# Copyright (C) 2008,2018 Red Hat, Inc. All rights reserved.
|
|
|
146ac4 |
#
|
|
|
146ac4 |
# This copyrighted material is made available to anyone wishing to use,
|
|
|
146ac4 |
# modify, copy, or redistribute it subject to the terms and conditions
|
|
|
146ac4 |
@@ -14,6 +14,8 @@
|
|
|
146ac4 |
|
|
|
146ac4 |
. lib/inittest
|
|
|
146ac4 |
|
|
|
146ac4 |
+aux lvmconf "global/support_mirrored_mirror_log=1"
|
|
|
146ac4 |
+
|
|
|
146ac4 |
aux prepare_vg 6
|
|
|
146ac4 |
aux lvmconf 'allocation/maximise_cling = 0' \
|
|
|
146ac4 |
'allocation/mirror_logs_require_separate_pvs = 1'
|
|
|
146ac4 |
diff --git a/test/shell/lvconvert-repair.sh b/test/shell/lvconvert-repair.sh
|
|
|
146ac4 |
index 713c00f..06470c4 100644
|
|
|
146ac4 |
--- a/test/shell/lvconvert-repair.sh
|
|
|
146ac4 |
+++ b/test/shell/lvconvert-repair.sh
|
|
|
146ac4 |
@@ -1,6 +1,6 @@
|
|
|
146ac4 |
#!/usr/bin/env bash
|
|
|
146ac4 |
|
|
|
146ac4 |
-# Copyright (C) 2008-2013 Red Hat, Inc. All rights reserved.
|
|
|
146ac4 |
+# Copyright (C) 2008-2013,2018 Red Hat, Inc. All rights reserved.
|
|
|
146ac4 |
#
|
|
|
146ac4 |
# This copyrighted material is made available to anyone wishing to use,
|
|
|
146ac4 |
# modify, copy, or redistribute it subject to the terms and conditions
|
|
|
146ac4 |
@@ -12,6 +12,8 @@
|
|
|
146ac4 |
|
|
|
146ac4 |
. lib/inittest
|
|
|
146ac4 |
|
|
|
146ac4 |
+aux lvmconf "global/support_mirrored_mirror_log=1"
|
|
|
146ac4 |
+
|
|
|
146ac4 |
recreate_vg_()
|
|
|
146ac4 |
{
|
|
|
146ac4 |
vgremove -ff $vg
|
|
|
146ac4 |
diff --git a/test/shell/lvconvert-twostep.sh b/test/shell/lvconvert-twostep.sh
|
|
|
146ac4 |
index 4bd499e..7487d51 100644
|
|
|
146ac4 |
--- a/test/shell/lvconvert-twostep.sh
|
|
|
146ac4 |
+++ b/test/shell/lvconvert-twostep.sh
|
|
|
146ac4 |
@@ -1,6 +1,6 @@
|
|
|
146ac4 |
#!/usr/bin/env bash
|
|
|
146ac4 |
|
|
|
146ac4 |
-# Copyright (C) 2010 Red Hat, Inc. All rights reserved.
|
|
|
146ac4 |
+# Copyright (C) 2010,2018 Red Hat, Inc. All rights reserved.
|
|
|
146ac4 |
#
|
|
|
146ac4 |
# This copyrighted material is made available to anyone wishing to use,
|
|
|
146ac4 |
# modify, copy, or redistribute it subject to the terms and conditions
|
|
|
146ac4 |
@@ -14,6 +14,8 @@
|
|
|
146ac4 |
|
|
|
146ac4 |
. lib/inittest
|
|
|
146ac4 |
|
|
|
146ac4 |
+aux lvmconf "global/support_mirrored_mirror_log=1"
|
|
|
146ac4 |
+
|
|
|
146ac4 |
aux prepare_vg 4
|
|
|
146ac4 |
|
|
|
146ac4 |
lvcreate -aey --type mirror -m 1 --mirrorlog disk --ignoremonitoring -L 1 -n mirror $vg
|
|
|
146ac4 |
diff --git a/test/shell/lvcreate-operation.sh b/test/shell/lvcreate-operation.sh
|
|
|
146ac4 |
index 3d4cf43..807f176 100644
|
|
|
146ac4 |
--- a/test/shell/lvcreate-operation.sh
|
|
|
146ac4 |
+++ b/test/shell/lvcreate-operation.sh
|
|
|
146ac4 |
@@ -1,6 +1,6 @@
|
|
|
146ac4 |
#!/usr/bin/env bash
|
|
|
146ac4 |
|
|
|
146ac4 |
-# Copyright (C) 2008 Red Hat, Inc. All rights reserved.
|
|
|
146ac4 |
+# Copyright (C) 2008,2018 Red Hat, Inc. All rights reserved.
|
|
|
146ac4 |
#
|
|
|
146ac4 |
# This copyrighted material is made available to anyone wishing to use,
|
|
|
146ac4 |
# modify, copy, or redistribute it subject to the terms and conditions
|
|
|
146ac4 |
@@ -17,6 +17,8 @@ SKIP_WITH_LVMPOLLD=1
|
|
|
146ac4 |
|
|
|
146ac4 |
. lib/inittest
|
|
|
146ac4 |
|
|
|
146ac4 |
+aux lvmconf "global/support_mirrored_mirror_log=1"
|
|
|
146ac4 |
+
|
|
|
146ac4 |
cleanup_lvs() {
|
|
|
146ac4 |
lvremove -ff $vg
|
|
|
146ac4 |
(dm_table | not grep $vg) || \
|
|
|
146ac4 |
diff --git a/test/shell/snapshots-of-mirrors.sh b/test/shell/snapshots-of-mirrors.sh
|
|
|
146ac4 |
index 5ab45dd..1f2c393 100644
|
|
|
146ac4 |
--- a/test/shell/snapshots-of-mirrors.sh
|
|
|
146ac4 |
+++ b/test/shell/snapshots-of-mirrors.sh
|
|
|
146ac4 |
@@ -1,6 +1,6 @@
|
|
|
146ac4 |
#!/usr/bin/env bash
|
|
|
146ac4 |
|
|
|
146ac4 |
-# Copyright (C) 2010 Red Hat, Inc. All rights reserved.
|
|
|
146ac4 |
+# Copyright (C) 2010,2018 Red Hat, Inc. All rights reserved.
|
|
|
146ac4 |
#
|
|
|
146ac4 |
# This copyrighted material is made available to anyone wishing to use,
|
|
|
146ac4 |
# modify, copy, or redistribute it subject to the terms and conditions
|
|
|
146ac4 |
@@ -14,6 +14,8 @@
|
|
|
146ac4 |
|
|
|
146ac4 |
. lib/inittest
|
|
|
146ac4 |
|
|
|
146ac4 |
+aux lvmconf "global/support_mirrored_mirror_log=1"
|
|
|
146ac4 |
+
|
|
|
146ac4 |
aux prepare_vg 4
|
|
|
146ac4 |
|
|
|
146ac4 |
lvcreate -aey --type mirror -m 1 -L 10M --nosync -n lv $vg
|
|
|
146ac4 |
diff --git a/test/shell/vgsplit-operation.sh b/test/shell/vgsplit-operation.sh
|
|
|
146ac4 |
index 5927dfa..36b75f5 100644
|
|
|
146ac4 |
--- a/test/shell/vgsplit-operation.sh
|
|
|
146ac4 |
+++ b/test/shell/vgsplit-operation.sh
|
|
|
146ac4 |
@@ -1,6 +1,6 @@
|
|
|
146ac4 |
#!/usr/bin/env bash
|
|
|
146ac4 |
|
|
|
146ac4 |
-# Copyright (C) 2007 Red Hat, Inc. All rights reserved.
|
|
|
146ac4 |
+# Copyright (C) 2007,2018 Red Hat, Inc. All rights reserved.
|
|
|
146ac4 |
#
|
|
|
146ac4 |
# This copyrighted material is made available to anyone wishing to use,
|
|
|
146ac4 |
# modify, copy, or redistribute it subject to the terms and conditions
|
|
|
146ac4 |
@@ -17,6 +17,8 @@ SKIP_WITH_LVMPOLLD=1
|
|
|
146ac4 |
|
|
|
146ac4 |
. lib/inittest
|
|
|
146ac4 |
|
|
|
146ac4 |
+aux lvmconf "global/support_mirrored_mirror_log=1"
|
|
|
146ac4 |
+
|
|
|
146ac4 |
COMM() {
|
|
|
146ac4 |
LAST_TEST="$*"
|
|
|
146ac4 |
}
|