1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

lvconvert: correct test support for vdo-pool

This commit is contained in:
Zdenek Kabelac 2022-08-11 11:44:58 +02:00
parent 12ffa753f6
commit d0697be500
3 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.03.17 -
===============================
Fix lvconvert --test --type vdo-pool execution.
Add json_std output format for more JSON standard compliant version of output.
Fix vdo_slab_size_mb value for converted VDO volume.

View File

@ -424,7 +424,9 @@ struct logical_volume *convert_vdo_pool_lv(struct logical_volume *data_lv,
/* Format data LV as VDO volume */
if (format) {
if (!_format_vdo_pool_data_lv(data_lv, vtp, &vdo_logical_size)) {
if (test_mode()) {
log_verbose("Test mode: Skipping formating of VDO pool volume.");
} else if (!_format_vdo_pool_data_lv(data_lv, vtp, &vdo_logical_size)) {
log_error("Cannot format VDO pool volume %s.", display_lvname(data_lv));
return NULL;
}

View File

@ -5480,7 +5480,9 @@ static int _lvconvert_to_vdopool_single(struct cmd_context *cmd,
}
if (vdo_pool_zero) {
if (!wipe_lv(lv, (struct wipe_params) { .do_zero = 1, .do_wipe_signatures = 1,
if (test_mode()) {
log_verbose("Test mode: Skipping activation, zeroing and signature wiping.");
} else if (!wipe_lv(lv, (struct wipe_params) { .do_zero = 1, .do_wipe_signatures = 1,
.yes = arg_count(cmd, yes_ARG),
.force = arg_count(cmd, force_ARG)})) {
log_error("Aborting. Failed to wipe VDO data store.");