diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index e377cf878..97a4e3937 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -7149,6 +7149,12 @@ int wipe_lv(struct logical_volume *lv, struct wipe_params wp) /* nothing to do */ return 1; + if (!lv_is_active_locally(lv)) { + log_error("Volume \"%s/%s\" is not active locally (volume_list activation filter?).", + lv->vg->name, lv->name); + return 0; + } + /* Wait until devices are available */ if (!sync_local_dev_names(lv->vg->cmd)) { log_error("Failed to sync local devices before wiping LV %s.", @@ -7156,12 +7162,6 @@ int wipe_lv(struct logical_volume *lv, struct wipe_params wp) return 0; } - if (!lv_is_active_locally(lv)) { - log_error("Volume \"%s/%s\" is not active locally (volume_list activation filter?).", - lv->vg->name, lv->name); - return 0; - } - /* * FIXME: * also, more than 4k