master - lvmdbusd: Handle exported VG(s)
by Tony Asleson
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=5bdcafff47ee6a2e57e...
Commit: 5bdcafff47ee6a2e57e0c57d18cbc36cf1a2973e
Parent: ab1f1a306bf8e146c1221786a1c1c24f8b71a377
Author: Tony Asleson <tasleson(a)redhat.com>
AuthorDate: Tue Dec 18 09:51:50 2018 -0600
Committer: Tony Asleson <tasleson(a)redhat.com>
CommitterDate: Thu Dec 20 10:27:30 2018 -0600
lvmdbusd: Handle exported VG(s)
When a VG is exported, the 'fullreport' returns an exit code of 5, but
otherwise returns the data we are wanting.
Signed-off-by: Tony Asleson <tasleson(a)redhat.com>
---
daemons/lvmdbusd/cmdhandler.py | 3 ++-
daemons/lvmdbusd/lvm_shell_proxy.py.in | 5 ++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/daemons/lvmdbusd/cmdhandler.py b/daemons/lvmdbusd/cmdhandler.py
index a9177c5..fde7f5e 100644
--- a/daemons/lvmdbusd/cmdhandler.py
+++ b/daemons/lvmdbusd/cmdhandler.py
@@ -497,7 +497,8 @@ def lvm_full_report_json():
])
rc, out, err = call(cmd)
- if rc == 0:
+ # When we have an exported vg the exit code of lvs or fullreport will be 5
+ if rc == 0 or rc == 5:
# With the current implementation, if we are using the shell then we
# are using JSON and JSON is returned back to us as it was parsed to
# figure out if we completed OK or not
diff --git a/daemons/lvmdbusd/lvm_shell_proxy.py.in b/daemons/lvmdbusd/lvm_shell_proxy.py.in
index 203de6f..b76b336 100644
--- a/daemons/lvmdbusd/lvm_shell_proxy.py.in
+++ b/daemons/lvmdbusd/lvm_shell_proxy.py.in
@@ -220,7 +220,10 @@ class LVMShellProxy(object):
# Parse the report to see what happened
if 'log' in report_json:
- if report_json['log'][-1:][0]['log_ret_code'] == '1':
+ ret_code = int(report_json['log'][-1:][0]['log_ret_code'])
+ # If we have an exported vg we get a log_ret_code == 5 when
+ # we do a 'fullreport'
+ if (ret_code == 1) or (ret_code == 5 and argv[0] == 'fullreport'):
rc = 0
else:
error_msg = self.get_error_msg()
4 years, 11 months
master - lib: move towards v2 version of VDO format
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=3320ab8334794684b4d...
Commit: 3320ab8334794684b4d324bb78d0b293a27287a6
Parent: 9785e40b8d52fd87d7c451ed838f450aee41ba8d
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Dec 20 13:17:30 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Dec 20 13:26:55 2018 +0100
lib: move towards v2 version of VDO format
Drop very old original format of VDO target and focus on V2 version.
So some variables were renamed or replaced.
There is no compatibility preserved (with assumption so far this is
experimental feature and there is no real user).
Note - version currently VDO calls this version 6.2.
---
WHATS_NEW | 1 +
device_mapper/all.h | 1 +
device_mapper/libdm-deptree.c | 16 +++++++----
device_mapper/vdo/target.h | 15 +++++------
device_mapper/vdo/vdo_limits.h | 7 +++-
device_mapper/vdo/vdo_target.c | 20 ++++++++++----
lib/config/config_settings.h | 54 +++++++++++++++++++++++-----------------
lib/config/defaults.h | 8 +++---
lib/metadata/vdo_manip.c | 16 ++++++------
lib/vdo/vdo.c | 44 ++++++++++++++++----------------
10 files changed, 103 insertions(+), 79 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 0b7f834..38525e3 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.03.02 -
===================================
+ Move VDO support towards V2 target (6.2) support.
Fix missing proper initialization of pv_list struct when adding pv.
Fix (de)activation of RaidLVs with visible SubLVs
Prohibit mirrored 'mirror' log via lvcreate and lvconvert
diff --git a/device_mapper/all.h b/device_mapper/all.h
index 8c17c09..9539442 100644
--- a/device_mapper/all.h
+++ b/device_mapper/all.h
@@ -976,6 +976,7 @@ int dm_tree_node_add_writecache_target(struct dm_tree_node *node,
int dm_tree_node_add_vdo_target(struct dm_tree_node *node,
uint64_t size,
const char *data_uuid,
+ uint64_t data_size,
const struct dm_vdo_target_params *param);
/*
diff --git a/device_mapper/libdm-deptree.c b/device_mapper/libdm-deptree.c
index 7a7239e..91ccdd4 100644
--- a/device_mapper/libdm-deptree.c
+++ b/device_mapper/libdm-deptree.c
@@ -214,6 +214,7 @@ struct load_segment {
struct dm_tree_node *vdo_data; /* VDO */
struct dm_vdo_target_params vdo_params; /* VDO */
const char *vdo_name; /* VDO - device name is ALSO passed as table arg */
+ uint64_t vdo_data_size; /* VDO - size of data storage device */
struct dm_tree_node *writecache_node; /* writecache */
int writecache_pmem; /* writecache, 1 if pmem, 0 if ssd */
@@ -2745,17 +2746,18 @@ static int _vdo_emit_segment_line(struct dm_task *dmt,
return 0;
}
- EMIT_PARAMS(pos, "%s %u %s " FMTu64 " " FMTu64 " %u on %s %s "
- "ack=%u,bio=%u,bioRotationInterval=%u,cpu=%u,hash=%u,logical=%u,physical=%u",
+ EMIT_PARAMS(pos, "V2 %s " FMTu64 " %u " FMTu64 " %u %s %s %s "
+ "maxDiscard %u ack %u bio %u bioRotationInterval %u cpu %u hash %u logical %u physical %u",
data_dev,
- (seg->vdo_params.emulate_512_sectors == 0) ? 4096 : 512,
- seg->vdo_params.use_read_cache ? "enabled" : "disabled",
- seg->vdo_params.read_cache_size_mb * UINT64_C(256), // 1MiB -> 4KiB units
+ seg->vdo_data_size / 8, // this parameter is in 4K units
+ seg->vdo_params.minimum_io_size,
seg->vdo_params.block_map_cache_size_mb * UINT64_C(256), // 1MiB -> 4KiB units
- seg->vdo_params.block_map_period,
+ seg->vdo_params.block_map_era_length,
+ seg->vdo_params.use_metadata_hints ? "on" : "off" ,
(seg->vdo_params.write_policy == DM_VDO_WRITE_POLICY_SYNC) ? "sync" :
(seg->vdo_params.write_policy == DM_VDO_WRITE_POLICY_ASYNC) ? "async" : "auto", // policy
seg->vdo_name,
+ seg->vdo_params.max_discard,
seg->vdo_params.ack_threads,
seg->vdo_params.bio_threads,
seg->vdo_params.bio_rotation,
@@ -4185,6 +4187,7 @@ int dm_tree_node_add_cache_target_base(struct dm_tree_node *node,
int dm_tree_node_add_vdo_target(struct dm_tree_node *node,
uint64_t size,
const char *data_uuid,
+ uint64_t data_size,
const struct dm_vdo_target_params *vtp)
{
struct load_segment *seg;
@@ -4205,6 +4208,7 @@ int dm_tree_node_add_vdo_target(struct dm_tree_node *node,
seg->vdo_params = *vtp;
seg->vdo_name = node->name;
+ seg->vdo_data_size = data_size;
node->props.send_messages = 2;
diff --git a/device_mapper/vdo/target.h b/device_mapper/vdo/target.h
index c597491..f83cffd 100644
--- a/device_mapper/vdo/target.h
+++ b/device_mapper/vdo/target.h
@@ -74,16 +74,16 @@ enum dm_vdo_write_policy {
// FIXME: review whether we should use the createParams from the userlib
struct dm_vdo_target_params {
+ uint32_t minimum_io_size;
uint32_t block_map_cache_size_mb;
- uint32_t block_map_period;
+ uint32_t block_map_era_length; // format period
uint32_t check_point_frequency;
- uint32_t index_memory_size_mb;
+ uint32_t index_memory_size_mb; // format
- uint32_t read_cache_size_mb;
-
- uint32_t slab_size_mb;
+ uint32_t slab_size_mb; // format
+ uint32_t max_discard;
// threads
uint32_t ack_threads;
uint32_t bio_threads;
@@ -95,9 +95,8 @@ struct dm_vdo_target_params {
bool use_compression;
bool use_deduplication;
- bool emulate_512_sectors;
- bool use_sparse_index;
- bool use_read_cache;
+ bool use_metadata_hints;
+ bool use_sparse_index; // format
// write policy
enum dm_vdo_write_policy write_policy;
diff --git a/device_mapper/vdo/vdo_limits.h b/device_mapper/vdo/vdo_limits.h
index 40cf204..e145100 100644
--- a/device_mapper/vdo/vdo_limits.h
+++ b/device_mapper/vdo/vdo_limits.h
@@ -21,8 +21,8 @@
#define DM_VDO_BLOCK_MAP_CACHE_SIZE_MAXIMUM_MB (16 * 1024 * 1024 - 1) // 16TiB - 1
#define DM_VDO_BLOCK_MAP_CACHE_SIZE_MINIMUM_PER_LOGICAL_THREAD (4096 * DM_VDO_BLOCK_SIZE_KB)
-#define DM_VDO_BLOCK_MAP_PERIOD_MINIMUM 1
-#define DM_VDO_BLOCK_MAP_PERIOD_MAXIMUM (16380)
+#define DM_VDO_BLOCK_MAP_ERA_LENGTH_MINIMUM (1)
+#define DM_VDO_BLOCK_MAP_ERA_LENGTH_MAXIMUM (16380)
#define DM_VDO_INDEX_MEMORY_SIZE_MINIMUM_MB (256) // 0.25 GiB
#define DM_VDO_INDEX_MEMORY_SIZE_MAXIMUM_MB (1024 * 1024 * 1024) // 1TiB
@@ -57,4 +57,7 @@
//#define DM_VDO_PHYSICAL_THREADS_MINIMUM (0)
#define DM_VDO_PHYSICAL_THREADS_MAXIMUM (16)
+#define DM_VDO_MAX_DISCARD_MINIMUM (1)
+#define DM_VDO_MAX_DISCARD_MAXIMUM (UINT32_MAX / 4096)
+
#endif // DEVICE_MAPPER_VDO_LIMITS_H
diff --git a/device_mapper/vdo/vdo_target.c b/device_mapper/vdo/vdo_target.c
index c488023..976d71a 100644
--- a/device_mapper/vdo/vdo_target.c
+++ b/device_mapper/vdo/vdo_target.c
@@ -23,6 +23,13 @@ bool dm_vdo_validate_target_params(const struct dm_vdo_target_params *vtp,
{
bool valid = true;
+ if ((vtp->minimum_io_size != 512) &&
+ (vtp->minimum_io_size != 4096)) {
+ log_error("VDO minimum io size %u is unsupported.",
+ vtp->minimum_io_size);
+ valid = false;
+ }
+
if ((vtp->block_map_cache_size_mb < DM_VDO_BLOCK_MAP_CACHE_SIZE_MINIMUM_MB) ||
(vtp->block_map_cache_size_mb > DM_VDO_BLOCK_MAP_CACHE_SIZE_MAXIMUM_MB)) {
log_error("VDO block map cache size %u out of range.",
@@ -37,12 +44,6 @@ bool dm_vdo_validate_target_params(const struct dm_vdo_target_params *vtp,
valid = false;
}
- if (vtp->read_cache_size_mb > DM_VDO_READ_CACHE_SIZE_MAXIMUM_MB) {
- log_error("VDO read cache size %u out of range.",
- vtp->read_cache_size_mb);
- valid = false;
- }
-
if ((vtp->slab_size_mb < DM_VDO_SLAB_SIZE_MINIMUM_MB) ||
(vtp->slab_size_mb > DM_VDO_SLAB_SIZE_MAXIMUM_MB)) {
log_error("VDO slab size %u out of range.",
@@ -50,6 +51,13 @@ bool dm_vdo_validate_target_params(const struct dm_vdo_target_params *vtp,
valid = false;
}
+ if ((vtp->max_discard < DM_VDO_MAX_DISCARD_MINIMUM) ||
+ (vtp->max_discard > DM_VDO_MAX_DISCARD_MAXIMUM)) {
+ log_error("VDO max discard %u out of range.",
+ vtp->max_discard);
+ valid = false;
+ }
+
if (vtp->ack_threads > DM_VDO_ACK_THREADS_MAXIMUM) {
log_error("VDO ack threads %u out of range.", vtp->ack_threads);
valid = false;
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index b0fcf8a..21ea3b6 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -625,10 +625,17 @@ cfg(allocation_vdo_use_compression_CFG, "vdo_use_compression", allocation_CFG_SE
cfg(allocation_vdo_use_deduplication_CFG, "vdo_use_deduplication", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_USE_DEDUPLICATION, VDO_1ST_VSN, NULL, 0, NULL,
"Enables or disables deduplication when creating a VDO volume.\n"
"Deduplication may be disabled in instances where data is not expected\n"
- "to have good deduplication rates but compression is still desired.")
+ "to have good deduplication rates but compression is still desired.\n")
-cfg(allocation_vdo_emulate_512_sectors_CFG, "vdo_emulate_512_sectors", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_EMULATE_512_SECTORS, VDO_1ST_VSN, NULL, 0, NULL,
- "Specifies that the VDO volume is to emulate a 512 byte block device.\n")
+cfg(allocation_vdo_use_metadata_hints_CFG, "vdo_use_metadata_hints", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_USE_METADATA_HINTS, VDO_1ST_VSN, NULL, 0, NULL,
+ "Enables or disables whether VDO volume should tag its latency-critical\n"
+ "writes with the REQ_SYNC flag. Some device mapper targets such as dm-raid5\n"
+ "process writes with this flag at a higher priority.\n"
+ "Default is enabled.\n")
+
+cfg(allocation_vdo_minimum_io_size_CFG, "vdo_minimum_io_size", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_MINIMUM_IO_SIZE, VDO_1ST_VSN, NULL, 0, NULL,
+ "The minimum IO size for VDO volume to accept, in bytes.\n"
+ "Valid values are 512 or 4096. The recommended and default value is 4096.\n")
cfg(allocation_vdo_block_map_cache_size_mb_CFG, "vdo_block_map_cache_size_mb", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_BLOCK_MAP_CACHE_SIZE_MB, VDO_1ST_VSN, NULL, 0, NULL,
"Specifies the amount of memory in MiB allocated for caching block map\n"
@@ -636,41 +643,32 @@ cfg(allocation_vdo_block_map_cache_size_mb_CFG, "vdo_block_map_cache_size_mb", a
"at least 128MiB and less than 16TiB. The cache must be at least 16MiB\n"
"per logical thread. Note that there is a memory overhead of 15%.\n")
-cfg(allocation_vdo_block_map_period_CFG, "vdo_block_map_period", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_BLOCK_MAP_PERIOD, VDO_1ST_VSN, NULL, 0, NULL,
- "Tunes the quantity of block map updates that can accumulate\n"
- "before cache pages are flushed to disk. The value must be\n"
- "at least 1 and less then 16380.\n"
- "A lower value means shorter recovery time but lower performance.\n")
+// vdo format --blockMapPeriod
+cfg(allocation_vdo_block_map_era_length_CFG, "vdo_block_map_period", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_BLOCK_MAP_ERA_LENGTH, VDO_1ST_VSN, NULL, 0, NULL,
+ "The speed with which the block map cache writes out modified block map pages.\n"
+ "A smaller era length is likely to reduce the amount time spent rebuilding,\n"
+ "at the cost of increased block map writes during normal operation.\n"
+ "The maximum and recommended value is 16380; the minimum value is 1.\n")
cfg(allocation_vdo_check_point_frequency_CFG, "vdo_check_point_frequency", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_CHECK_POINT_FREQUENCY, VDO_1ST_VSN, NULL, 0, NULL,
"The default check point frequency for VDO volume.\n")
+// vdo format
cfg(allocation_vdo_use_sparse_index_CFG, "vdo_use_sparse_index", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_USE_SPARSE_INDEX, VDO_1ST_VSN, NULL, 0, NULL,
"Enables sparse indexing for VDO volume.\n")
+// vdo format
cfg(allocation_vdo_index_memory_size_mb_CFG, "vdo_index_memory_size_mb", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_INDEX_MEMORY_SIZE_MB, VDO_1ST_VSN, NULL, 0, NULL,
"Specifies the amount of index memory in MiB for VDO volume.\n"
- "The value must be at least 256MiB and at most 1TiB.\n")
-
-cfg(allocation_vdo_use_read_cache_CFG, "vdo_use_read_cache", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_USE_READ_CACHE, VDO_1ST_VSN, NULL, 0, NULL,
- "Enables or disables the read cache within the VDO volume.\n"
- "The cache should be enabled if write workloads are expected\n"
- "to have high levels of deduplication, or for read intensive\n"
- "workloads of highly compressible data.\n")
-
-cfg(allocation_vdo_read_cache_size_mb_CFG, "vdo_read_cache_size_mb", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_READ_CACHE_SIZE_MB, VDO_1ST_VSN, NULL, 0, NULL,
- "Specifies the extra VDO volume read cache size in MiB.\n"
- "This space is in addition to a system-defined minimum.\n"
- "The value must be less then 16TiB and 1.12 MiB of memory\n"
- "will be used per MiB of read cache specified, per bio thread.\n")
+ "The value must be at least 256MiB and at most 1TiB.")
cfg(allocation_vdo_slab_size_mb_CFG, "vdo_slab_size_mb", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_SLAB_SIZE_MB, VDO_1ST_VSN, NULL, 0, NULL,
"Specifies the size in MiB of the increment by which a VDO is grown.\n"
"Using a smaller size constrains the total maximum physical size\n"
- "that can be accommodated. Must be a power of two between 128MiB and 32GiB.\n")
+ "that can be accommodated. Must be a power of two between 128MiB and 32GiB.")
cfg(allocation_vdo_ack_threads_CFG, "vdo_ack_threads", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_ACK_THREADS, VDO_1ST_VSN, NULL, 0, NULL,
- "Specifies the number of threads to use for acknowledging\n"
+ "Specifies the number of threads to use for acknowledging\n"
"completion of requested VDO I/O operations.\n"
"The value must be at in range [0..100].\n")
@@ -722,6 +720,16 @@ cfg(allocation_vdo_write_policy_CFG, "vdo_write_policy", allocation_CFG_SECTION,
"async - Writes are acknowledged after data has been cached for writing to stable storage.\n"
" Data which has not been flushed is not guaranteed to persist in this mode.\n")
+cfg(allocation_vdo_max_discard_CFG, "vdo_max_discard", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_MAX_DISCARD, VDO_1ST_VSN, NULL, 0, NULL,
+ "Specified te maximum size of discard bio accepted, in 4096 byte blocks.\n"
+ "I/O requests to a VDO volume are normally split into 4096-byte blocks,\n"
+ "and processed up to 2048 at a time. However, discard requests to a VDO volume\n"
+ "can be automatically split to a larger size, up to <max discard> 4096-byte blocks\n"
+ "in a single bio, and are limited to 1500 at a time.\n"
+ "Increasing this value may provide better overall performance, at the cost of\n"
+ "increased latency for the individual discard requests.\n"
+ "The default and minimum is 1. The maximum is UINT_MAX / 4096.\n")
+
cfg(log_report_command_log_CFG, "report_command_log", log_CFG_SECTION, CFG_PROFILABLE | CFG_DEFAULT_COMMENTED | CFG_DISALLOW_INTERACTIVE, CFG_TYPE_BOOL, DEFAULT_COMMAND_LOG_REPORT, vsn(2, 2, 158), NULL, 0, NULL,
"Enable or disable LVM log reporting.\n"
"If enabled, LVM will collect a log of operations, messages,\n"
diff --git a/lib/config/defaults.h b/lib/config/defaults.h
index fc12626..b45324b 100644
--- a/lib/config/defaults.h
+++ b/lib/config/defaults.h
@@ -153,14 +153,13 @@
/* VDO defaults */
#define DEFAULT_VDO_USE_COMPRESSION (true)
#define DEFAULT_VDO_USE_DEDUPLICATION (true)
-#define DEFAULT_VDO_EMULATE_512_SECTORS (false)
+#define DEFAULT_VDO_USE_METADATA_HINTS (true)
+#define DEFAULT_VDO_MINIMUM_IO_SIZE (4096)
#define DEFAULT_VDO_BLOCK_MAP_CACHE_SIZE_MB (DM_VDO_BLOCK_MAP_CACHE_SIZE_MINIMUM_MB)
-#define DEFAULT_VDO_BLOCK_MAP_PERIOD (DM_VDO_BLOCK_MAP_PERIOD_MAXIMUM)
+#define DEFAULT_VDO_BLOCK_MAP_ERA_LENGTH (DM_VDO_BLOCK_MAP_ERA_LENGTH_MAXIMUM)
#define DEFAULT_VDO_USE_SPARSE_INDEX (false)
#define DEFAULT_VDO_CHECK_POINT_FREQUENCY (0)
#define DEFAULT_VDO_INDEX_MEMORY_SIZE_MB (DM_VDO_INDEX_MEMORY_SIZE_MINIMUM_MB)
-#define DEFAULT_VDO_USE_READ_CACHE (false)
-#define DEFAULT_VDO_READ_CACHE_SIZE_MB (0)
#define DEFAULT_VDO_SLAB_SIZE_MB (2 * 1024) // 2GiB ... 19 slabbits
#define DEFAULT_VDO_ACK_THREADS (1)
#define DEFAULT_VDO_BIO_THREADS (1)
@@ -170,6 +169,7 @@
#define DEFAULT_VDO_LOGICAL_THREADS (1)
#define DEFAULT_VDO_PHYSICAL_THREADS (1)
#define DEFAULT_VDO_WRITE_POLICY "auto"
+#define DEFAULT_VDO_MAX_DISCARD (DM_VDO_MAX_DISCARD_MINIMUM)
#define DEFAULT_VDO_FORMAT_OPTIONS_CONFIG "#S" ""
/*
diff --git a/lib/metadata/vdo_manip.c b/lib/metadata/vdo_manip.c
index b5bbbe2..04ab1ab 100644
--- a/lib/metadata/vdo_manip.c
+++ b/lib/metadata/vdo_manip.c
@@ -416,22 +416,20 @@ int fill_vdo_target_params(struct cmd_context *cmd,
find_config_tree_int(cmd, allocation_vdo_use_compression_CFG, profile);
vtp->use_deduplication =
find_config_tree_int(cmd, allocation_vdo_use_deduplication_CFG, profile);
- vtp->emulate_512_sectors =
- find_config_tree_int(cmd, allocation_vdo_emulate_512_sectors_CFG, profile);
+ vtp->use_metadata_hints =
+ find_config_tree_int(cmd, allocation_vdo_use_metadata_hints_CFG, profile);
+ vtp->minimum_io_size =
+ find_config_tree_int(cmd, allocation_vdo_minimum_io_size_CFG, profile);
vtp->block_map_cache_size_mb =
find_config_tree_int64(cmd, allocation_vdo_block_map_cache_size_mb_CFG, profile);
- vtp->block_map_period =
- find_config_tree_int(cmd, allocation_vdo_block_map_period_CFG, profile);
+ vtp->block_map_era_length =
+ find_config_tree_int(cmd, allocation_vdo_block_map_era_length_CFG, profile);
vtp->check_point_frequency =
find_config_tree_int(cmd, allocation_vdo_check_point_frequency_CFG, profile);
vtp->use_sparse_index =
find_config_tree_int(cmd, allocation_vdo_use_sparse_index_CFG, profile);
vtp->index_memory_size_mb =
find_config_tree_int64(cmd, allocation_vdo_index_memory_size_mb_CFG, profile);
- vtp->use_read_cache =
- find_config_tree_int(cmd, allocation_vdo_use_read_cache_CFG, profile);
- vtp->read_cache_size_mb =
- find_config_tree_int64(cmd, allocation_vdo_read_cache_size_mb_CFG, profile);
vtp->slab_size_mb =
find_config_tree_int(cmd, allocation_vdo_slab_size_mb_CFG, profile);
vtp->ack_threads =
@@ -448,6 +446,8 @@ int fill_vdo_target_params(struct cmd_context *cmd,
find_config_tree_int(cmd, allocation_vdo_logical_threads_CFG, profile);
vtp->physical_threads =
find_config_tree_int(cmd, allocation_vdo_physical_threads_CFG, profile);
+ vtp->max_discard =
+ find_config_tree_int(cmd, allocation_vdo_max_discard_CFG, profile);
policy = find_config_tree_str(cmd, allocation_vdo_write_policy_CFG, profile);
if (!get_vdo_write_policy(&vtp->write_policy, policy))
diff --git a/lib/vdo/vdo.c b/lib/vdo/vdo.c
index 455ce5b..c34eb93 100644
--- a/lib/vdo/vdo.c
+++ b/lib/vdo/vdo.c
@@ -165,21 +165,19 @@ static void _vdo_pool_display(const struct lv_segment *seg)
_print_yes_no("Compression\t", vtp->use_compression);
_print_yes_no("Deduplication", vtp->use_deduplication);
- _print_yes_no("Emulate 512 sectors", vtp->emulate_512_sectors);
+ _print_yes_no("Metadata hints", vtp->use_metadata_hints);
+ log_print(" Minimum IO size\t%s",
+ display_size(cmd, vtp->minimum_io_size));
log_print(" Block map cache sz\t%s",
display_size(cmd, vtp->block_map_cache_size_mb * UINT64_C(2 * 1024)));
- log_print(" Block map period\t%u", vtp->block_map_period);
+ log_print(" Block map era length\t%u", vtp->block_map_era_length);
_print_yes_no("Sparse index", vtp->use_sparse_index);
log_print(" Index memory size\t%s",
display_size(cmd, vtp->index_memory_size_mb * UINT64_C(2 * 1024)));
- _print_yes_no("Using read cache", vtp->use_read_cache);
-
- log_print(" Read cache size\t%s",
- display_size(cmd, vtp->read_cache_size_mb * UINT64_C(2 * 1024)));
log_print(" Slab size\t\t%s",
display_size(cmd, vtp->slab_size_mb * UINT64_C(2 * 1024)));
@@ -190,6 +188,7 @@ static void _vdo_pool_display(const struct lv_segment *seg)
log_print(" # Hash zone threads\t%u", (unsigned) vtp->hash_zone_threads);
log_print(" # Logical threads\t%u", (unsigned) vtp->logical_threads);
log_print(" # Physical threads\t%u", (unsigned) vtp->physical_threads);
+ log_print(" Max discard\t%u", (unsigned) vtp->max_discard);
}
/* reused as _vdo_text_import_area_count */
@@ -235,14 +234,17 @@ static int _vdo_pool_text_import(struct lv_segment *seg,
if (!_import_bool(n, "use_deduplication", &vtp->use_deduplication))
return_0;
- if (!_import_bool(n, "emulate_512_sectors", &vtp->emulate_512_sectors))
+ if (!_import_bool(n, "use_metadata_hints", &vtp->use_metadata_hints))
return_0;
+ if (!dm_config_get_uint32(n, "minimum_io_size", &vtp->minimum_io_size))
+ return _bad_field("minimum_io_size");
+
if (!dm_config_get_uint32(n, "block_map_cache_size_mb", &vtp->block_map_cache_size_mb))
return _bad_field("block_map_cache_size_mb");
- if (!dm_config_get_uint32(n, "block_map_period", &vtp->block_map_period))
- return _bad_field("block_map_period");
+ if (!dm_config_get_uint32(n, "block_map_era_length", &vtp->block_map_era_length))
+ return _bad_field("block_map_era_length");
if (!_import_bool(n, "use_sparse_index", &vtp->use_sparse_index))
return_0;
@@ -250,11 +252,8 @@ static int _vdo_pool_text_import(struct lv_segment *seg,
if (!dm_config_get_uint32(n, "index_memory_size_mb", &vtp->index_memory_size_mb))
return _bad_field("index_memory_size_mb");
- if (!_import_bool(n, "use_read_cache", &vtp->use_read_cache))
- return_0;
-
- if (!dm_config_get_uint32(n, "read_cache_size_mb", &vtp->read_cache_size_mb))
- return _bad_field("read_cache_size_mb");
+ if (!dm_config_get_uint32(n, "max_discard", &vtp->max_discard))
+ return _bad_field("max_discard");
if (!dm_config_get_uint32(n, "slab_size_mb", &vtp->slab_size_mb))
return _bad_field("slab_size_mb");
@@ -306,12 +305,14 @@ static int _vdo_pool_text_export(const struct lv_segment *seg, struct formatter
outf(f, "use_compression = 1");
if (vtp->use_deduplication)
outf(f, "use_deduplication = 1");
- if (vtp->emulate_512_sectors)
- outf(f, "emulate_512_sectors = 1");
+ if (vtp->use_metadata_hints)
+ outf(f, "use_metadata_hints = 1");
+
+ outsize(f, vtp->minimum_io_size, "minimum_io_size = %u", vtp->minimum_io_size);
outsize(f, vtp->block_map_cache_size_mb * UINT64_C(2 * 1024),
"block_map_cache_size_mb = %u", vtp->block_map_cache_size_mb);
- outf(f, "block_map_period = %u", vtp->block_map_period);
+ outf(f, "block_map_era_length = %u", vtp->block_map_era_length);
if (vtp->use_sparse_index)
outf(f, "use_sparse_index = 1");
@@ -319,11 +320,9 @@ static int _vdo_pool_text_export(const struct lv_segment *seg, struct formatter
outsize(f, vtp->index_memory_size_mb * UINT64_C(2 * 1024),
"index_memory_size_mb = %u", vtp->index_memory_size_mb);
- if (vtp->use_read_cache)
- outf(f, "use_read_cache = 1");
+ outf(f, "max_discard = %u", vtp->max_discard);
+
// TODO - conditionally
- outsize(f, vtp->read_cache_size_mb * UINT64_C(2 * 1024),
- "read_cache_size_mb = %u", vtp->read_cache_size_mb);
outsize(f, vtp->slab_size_mb * UINT64_C(2 * 1024),
"slab_size_mb = %u", vtp->slab_size_mb);
outf(f, "ack_threads = %u", (unsigned) vtp->ack_threads);
@@ -364,7 +363,8 @@ static int _vdo_pool_add_target_line(struct dev_manager *dm,
/* VDO uses virtual size instead of its physical size */
if (!dm_tree_node_add_vdo_target(node, get_vdo_pool_virtual_size(seg),
- data_uuid, &seg->vdo_params))
+ data_uuid, seg_lv(seg, 0)->size,
+ &seg->vdo_params))
return_0;
return 1;
4 years, 11 months
master - dmeventd: resolve compilation of vdo status parsing
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9785e40b8d52fd87d7c...
Commit: 9785e40b8d52fd87d7c451ed838f450aee41ba8d
Parent: f05104af76e26f0757df1500540e767dd889ae71
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Dec 19 12:54:14 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Dec 20 13:26:55 2018 +0100
dmeventd: resolve compilation of vdo status parsing
A bit of chicken & egg problem - dmeventd needs to use old libdm library.
VDO is only part of new device_mapper internal library.
So include directly source file for parsing status - this fixes usability
problem of VDO plugin introduced with previous Makefile reshaping
patchset.
NOTE: source file needs to be keep then compilable in both environments.
Also add missing copyright header.
---
daemons/dmeventd/plugins/vdo/dmeventd_vdo.c | 4 +++-
device_mapper/vdo/status.c | 22 ++++++++++++++++++++--
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/daemons/dmeventd/plugins/vdo/dmeventd_vdo.c b/daemons/dmeventd/plugins/vdo/dmeventd_vdo.c
index b5e2766..d5156cd 100644
--- a/daemons/dmeventd/plugins/vdo/dmeventd_vdo.c
+++ b/daemons/dmeventd/plugins/vdo/dmeventd_vdo.c
@@ -15,7 +15,9 @@
#include "lib/misc/lib.h"
#include "daemons/dmeventd/plugins/lvm2/dmeventd_lvm.h"
#include "daemons/dmeventd/libdevmapper-event.h"
-#include "device_mapper/vdo/target.h"
+
+/* Use parser from new device_mapper library */
+#include "device_mapper/vdo/status.c"
#include <sys/wait.h>
#include <stdarg.h>
diff --git a/device_mapper/vdo/status.c b/device_mapper/vdo/status.c
index 40e69ba..a34029d 100644
--- a/device_mapper/vdo/status.c
+++ b/device_mapper/vdo/status.c
@@ -1,8 +1,26 @@
+/*
+ * Copyright (C) 2018 Red Hat, Inc. All rights reserved.
+ *
+ * This file is part of the device-mapper userspace tools.
+ *
+ * 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 Lesser General Public License v.2.1.
+ *
+ * You should have received a copy of the GNU Lesser 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
+ */
+
+/* Note: this object is also used by VDO dmeventd plugin for parsing status */
+/* File could be included by VDO plugin and can use original libdm library */
+#ifndef LIB_DMEVENT_H
#include "configure.h"
-#include "target.h"
-
// For DM_ARRAY_SIZE!
#include "device_mapper/all.h"
+#endif
+
+#include "device_mapper/vdo/target.h"
#include "base/memory/zalloc.h"
#include <ctype.h>
4 years, 11 months
master - cov: Close a FD on error
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f05104af76e26f0757d...
Commit: f05104af76e26f0757df1500540e767dd889ae71
Parent: b068f21f6a24094936a33269067c18373b48f2cd
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Wed Dec 19 16:29:31 2018 +0100
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Wed Dec 19 16:29:31 2018 +0100
cov: Close a FD on error
---
tools/pvscan.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/tools/pvscan.c b/tools/pvscan.c
index 2a884df..6841f20 100644
--- a/tools/pvscan.c
+++ b/tools/pvscan.c
@@ -290,7 +290,8 @@ static int _online_pvid_file_create(struct device *dev)
rv = write(fd, buf, len);
if (rv < 0) {
log_error("Failed to write fd %d buf %s dev %s to %s: %d",
- fd, buf, dev_name(dev), path, errno);
+ fd, buf, dev_name(dev), path, errno);
+ close(fd);
return 0;
}
len -= rv;
4 years, 11 months
master - lvmlockd: Fix arguments when built without sanlock
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b068f21f6a24094936a...
Commit: b068f21f6a24094936a33269067c18373b48f2cd
Parent: 93c7bca08f328f50af4ce4a93fd19b0973b9bd1f
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Tue Dec 18 16:59:48 2018 +0100
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Tue Dec 18 17:42:22 2018 +0100
lvmlockd: Fix arguments when built without sanlock
(cherry picked from commit 24254ca86671ae49431e67788c039603fe4b79fb)
---
daemons/lvmlockd/lvmlockd-internal.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/daemons/lvmlockd/lvmlockd-internal.h b/daemons/lvmlockd/lvmlockd-internal.h
index 04645fa..ead3098 100644
--- a/daemons/lvmlockd/lvmlockd-internal.h
+++ b/daemons/lvmlockd/lvmlockd-internal.h
@@ -504,7 +504,7 @@ static inline int lm_init_vg_sanlock(char *ls_name, char *vg_name, uint32_t flag
return -1;
}
-static inline int lm_init_lv_sanlock(char *ls_name, char *vg_name, char *lv_name, char *vg_args, char *lv_args, int sector_size, int align_size, uint64_t free_offset)
+static inline int lm_init_lv_sanlock(char *ls_name, char *vg_name, char *lv_name, char *vg_args, char *lv_args, uint64_t free_offset)
{
return -1;
}
@@ -592,7 +592,7 @@ static inline int lm_is_running_sanlock(void)
return 0;
}
-static inline int lm_find_free_lock_sanlock(struct lockspace *ls, uint64_t *free_offset, int *sector_size, int *align_size)
+static inline int lm_find_free_lock_sanlock(struct lockspace *ls, uint64_t *free_offset)
{
return -1;
}
4 years, 11 months
master - Revert "tests: Remove unsupported mirrored mirrorlog"
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=93c7bca08f328f50af4...
Commit: 93c7bca08f328f50af4ce4a93fd19b0973b9bd1f
Parent: 88153c7c0aa45e9ce3d8a226e5ba1b7af7002aa1
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Tue Dec 18 10:55:35 2018 +0100
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Tue Dec 18 10:55:35 2018 +0100
Revert "tests: Remove unsupported mirrored mirrorlog"
Incorrect cherry pick from another branch.
This reverts commit 07fc4866f040a382c39577fb739e010734d83e42.
---
test/shell/lvconvert-mirror-basic.sh | 8 ++++-
test/shell/lvconvert-mirror.sh | 12 +++++++
test/shell/lvconvert-repair-replace.sh | 30 ++++++++++++++++++
test/shell/lvconvert-repair.sh | 11 +++++++
test/shell/lvconvert-twostep.sh | 6 ++++
test/shell/lvcreate-operation.sh | 22 +++++++++++++
test/shell/snapshots-of-mirrors.sh | 9 +++++
test/shell/vgsplit-operation.sh | 52 ++++++++++++++++++++++++++++++++
8 files changed, 148 insertions(+), 2 deletions(-)
diff --git a/test/shell/lvconvert-mirror-basic.sh b/test/shell/lvconvert-mirror-basic.sh
index e295561..8166613 100644
--- a/test/shell/lvconvert-mirror-basic.sh
+++ b/test/shell/lvconvert-mirror-basic.sh
@@ -122,11 +122,15 @@ test_lvconvert() {
aux prepare_vg 5 5
get_devs
+MIRRORED="mirrored"
+# FIXME: Cluster is not supporting exlusive activation of mirrored log
+test -e LOCAL_CLVMD && MIRRORED=
+
test_many() {
i=$1
for j in $(seq 0 3); do
- for k in core disk; do
- for l in core disk; do
+ for k in core disk $MIRRORED; do
+ for l in core disk $MIRRORED; do
if test "$i" -eq "$j" && test "$k" = "$l"; then continue; fi
: ----------------------------------------------------
: "Testing mirror conversion -m$i/$k -> -m$j/$l"
diff --git a/test/shell/lvconvert-mirror.sh b/test/shell/lvconvert-mirror.sh
index a422557..7cf498d 100644
--- a/test/shell/lvconvert-mirror.sh
+++ b/test/shell/lvconvert-mirror.sh
@@ -243,6 +243,18 @@ not lvconvert --type mirror -m1 --corelog --stripes 2 $vg/$lv1
lvremove -ff $vg
+# Linear to mirror with mirrored log using --alloc anywhere
+lvcreate -aey -l2 -n $lv1 $vg "$dev1"
+if test -e LOCAL_CLVMD; then
+# This is not supposed to work in cluster
+not lvconvert --type mirror -m +1 --mirrorlog mirrored --alloc anywhere $vg/$lv1 "$dev1" "$dev2"
+else
+lvconvert --type mirror -m +1 --mirrorlog mirrored --alloc anywhere $vg/$lv1 "$dev1" "$dev2"
+check mirror $vg $lv1
+fi
+lvremove -ff $vg
+
+
if test -e LOCAL_CLVMD; then
: # FIXME - cases which needs to be fixed to work in cluster
else
diff --git a/test/shell/lvconvert-repair-replace.sh b/test/shell/lvconvert-repair-replace.sh
index cd17e0b..3cd1fac 100644
--- a/test/shell/lvconvert-repair-replace.sh
+++ b/test/shell/lvconvert-repair-replace.sh
@@ -71,3 +71,33 @@ lvconvert -y --repair $vg/mirror2
check mirror $vg mirror2
vgs $vg
vgremove -ff $vg
+
+if aux kernel_at_least 3 0 0; then
+ # 2-way, mirrored log
+ # Double log failure, full replace
+ vgcreate $SHARED $vg "$dev1" "$dev2" "$dev3" "$dev4" "$dev5" "$dev6"
+ lvcreate -aey --mirrorlog mirrored --type mirror -m 1 --ignoremonitoring --nosync -L 1 -n 2way $vg \
+ "$dev1" "$dev2" "$dev3":0 "$dev4":0
+ aux disable_dev "$dev3" "$dev4"
+ lvconvert -y --repair $vg/2way 2>&1 | tee 2way.out
+ lvs -a -o +devices $vg | not grep unknown
+ not grep "WARNING: Failed" 2way.out
+ vgreduce --removemissing $vg
+ check mirror $vg 2way
+ aux enable_dev "$dev3" "$dev4"
+ vgremove -ff $vg
+fi
+
+# 3-way, mirrored log
+# Single log failure, replace
+vgcreate $SHARED $vg "$dev1" "$dev2" "$dev3" "$dev4" "$dev5" "$dev6"
+lvcreate -aey --mirrorlog mirrored --type mirror -m 2 --ignoremonitoring --nosync -L 1 -n 3way $vg \
+ "$dev1" "$dev2" "$dev3" "$dev4":0 "$dev5":0
+aux disable_dev "$dev4"
+lvconvert -y --repair $vg/3way 2>&1 | tee 3way.out
+lvs -a -o +devices $vg | not grep unknown
+not grep "WARNING: Failed" 3way.out
+vgreduce --removemissing $vg
+check mirror $vg 3way
+aux enable_dev "$dev4"
+vgremove -ff $vg
diff --git a/test/shell/lvconvert-repair.sh b/test/shell/lvconvert-repair.sh
index 06470c4..ae8fa7e 100644
--- a/test/shell/lvconvert-repair.sh
+++ b/test/shell/lvconvert-repair.sh
@@ -69,6 +69,17 @@ _check_mlog
vgreduce --removemissing $vg
aux enable_dev "$dev4"
+# 3-way, mirrored log => 3-way, core log
+recreate_vg_
+lvcreate -aey --type mirror -m 2 --mirrorlog mirrored --ignoremonitoring -L 1 -n 3way $vg \
+ "$dev1" "$dev2" "$dev3" "$dev4":0 "$dev5":0
+aux disable_dev "$dev4" "$dev5"
+echo n | lvconvert --repair $vg/3way
+check mirror $vg 3way core
+_check_mlog
+vgreduce --removemissing $vg
+aux enable_dev "$dev4" "$dev5"
+
# 2-way, disk log => 2-way, core log
recreate_vg_
lvcreate -aey --type mirror -m 1 --ignoremonitoring -L 1 -n 2way $vg "$dev1" "$dev2" "$dev3":0
diff --git a/test/shell/lvconvert-twostep.sh b/test/shell/lvconvert-twostep.sh
index 7487d51..afc9d47 100644
--- a/test/shell/lvconvert-twostep.sh
+++ b/test/shell/lvconvert-twostep.sh
@@ -27,4 +27,10 @@ lvconvert --mirrorlog core $vg/mirror
not lvconvert -m 1 --mirrorlog disk $vg/mirror "$dev3" 2>&1 | tee errs
grep "two steps" errs
+if test ! -e LOCAL_CLVMD ; then
+# FIXME mirrored unsupported in cluster
+not lvconvert -m 1 --mirrorlog mirrored $vg/mirror "$dev3" "$dev4" 2>&1 | tee errs
+grep "two steps" errs
+fi
+
vgremove -ff $vg
diff --git a/test/shell/lvcreate-operation.sh b/test/shell/lvcreate-operation.sh
index 807f176..568af36 100644
--- a/test/shell/lvcreate-operation.sh
+++ b/test/shell/lvcreate-operation.sh
@@ -38,4 +38,26 @@ lvcreate -n$lv2 -l4 -s $vg/$lv1
lvcreate -n$lv3 -l4 --permission r -s $vg/$lv1
cleanup_lvs
+# Skip the rest for cluster
+if test -e LOCAL_CLVMD; then
+
+# ---
+# Create mirror on two devices with mirrored log using --alloc anywhere - should always fail in cluster
+not lvcreate --type mirror -m 1 -l4 -n $lv1 --mirrorlog mirrored $vg --alloc anywhere "$dev1" "$dev2"
+cleanup_lvs
+
+else
+
+# ---
+# Create mirror on two devices with mirrored log using --alloc anywhere
+lvcreate --type mirror -m 1 -l4 -n $lv1 --mirrorlog mirrored $vg --alloc anywhere "$dev1" "$dev2"
+cleanup_lvs
+
+# --
+# Create mirror on one dev with mirrored log using --alloc anywhere, should fail
+not lvcreate --type mirror -m 1 -l4 -n $lv1 --mirrorlog mirrored $vg --alloc anywhere "$dev1"
+cleanup_lvs
+
+fi
+
vgremove -ff $vg
diff --git a/test/shell/snapshots-of-mirrors.sh b/test/shell/snapshots-of-mirrors.sh
index 1f2c393..f2f2943 100644
--- a/test/shell/snapshots-of-mirrors.sh
+++ b/test/shell/snapshots-of-mirrors.sh
@@ -38,6 +38,15 @@ not lvconvert -m2 $vg/lv
# Log conversion (disk -> core)
lvconvert --mirrorlog core $vg/lv
+# Log conversion (core -> mirrored)
+# FIXME on cluster
+SHOULD=""
+test -e LOCAL_CLVMD && SHOULD=should
+$SHOULD lvconvert --mirrorlog mirrored $vg/lv
+
+# Log conversion (mirrored -> core)
+lvconvert --mirrorlog core $vg/lv
+
# Log conversion (core -> disk)
lvconvert --mirrorlog disk $vg/lv
diff --git a/test/shell/vgsplit-operation.sh b/test/shell/vgsplit-operation.sh
index 36b75f5..eb24a58 100644
--- a/test/shell/vgsplit-operation.sh
+++ b/test/shell/vgsplit-operation.sh
@@ -122,6 +122,58 @@ COMM "vgsplit correctly splits mirror (log+leg on same dev) into $i VG ($j args)
lvremove -f $vg2/$lv1
vgremove -f $vg1 $vg2
+# Can't use mirrored log without cmirrord
+# TODO: Should work for inactive device, needs some fixes....
+if test ! -e LOCAL_CLVMD ; then
+COMM "vgsplit correctly splits mirror LV with mirrored log into $i VG ($j args)"
+ create_vg_ $vg1 "$dev1" "$dev2" "$dev3" "$dev4"
+ test $i = existing && create_vg_ $vg2 "$dev5"
+
+ lvcreate -an -Zn -l 64 --mirrorlog mirrored --type mirror -m1 -n $lv1 $vg1 \
+ "$dev1" "$dev2" "$dev3" "$dev4"
+
+ if [ $j = PV ]; then
+ # FIXME: Not an exhaustive check of possible bad combinations
+ not vgsplit $vg1 $vg2 "$dev1" "$dev2"
+ not vgsplit $vg1 $vg2 "$dev3" "$dev4"
+ not vgsplit $vg1 $vg2 "$dev1" "$dev3"
+ not vgsplit $vg1 $vg2 "$dev2" "$dev4"
+ vgsplit $vg1 $vg2 "$dev1" "$dev2" "$dev3" "$dev4"
+ else
+ vgsplit -n $lv1 $vg1 $vg2
+ fi
+ if [ $i = existing ]; then
+ check pvlv_counts $vg2 5 1 0
+ else
+ check pvlv_counts $vg2 4 1 0
+ fi
+ lvremove -f $vg2/$lv1
+ vgremove -f $vg2
+
+# RHBZ 875903
+COMM "vgsplit correctly splits mirror LV with mirrored log on same devs into $i VG ($j args)"
+ create_vg_ $vg1 "$dev1" "$dev2" "$dev3" "$dev4"
+ test $i = existing && create_vg_ $vg2 "$dev5"
+
+ lvcreate -an -Zn -l 64 --mirrorlog mirrored --type mirror -m1 -n $lv1 $vg1 \
+ "$dev1" "$dev2"
+
+ if [ $j = PV ]; then
+ not vgsplit $vg1 $vg2 "$dev1"
+ not vgsplit $vg1 $vg2 "$dev2"
+ vgsplit $vg1 $vg2 "$dev1" "$dev2"
+ else
+ vgsplit -n $lv1 $vg1 $vg2
+ fi
+ if [ $i = existing ]; then
+ check pvlv_counts $vg2 3 1 0
+ else
+ check pvlv_counts $vg2 2 1 0
+ fi
+ lvremove -f $vg2/$lv1
+ vgremove -f $vg1 $vg2
+fi
+
COMM "vgsplit correctly splits origin and snapshot LV into $i VG ($j args)"
create_vg_ $vg1 "$dev1" "$dev2"
test $i = existing && create_vg_ $vg2 "$dev3" "$dev4"
4 years, 11 months
master - build: Remove badly placed `@`
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=88153c7c0aa45e9ce3d...
Commit: 88153c7c0aa45e9ce3d8a226e5ba1b7af7002aa1
Parent: e0c2d374aeeb77258c3bcdf2bb3ec5a0fca95a97
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Tue Dec 18 09:42:34 2018 +0100
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Tue Dec 18 09:54:47 2018 +0100
build: Remove badly placed `@`
---
conf/Makefile.in | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/conf/Makefile.in b/conf/Makefile.in
index dc74747..ee3b032 100644
--- a/conf/Makefile.in
+++ b/conf/Makefile.in
@@ -39,13 +39,13 @@ generate:
install_conf: $(CONFSRC)
@if [ ! -e $(confdir)/$(CONFDEST) ]; then \
echo "$(INSTALL_WDATA) -D $< $(confdir)/$(CONFDEST)"; \
- $(Q) $(INSTALL_WDATA) -D $< $(confdir)/$(CONFDEST); \
+ $(INSTALL_WDATA) -D $< $(confdir)/$(CONFDEST); \
fi
install_localconf: $(CONFLOCAL)
@if [ ! -e $(confdir)/$(CONFLOCAL) ]; then \
echo "$(INSTALL_WDATA) -D $< $(confdir)/$(CONFLOCAL)"; \
- $(Q) $(INSTALL_WDATA) -D $< $(confdir)/$(CONFLOCAL); \
+ $(INSTALL_WDATA) -D $< $(confdir)/$(CONFLOCAL); \
fi
install_profiles: $(PROFILES)
4 years, 11 months
master - tests: Remove unsupported mirrored mirrorlog
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=07fc4866f040a382c39...
Commit: 07fc4866f040a382c39577fb739e010734d83e42
Parent: e82303fd6abc3ae43168f8032806c7c17d181a3e
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Tue Dec 18 08:48:25 2018 +0100
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Tue Dec 18 09:54:42 2018 +0100
tests: Remove unsupported mirrored mirrorlog
---
test/shell/lvconvert-mirror-basic.sh | 8 +----
test/shell/lvconvert-mirror.sh | 12 -------
test/shell/lvconvert-repair-replace.sh | 30 ------------------
test/shell/lvconvert-repair.sh | 11 -------
test/shell/lvconvert-twostep.sh | 6 ----
test/shell/lvcreate-operation.sh | 22 -------------
test/shell/snapshots-of-mirrors.sh | 9 -----
test/shell/vgsplit-operation.sh | 52 --------------------------------
8 files changed, 2 insertions(+), 148 deletions(-)
diff --git a/test/shell/lvconvert-mirror-basic.sh b/test/shell/lvconvert-mirror-basic.sh
index 8166613..e295561 100644
--- a/test/shell/lvconvert-mirror-basic.sh
+++ b/test/shell/lvconvert-mirror-basic.sh
@@ -122,15 +122,11 @@ test_lvconvert() {
aux prepare_vg 5 5
get_devs
-MIRRORED="mirrored"
-# FIXME: Cluster is not supporting exlusive activation of mirrored log
-test -e LOCAL_CLVMD && MIRRORED=
-
test_many() {
i=$1
for j in $(seq 0 3); do
- for k in core disk $MIRRORED; do
- for l in core disk $MIRRORED; do
+ for k in core disk; do
+ for l in core disk; do
if test "$i" -eq "$j" && test "$k" = "$l"; then continue; fi
: ----------------------------------------------------
: "Testing mirror conversion -m$i/$k -> -m$j/$l"
diff --git a/test/shell/lvconvert-mirror.sh b/test/shell/lvconvert-mirror.sh
index 7cf498d..a422557 100644
--- a/test/shell/lvconvert-mirror.sh
+++ b/test/shell/lvconvert-mirror.sh
@@ -243,18 +243,6 @@ not lvconvert --type mirror -m1 --corelog --stripes 2 $vg/$lv1
lvremove -ff $vg
-# Linear to mirror with mirrored log using --alloc anywhere
-lvcreate -aey -l2 -n $lv1 $vg "$dev1"
-if test -e LOCAL_CLVMD; then
-# This is not supposed to work in cluster
-not lvconvert --type mirror -m +1 --mirrorlog mirrored --alloc anywhere $vg/$lv1 "$dev1" "$dev2"
-else
-lvconvert --type mirror -m +1 --mirrorlog mirrored --alloc anywhere $vg/$lv1 "$dev1" "$dev2"
-check mirror $vg $lv1
-fi
-lvremove -ff $vg
-
-
if test -e LOCAL_CLVMD; then
: # FIXME - cases which needs to be fixed to work in cluster
else
diff --git a/test/shell/lvconvert-repair-replace.sh b/test/shell/lvconvert-repair-replace.sh
index 3cd1fac..cd17e0b 100644
--- a/test/shell/lvconvert-repair-replace.sh
+++ b/test/shell/lvconvert-repair-replace.sh
@@ -71,33 +71,3 @@ lvconvert -y --repair $vg/mirror2
check mirror $vg mirror2
vgs $vg
vgremove -ff $vg
-
-if aux kernel_at_least 3 0 0; then
- # 2-way, mirrored log
- # Double log failure, full replace
- vgcreate $SHARED $vg "$dev1" "$dev2" "$dev3" "$dev4" "$dev5" "$dev6"
- lvcreate -aey --mirrorlog mirrored --type mirror -m 1 --ignoremonitoring --nosync -L 1 -n 2way $vg \
- "$dev1" "$dev2" "$dev3":0 "$dev4":0
- aux disable_dev "$dev3" "$dev4"
- lvconvert -y --repair $vg/2way 2>&1 | tee 2way.out
- lvs -a -o +devices $vg | not grep unknown
- not grep "WARNING: Failed" 2way.out
- vgreduce --removemissing $vg
- check mirror $vg 2way
- aux enable_dev "$dev3" "$dev4"
- vgremove -ff $vg
-fi
-
-# 3-way, mirrored log
-# Single log failure, replace
-vgcreate $SHARED $vg "$dev1" "$dev2" "$dev3" "$dev4" "$dev5" "$dev6"
-lvcreate -aey --mirrorlog mirrored --type mirror -m 2 --ignoremonitoring --nosync -L 1 -n 3way $vg \
- "$dev1" "$dev2" "$dev3" "$dev4":0 "$dev5":0
-aux disable_dev "$dev4"
-lvconvert -y --repair $vg/3way 2>&1 | tee 3way.out
-lvs -a -o +devices $vg | not grep unknown
-not grep "WARNING: Failed" 3way.out
-vgreduce --removemissing $vg
-check mirror $vg 3way
-aux enable_dev "$dev4"
-vgremove -ff $vg
diff --git a/test/shell/lvconvert-repair.sh b/test/shell/lvconvert-repair.sh
index ae8fa7e..06470c4 100644
--- a/test/shell/lvconvert-repair.sh
+++ b/test/shell/lvconvert-repair.sh
@@ -69,17 +69,6 @@ _check_mlog
vgreduce --removemissing $vg
aux enable_dev "$dev4"
-# 3-way, mirrored log => 3-way, core log
-recreate_vg_
-lvcreate -aey --type mirror -m 2 --mirrorlog mirrored --ignoremonitoring -L 1 -n 3way $vg \
- "$dev1" "$dev2" "$dev3" "$dev4":0 "$dev5":0
-aux disable_dev "$dev4" "$dev5"
-echo n | lvconvert --repair $vg/3way
-check mirror $vg 3way core
-_check_mlog
-vgreduce --removemissing $vg
-aux enable_dev "$dev4" "$dev5"
-
# 2-way, disk log => 2-way, core log
recreate_vg_
lvcreate -aey --type mirror -m 1 --ignoremonitoring -L 1 -n 2way $vg "$dev1" "$dev2" "$dev3":0
diff --git a/test/shell/lvconvert-twostep.sh b/test/shell/lvconvert-twostep.sh
index afc9d47..7487d51 100644
--- a/test/shell/lvconvert-twostep.sh
+++ b/test/shell/lvconvert-twostep.sh
@@ -27,10 +27,4 @@ lvconvert --mirrorlog core $vg/mirror
not lvconvert -m 1 --mirrorlog disk $vg/mirror "$dev3" 2>&1 | tee errs
grep "two steps" errs
-if test ! -e LOCAL_CLVMD ; then
-# FIXME mirrored unsupported in cluster
-not lvconvert -m 1 --mirrorlog mirrored $vg/mirror "$dev3" "$dev4" 2>&1 | tee errs
-grep "two steps" errs
-fi
-
vgremove -ff $vg
diff --git a/test/shell/lvcreate-operation.sh b/test/shell/lvcreate-operation.sh
index 568af36..807f176 100644
--- a/test/shell/lvcreate-operation.sh
+++ b/test/shell/lvcreate-operation.sh
@@ -38,26 +38,4 @@ lvcreate -n$lv2 -l4 -s $vg/$lv1
lvcreate -n$lv3 -l4 --permission r -s $vg/$lv1
cleanup_lvs
-# Skip the rest for cluster
-if test -e LOCAL_CLVMD; then
-
-# ---
-# Create mirror on two devices with mirrored log using --alloc anywhere - should always fail in cluster
-not lvcreate --type mirror -m 1 -l4 -n $lv1 --mirrorlog mirrored $vg --alloc anywhere "$dev1" "$dev2"
-cleanup_lvs
-
-else
-
-# ---
-# Create mirror on two devices with mirrored log using --alloc anywhere
-lvcreate --type mirror -m 1 -l4 -n $lv1 --mirrorlog mirrored $vg --alloc anywhere "$dev1" "$dev2"
-cleanup_lvs
-
-# --
-# Create mirror on one dev with mirrored log using --alloc anywhere, should fail
-not lvcreate --type mirror -m 1 -l4 -n $lv1 --mirrorlog mirrored $vg --alloc anywhere "$dev1"
-cleanup_lvs
-
-fi
-
vgremove -ff $vg
diff --git a/test/shell/snapshots-of-mirrors.sh b/test/shell/snapshots-of-mirrors.sh
index f2f2943..1f2c393 100644
--- a/test/shell/snapshots-of-mirrors.sh
+++ b/test/shell/snapshots-of-mirrors.sh
@@ -38,15 +38,6 @@ not lvconvert -m2 $vg/lv
# Log conversion (disk -> core)
lvconvert --mirrorlog core $vg/lv
-# Log conversion (core -> mirrored)
-# FIXME on cluster
-SHOULD=""
-test -e LOCAL_CLVMD && SHOULD=should
-$SHOULD lvconvert --mirrorlog mirrored $vg/lv
-
-# Log conversion (mirrored -> core)
-lvconvert --mirrorlog core $vg/lv
-
# Log conversion (core -> disk)
lvconvert --mirrorlog disk $vg/lv
diff --git a/test/shell/vgsplit-operation.sh b/test/shell/vgsplit-operation.sh
index eb24a58..36b75f5 100644
--- a/test/shell/vgsplit-operation.sh
+++ b/test/shell/vgsplit-operation.sh
@@ -122,58 +122,6 @@ COMM "vgsplit correctly splits mirror (log+leg on same dev) into $i VG ($j args)
lvremove -f $vg2/$lv1
vgremove -f $vg1 $vg2
-# Can't use mirrored log without cmirrord
-# TODO: Should work for inactive device, needs some fixes....
-if test ! -e LOCAL_CLVMD ; then
-COMM "vgsplit correctly splits mirror LV with mirrored log into $i VG ($j args)"
- create_vg_ $vg1 "$dev1" "$dev2" "$dev3" "$dev4"
- test $i = existing && create_vg_ $vg2 "$dev5"
-
- lvcreate -an -Zn -l 64 --mirrorlog mirrored --type mirror -m1 -n $lv1 $vg1 \
- "$dev1" "$dev2" "$dev3" "$dev4"
-
- if [ $j = PV ]; then
- # FIXME: Not an exhaustive check of possible bad combinations
- not vgsplit $vg1 $vg2 "$dev1" "$dev2"
- not vgsplit $vg1 $vg2 "$dev3" "$dev4"
- not vgsplit $vg1 $vg2 "$dev1" "$dev3"
- not vgsplit $vg1 $vg2 "$dev2" "$dev4"
- vgsplit $vg1 $vg2 "$dev1" "$dev2" "$dev3" "$dev4"
- else
- vgsplit -n $lv1 $vg1 $vg2
- fi
- if [ $i = existing ]; then
- check pvlv_counts $vg2 5 1 0
- else
- check pvlv_counts $vg2 4 1 0
- fi
- lvremove -f $vg2/$lv1
- vgremove -f $vg2
-
-# RHBZ 875903
-COMM "vgsplit correctly splits mirror LV with mirrored log on same devs into $i VG ($j args)"
- create_vg_ $vg1 "$dev1" "$dev2" "$dev3" "$dev4"
- test $i = existing && create_vg_ $vg2 "$dev5"
-
- lvcreate -an -Zn -l 64 --mirrorlog mirrored --type mirror -m1 -n $lv1 $vg1 \
- "$dev1" "$dev2"
-
- if [ $j = PV ]; then
- not vgsplit $vg1 $vg2 "$dev1"
- not vgsplit $vg1 $vg2 "$dev2"
- vgsplit $vg1 $vg2 "$dev1" "$dev2"
- else
- vgsplit -n $lv1 $vg1 $vg2
- fi
- if [ $i = existing ]; then
- check pvlv_counts $vg2 3 1 0
- else
- check pvlv_counts $vg2 2 1 0
- fi
- lvremove -f $vg2/$lv1
- vgremove -f $vg1 $vg2
-fi
-
COMM "vgsplit correctly splits origin and snapshot LV into $i VG ($j args)"
create_vg_ $vg1 "$dev1" "$dev2"
test $i = existing && create_vg_ $vg2 "$dev3" "$dev4"
4 years, 11 months
master - build: Remove reference to undefined @BUILD_LVMETAD@
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e0c2d374aeeb77258c3...
Commit: e0c2d374aeeb77258c3bcdf2bb3ec5a0fca95a97
Parent: 07fc4866f040a382c39577fb739e010734d83e42
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Tue Dec 18 09:36:48 2018 +0100
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Tue Dec 18 09:54:45 2018 +0100
build: Remove reference to undefined @BUILD_LVMETAD@
---
libdaemon/Makefile.in | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/libdaemon/Makefile.in b/libdaemon/Makefile.in
index c7fe1d3..4b0a0ad 100644
--- a/libdaemon/Makefile.in
+++ b/libdaemon/Makefile.in
@@ -19,10 +19,7 @@ top_builddir = @top_builddir@
SUBDIRS += client
-ifeq (@BUILD_LVMETAD@,yes)
- SUBDIRS += server
-server: client
-else ifeq (@BUILD_LVMPOLLD@,yes)
+ifeq (@BUILD_LVMPOLLD@,yes)
SUBDIRS += server
server: client
endif
4 years, 11 months
master - lvcreate/lvconvert: optionally reenable mirrored mirror log for testing purposes only
by Heinz Mauelshagen
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e82303fd6abc3ae4316...
Commit: e82303fd6abc3ae43168f8032806c7c17d181a3e
Parent: 1f1d36f6a2b441fbf84e59f435bd5169459392b1
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Mon Dec 17 19:24:37 2018 +0100
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Mon Dec 17 19:28:54 2018 +0100
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
---
conf/example.conf.in | 11 +++++++++++
lib/config/config_settings.h | 11 +++++++++++
lib/metadata/mirror.c | 10 +++++++---
test/shell/lvconvert-mirror.sh | 2 ++
test/shell/lvconvert-repair-replace.sh | 4 +++-
test/shell/lvconvert-repair.sh | 4 +++-
test/shell/lvconvert-twostep.sh | 4 +++-
test/shell/lvcreate-operation.sh | 4 +++-
test/shell/snapshots-of-mirrors.sh | 4 +++-
test/shell/vgsplit-operation.sh | 4 +++-
10 files changed, 49 insertions(+), 9 deletions(-)
diff --git a/conf/example.conf.in b/conf/example.conf.in
index 0204f4b..85465f5 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -904,6 +904,17 @@ global {
#
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.
# The segment type used by the -i -m combination.
# The --type raid10|mirror option overrides this setting.
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index e473dd5..b0fcf8a 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -960,6 +960,17 @@ cfg(global_mirror_segtype_default_CFG, "mirror_segtype_default", global_CFG_SECT
" fashion in a cluster.\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,
"The segment type used by the -i -m combination.\n"
"The --type raid10|mirror option overrides this setting.\n"
diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c
index 8b20979..6950546 100644
--- a/lib/metadata/mirror.c
+++ b/lib/metadata/mirror.c
@@ -1,6 +1,6 @@
/*
* 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.
*
@@ -1908,8 +1908,12 @@ int add_mirror_log(struct cmd_context *cmd, struct logical_volume *lv,
}
if (log_count > 1) {
- log_err("Log type \"mirrored\" is DEPRECATED. Use RAID1 LV or disk log instead.");
- return 0;
+ if (find_config_tree_bool(cmd, global_support_mirrored_mirror_log_CFG, NULL))
+ 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)))
diff --git a/test/shell/lvconvert-mirror.sh b/test/shell/lvconvert-mirror.sh
index 8f37645..7cf498d 100644
--- a/test/shell/lvconvert-mirror.sh
+++ b/test/shell/lvconvert-mirror.sh
@@ -14,6 +14,8 @@
. lib/inittest
+aux lvmconf "global/support_mirrored_mirror_log=1"
+
aux prepare_pvs 5
get_devs
diff --git a/test/shell/lvconvert-repair-replace.sh b/test/shell/lvconvert-repair-replace.sh
index 1fe7965..3cd1fac 100644
--- a/test/shell/lvconvert-repair-replace.sh
+++ b/test/shell/lvconvert-repair-replace.sh
@@ -1,6 +1,6 @@
#!/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,
# modify, copy, or redistribute it subject to the terms and conditions
@@ -14,6 +14,8 @@
. lib/inittest
+aux lvmconf "global/support_mirrored_mirror_log=1"
+
aux prepare_vg 6
aux lvmconf 'allocation/maximise_cling = 0' \
'allocation/mirror_logs_require_separate_pvs = 1'
diff --git a/test/shell/lvconvert-repair.sh b/test/shell/lvconvert-repair.sh
index 5f7b851..ae8fa7e 100644
--- a/test/shell/lvconvert-repair.sh
+++ b/test/shell/lvconvert-repair.sh
@@ -1,6 +1,6 @@
#!/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,
# modify, copy, or redistribute it subject to the terms and conditions
@@ -12,6 +12,8 @@
. lib/inittest
+aux lvmconf "global/support_mirrored_mirror_log=1"
+
recreate_vg_()
{
vgremove -ff $vg
diff --git a/test/shell/lvconvert-twostep.sh b/test/shell/lvconvert-twostep.sh
index 44527f0..afc9d47 100644
--- a/test/shell/lvconvert-twostep.sh
+++ b/test/shell/lvconvert-twostep.sh
@@ -1,6 +1,6 @@
#!/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,
# modify, copy, or redistribute it subject to the terms and conditions
@@ -14,6 +14,8 @@
. lib/inittest
+aux lvmconf "global/support_mirrored_mirror_log=1"
+
aux prepare_vg 4
lvcreate -aey --type mirror -m 1 --mirrorlog disk --ignoremonitoring -L 1 -n mirror $vg
diff --git a/test/shell/lvcreate-operation.sh b/test/shell/lvcreate-operation.sh
index 5faa39f..568af36 100644
--- a/test/shell/lvcreate-operation.sh
+++ b/test/shell/lvcreate-operation.sh
@@ -1,6 +1,6 @@
#!/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,
# modify, copy, or redistribute it subject to the terms and conditions
@@ -17,6 +17,8 @@ SKIP_WITH_LVMPOLLD=1
. lib/inittest
+aux lvmconf "global/support_mirrored_mirror_log=1"
+
cleanup_lvs() {
lvremove -ff $vg
(dm_table | not grep $vg) || \
diff --git a/test/shell/snapshots-of-mirrors.sh b/test/shell/snapshots-of-mirrors.sh
index 48cadc5..f2f2943 100644
--- a/test/shell/snapshots-of-mirrors.sh
+++ b/test/shell/snapshots-of-mirrors.sh
@@ -1,6 +1,6 @@
#!/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,
# modify, copy, or redistribute it subject to the terms and conditions
@@ -14,6 +14,8 @@
. lib/inittest
+aux lvmconf "global/support_mirrored_mirror_log=1"
+
aux prepare_vg 4
lvcreate -aey --type mirror -m 1 -L 10M --nosync -n lv $vg
diff --git a/test/shell/vgsplit-operation.sh b/test/shell/vgsplit-operation.sh
index ab88866..eb24a58 100644
--- a/test/shell/vgsplit-operation.sh
+++ b/test/shell/vgsplit-operation.sh
@@ -1,6 +1,6 @@
#!/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,
# modify, copy, or redistribute it subject to the terms and conditions
@@ -17,6 +17,8 @@ SKIP_WITH_LVMPOLLD=1
. lib/inittest
+aux lvmconf "global/support_mirrored_mirror_log=1"
+
COMM() {
LAST_TEST="$*"
}
4 years, 11 months