1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-06 17:18:29 +03:00

lvconvert: correct test support for vdo-pool

(cherry picked from commit d0697be500)
This commit is contained in:
Zdenek Kabelac 2022-08-11 11:44:58 +02:00 committed by Marian Csontos
parent 87904fbbb8
commit 7394382550
3 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,7 @@
Version 2.03.17 -
===============================
Fix lvconvert --test --type vdo-pool execution.
Version 2.03.14 - 20th October 2021
===================================
Device scanning is skipping directories on different filesystems.

View File

@ -392,7 +392,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

@ -5482,7 +5482,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.");