mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
lvcreate/lvconvert: optionally reenable mirrored mirror log for testing purposes only
This is a followup patch to commit edb72cb70cb8abd0acb92f07937715be2816d04a to support related lvm2 test suite tests. A 'global/support_mirrored_mirror_log' bool configuration variable gets introduced allowing the creation of, or conversion to mirrored 'mirror' logs if set. The capability to create these in turn allows the rest of the tests to perform activation of such existing LVs and their conversions to disk/core 'mirror' logs. Display a disclaimer warning if enabled that this is not for regular use. Add definition of the enabled config option to respective test scripts. Related: rhbz1643562
This commit is contained in:
parent
1f1d36f6a2
commit
e82303fd6a
@ -904,6 +904,17 @@ global {
|
|||||||
#
|
#
|
||||||
mirror_segtype_default = "@DEFAULT_MIRROR_SEGTYPE@"
|
mirror_segtype_default = "@DEFAULT_MIRROR_SEGTYPE@"
|
||||||
|
|
||||||
|
# Configuration option global/support_mirrored_mirror_log.
|
||||||
|
# Enable mirrored 'mirror' log type for testing.
|
||||||
|
#
|
||||||
|
# This type is deprecated to create or convert to but can
|
||||||
|
# be enabled to test that activation of existing mirrored
|
||||||
|
# logs and conversion to disk/core works.
|
||||||
|
#
|
||||||
|
# Not supported for regular operation!
|
||||||
|
#
|
||||||
|
support_mirrored_mirror_log = 0
|
||||||
|
|
||||||
# Configuration option global/raid10_segtype_default.
|
# Configuration option global/raid10_segtype_default.
|
||||||
# The segment type used by the -i -m combination.
|
# The segment type used by the -i -m combination.
|
||||||
# The --type raid10|mirror option overrides this setting.
|
# The --type raid10|mirror option overrides this setting.
|
||||||
|
@ -960,6 +960,17 @@ cfg(global_mirror_segtype_default_CFG, "mirror_segtype_default", global_CFG_SECT
|
|||||||
" fashion in a cluster.\n"
|
" fashion in a cluster.\n"
|
||||||
"#\n")
|
"#\n")
|
||||||
|
|
||||||
|
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,
|
||||||
|
"Configuration option global/support_mirrored_mirror_log.\n"
|
||||||
|
"Enable mirrored 'mirror' log type for testing.\n"
|
||||||
|
"#\n"
|
||||||
|
"This type is deprecated to create or convert to but can\n"
|
||||||
|
"be enabled to test that activation of existing mirrored\n"
|
||||||
|
"logs and conversion to disk/core works.\n"
|
||||||
|
"#\n"
|
||||||
|
"Not supported for regular operation!\n"
|
||||||
|
"\n")
|
||||||
|
|
||||||
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,
|
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,
|
||||||
"The segment type used by the -i -m combination.\n"
|
"The segment type used by the -i -m combination.\n"
|
||||||
"The --type raid10|mirror option overrides this setting.\n"
|
"The --type raid10|mirror option overrides this setting.\n"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2003-2004 Sistina Software, Inc. All rights reserved.
|
* Copyright (C) 2003-2004 Sistina Software, Inc. All rights reserved.
|
||||||
* Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
|
* Copyright (C) 2004-2008,2018 Red Hat, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* This file is part of LVM2.
|
* This file is part of LVM2.
|
||||||
*
|
*
|
||||||
@ -1908,8 +1908,12 @@ int add_mirror_log(struct cmd_context *cmd, struct logical_volume *lv,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (log_count > 1) {
|
if (log_count > 1) {
|
||||||
log_err("Log type \"mirrored\" is DEPRECATED. Use RAID1 LV or disk log instead.");
|
if (find_config_tree_bool(cmd, global_support_mirrored_mirror_log_CFG, NULL))
|
||||||
return 0;
|
log_warn("Log type \"mirrored\" creation/conversion is not supported for regular operation!");
|
||||||
|
else {
|
||||||
|
log_err("Log type \"mirrored\" is DEPRECATED. Use RAID1 LV or disk log instead.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(parallel_areas = build_parallel_areas_from_lv(lv, 0, 0)))
|
if (!(parallel_areas = build_parallel_areas_from_lv(lv, 0, 0)))
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
. lib/inittest
|
. lib/inittest
|
||||||
|
|
||||||
|
aux lvmconf "global/support_mirrored_mirror_log=1"
|
||||||
|
|
||||||
aux prepare_pvs 5
|
aux prepare_pvs 5
|
||||||
get_devs
|
get_devs
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (C) 2008 Red Hat, Inc. All rights reserved.
|
# Copyright (C) 2008,2018 Red Hat, Inc. All rights reserved.
|
||||||
#
|
#
|
||||||
# This copyrighted material is made available to anyone wishing to use,
|
# This copyrighted material is made available to anyone wishing to use,
|
||||||
# modify, copy, or redistribute it subject to the terms and conditions
|
# modify, copy, or redistribute it subject to the terms and conditions
|
||||||
@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
. lib/inittest
|
. lib/inittest
|
||||||
|
|
||||||
|
aux lvmconf "global/support_mirrored_mirror_log=1"
|
||||||
|
|
||||||
aux prepare_vg 6
|
aux prepare_vg 6
|
||||||
aux lvmconf 'allocation/maximise_cling = 0' \
|
aux lvmconf 'allocation/maximise_cling = 0' \
|
||||||
'allocation/mirror_logs_require_separate_pvs = 1'
|
'allocation/mirror_logs_require_separate_pvs = 1'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (C) 2008-2013 Red Hat, Inc. All rights reserved.
|
# Copyright (C) 2008-2013,2018 Red Hat, Inc. All rights reserved.
|
||||||
#
|
#
|
||||||
# This copyrighted material is made available to anyone wishing to use,
|
# This copyrighted material is made available to anyone wishing to use,
|
||||||
# modify, copy, or redistribute it subject to the terms and conditions
|
# modify, copy, or redistribute it subject to the terms and conditions
|
||||||
@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
. lib/inittest
|
. lib/inittest
|
||||||
|
|
||||||
|
aux lvmconf "global/support_mirrored_mirror_log=1"
|
||||||
|
|
||||||
recreate_vg_()
|
recreate_vg_()
|
||||||
{
|
{
|
||||||
vgremove -ff $vg
|
vgremove -ff $vg
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (C) 2010 Red Hat, Inc. All rights reserved.
|
# Copyright (C) 2010,2018 Red Hat, Inc. All rights reserved.
|
||||||
#
|
#
|
||||||
# This copyrighted material is made available to anyone wishing to use,
|
# This copyrighted material is made available to anyone wishing to use,
|
||||||
# modify, copy, or redistribute it subject to the terms and conditions
|
# modify, copy, or redistribute it subject to the terms and conditions
|
||||||
@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
. lib/inittest
|
. lib/inittest
|
||||||
|
|
||||||
|
aux lvmconf "global/support_mirrored_mirror_log=1"
|
||||||
|
|
||||||
aux prepare_vg 4
|
aux prepare_vg 4
|
||||||
|
|
||||||
lvcreate -aey --type mirror -m 1 --mirrorlog disk --ignoremonitoring -L 1 -n mirror $vg
|
lvcreate -aey --type mirror -m 1 --mirrorlog disk --ignoremonitoring -L 1 -n mirror $vg
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (C) 2008 Red Hat, Inc. All rights reserved.
|
# Copyright (C) 2008,2018 Red Hat, Inc. All rights reserved.
|
||||||
#
|
#
|
||||||
# This copyrighted material is made available to anyone wishing to use,
|
# This copyrighted material is made available to anyone wishing to use,
|
||||||
# modify, copy, or redistribute it subject to the terms and conditions
|
# modify, copy, or redistribute it subject to the terms and conditions
|
||||||
@ -17,6 +17,8 @@ SKIP_WITH_LVMPOLLD=1
|
|||||||
|
|
||||||
. lib/inittest
|
. lib/inittest
|
||||||
|
|
||||||
|
aux lvmconf "global/support_mirrored_mirror_log=1"
|
||||||
|
|
||||||
cleanup_lvs() {
|
cleanup_lvs() {
|
||||||
lvremove -ff $vg
|
lvremove -ff $vg
|
||||||
(dm_table | not grep $vg) || \
|
(dm_table | not grep $vg) || \
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (C) 2010 Red Hat, Inc. All rights reserved.
|
# Copyright (C) 2010,2018 Red Hat, Inc. All rights reserved.
|
||||||
#
|
#
|
||||||
# This copyrighted material is made available to anyone wishing to use,
|
# This copyrighted material is made available to anyone wishing to use,
|
||||||
# modify, copy, or redistribute it subject to the terms and conditions
|
# modify, copy, or redistribute it subject to the terms and conditions
|
||||||
@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
. lib/inittest
|
. lib/inittest
|
||||||
|
|
||||||
|
aux lvmconf "global/support_mirrored_mirror_log=1"
|
||||||
|
|
||||||
aux prepare_vg 4
|
aux prepare_vg 4
|
||||||
|
|
||||||
lvcreate -aey --type mirror -m 1 -L 10M --nosync -n lv $vg
|
lvcreate -aey --type mirror -m 1 -L 10M --nosync -n lv $vg
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (C) 2007 Red Hat, Inc. All rights reserved.
|
# Copyright (C) 2007,2018 Red Hat, Inc. All rights reserved.
|
||||||
#
|
#
|
||||||
# This copyrighted material is made available to anyone wishing to use,
|
# This copyrighted material is made available to anyone wishing to use,
|
||||||
# modify, copy, or redistribute it subject to the terms and conditions
|
# modify, copy, or redistribute it subject to the terms and conditions
|
||||||
@ -17,6 +17,8 @@ SKIP_WITH_LVMPOLLD=1
|
|||||||
|
|
||||||
. lib/inittest
|
. lib/inittest
|
||||||
|
|
||||||
|
aux lvmconf "global/support_mirrored_mirror_log=1"
|
||||||
|
|
||||||
COMM() {
|
COMM() {
|
||||||
LAST_TEST="$*"
|
LAST_TEST="$*"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user