Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c32efc7f7ed9fa32…
Commit: c32efc7f7ed9fa3257e667cd8b70d8a5c8379b4b
Parent: e09f8a82f19dde6ab56a678e7ba289a658445080
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Feb 27 13:32:00 2015 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Feb 27 13:32:00 2015 -0600
system_id: apply consistent naming
In log messages refer to it as system ID (not System ID).
Do not put quotes around the system_id string when printing.
On the command line use systemid.
In code, metadata, and config files use system_id.
In lvmsystemid refer to the concept/entity as system_id.
---
lib/commands/toolcontext.c | 4 ++--
lib/metadata/metadata.c | 8 ++++----
lib/metadata/vg.c | 2 +-
man/lvmsystemid.7.in | 2 +-
tools/lvmcmdline.c | 4 ++--
tools/pvscan.c | 2 +-
tools/toollib.c | 6 +++---
tools/vgchange.c | 10 +++++-----
8 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
index 1936ea7..25d9826 100644
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
@@ -80,7 +80,7 @@ const char *system_id_from_string(struct cmd_context *cmd, const char *str)
}
if (!strncmp(system_id, "localhost", 9)) {
- log_warn("WARNING: System ID may not begin with the string \"localhost\".");
+ log_warn("WARNING: system ID may not begin with the string \"localhost\".");
return NULL;
}
@@ -459,7 +459,7 @@ static int _init_system_id(struct cmd_context *cmd)
* The source failed to resolve a system_id. In this case allow
* VGs with no system_id to be accessed, but not VGs with a system_id.
*/
- log_warn("WARNING: No system ID found from system_id_source \"%s\".", source);
+ log_warn("WARNING: No system ID found from system_id_source %s.", source);
cmd->unknown_system_id = 1;
return 1;
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index 5ae3780..68651f5 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -4383,7 +4383,7 @@ static int _access_vg_systemid(struct cmd_context *cmd, struct volume_group *vg)
* LVM1 VGs must not be accessed if a new-style LVM2 system ID is set.
*/
if (cmd->system_id && systemid_on_pvs(vg)) {
- log_error("Cannot access VG %s with LVM1 system ID \"%s\" when host system ID is set.",
+ log_error("Cannot access VG %s with LVM1 system ID %s when host system ID is set.",
vg->name, vg->lvm1_system_id);
return 0;
}
@@ -4416,7 +4416,7 @@ static int _access_vg_systemid(struct cmd_context *cmd, struct volume_group *vg)
* Allow VG access if the local host has active LVs in it.
*/
if (lvs_in_vg_activated(vg)) {
- log_warn("WARNING: Found LVs active in VG %s with foreign system ID \"%s\". Possible data corruption.",
+ log_warn("WARNING: Found LVs active in VG %s with foreign system ID %s. Possible data corruption.",
vg->name, vg->system_id);
if (cmd->include_active_foreign_vgs)
return 1;
@@ -4427,7 +4427,7 @@ static int _access_vg_systemid(struct cmd_context *cmd, struct volume_group *vg)
* A host without a system_id cannot access a VG with a system_id.
*/
if (!cmd->system_id || cmd->unknown_system_id) {
- log_error("Cannot access VG %s with system id \"%s\" with unknown local system ID.",
+ log_error("Cannot access VG %s with system ID %s with unknown local system ID.",
vg->name, vg->system_id);
return 0;
}
@@ -4436,7 +4436,7 @@ static int _access_vg_systemid(struct cmd_context *cmd, struct volume_group *vg)
* Some commands always produce an error when accessing foreign VG.
*/
if (cmd->error_foreign_vgs) {
- log_error("Cannot access VG %s with system id \"%s\" with local system ID %s.",
+ log_error("Cannot access VG %s with system ID %s with local system ID %s.",
vg->name, vg->system_id, cmd->system_id);
return 0;
}
diff --git a/lib/metadata/vg.c b/lib/metadata/vg.c
index 0143b7b..446aa7c 100644
--- a/lib/metadata/vg.c
+++ b/lib/metadata/vg.c
@@ -611,7 +611,7 @@ int vg_set_system_id(struct volume_group *vg, const char *system_id)
}
if (systemid_on_pvs(vg)) {
- log_error("Metadata format %s does not support this type of system id.",
+ log_error("Metadata format %s does not support this type of system ID.",
vg->fid->fmt->name);
return 0;
}
diff --git a/man/lvmsystemid.7.in b/man/lvmsystemid.7.in
index 42eee31..c5e69be 100644
--- a/man/lvmsystemid.7.in
+++ b/man/lvmsystemid.7.in
@@ -1,7 +1,7 @@
.TH "LVMSYSTEMID" "7" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
.SH NAME
-lvmsystemid \(em LVM system id
+lvmsystemid \(em LVM system ID
.SH DESCRIPTION
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index 255fa41..f9acd60 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -981,7 +981,7 @@ int systemid(struct cmd_context *cmd __attribute__((unused)),
int argc __attribute__((unused)),
char **argv __attribute__((unused)))
{
- log_print("System ID: %s", cmd->system_id ? : "");
+ log_print("system ID: %s", cmd->system_id ? : "");
return ECMD_PROCESSED;
}
@@ -1468,7 +1468,7 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv)
init_dmeventd_monitor(monitoring);
log_debug("Processing: %s", cmd->cmd_line);
- log_debug("System ID: %s", cmd->system_id ? : "");
+ log_debug("system ID: %s", cmd->system_id ? : "");
#ifdef O_DIRECT_SUPPORT
log_debug("O_DIRECT will be used");
diff --git a/tools/pvscan.c b/tools/pvscan.c
index a04a4b2..5709172 100644
--- a/tools/pvscan.c
+++ b/tools/pvscan.c
@@ -43,7 +43,7 @@ static void _pvscan_display_single(struct cmd_context *cmd,
/* pv_show(pv); */
/* FIXME - Moved to Volume Group structure */
- /* log_print("System Id %s", pv->vg->system_id); */
+ /* log_print("system ID %s", pv->vg->system_id); */
/* log_print(" "); */
/* return; */
diff --git a/tools/toollib.c b/tools/toollib.c
index 7d1c380..19c23fe 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -200,7 +200,7 @@ static int _ignore_vg(struct volume_group *vg, const char *vg_name,
*/
if (read_error & FAILED_SYSTEMID) {
if (arg_vgnames && str_list_match_item(arg_vgnames, vg->name)) {
- log_error("Cannot access VG %s with system id \"%s\" with local system ID %s.",
+ log_error("Cannot access VG %s with system ID %s with local system ID %s.",
vg->name, vg->system_id, vg->cmd->system_id);
return 1;
} else {
@@ -758,7 +758,7 @@ int vgcreate_params_set_from_args(struct cmd_context *cmd,
/* A clustered VG has no system ID. */
if (vp_new->clustered) {
if (arg_is_set(cmd, systemid_ARG)) {
- log_error("System ID cannot be set on clustered Volume Groups.");
+ log_error("system ID cannot be set on clustered Volume Groups.");
return 0;
}
vp_new->system_id = NULL;
@@ -772,7 +772,7 @@ int vgcreate_params_set_from_args(struct cmd_context *cmd,
if (vp_new->system_id && cmd->system_id &&
strcmp(vp_new->system_id, cmd->system_id)) {
if (*vp_new->system_id)
- log_warn("VG with system ID \"%s\" might become inaccessible as local system ID is \"%s\"",
+ log_warn("VG with system ID %s might become inaccessible as local system ID is %s",
vp_new->system_id, cmd->system_id);
else
log_warn("WARNING: A VG without a system ID allows unsafe access from other hosts.");
diff --git a/tools/vgchange.c b/tools/vgchange.c
index bf3d97d..199ee82 100644
--- a/tools/vgchange.c
+++ b/tools/vgchange.c
@@ -516,7 +516,7 @@ static int _vgchange_system_id(struct cmd_context *cmd, struct volume_group *vg)
}
if (!strcmp(vg->system_id, system_id)) {
- log_error("Volume Group system ID is already \"%s\"", vg->system_id);
+ log_error("Volume Group system ID is already %s", vg->system_id);
return 0;
}
@@ -527,7 +527,7 @@ static int _vgchange_system_id(struct cmd_context *cmd, struct volume_group *vg)
if (!arg_count(cmd, yes_ARG) &&
yes_no_prompt("Remove system ID %s on volume group %s? [y/n]: ",
vg->system_id, vg->name) == 'n') {
- log_error("Volume group \"%s\" system ID not changed.", vg->name);
+ log_error("Volume group %s system ID not changed.", vg->name);
return 0;
}
} else {
@@ -537,7 +537,7 @@ static int _vgchange_system_id(struct cmd_context *cmd, struct volume_group *vg)
return 0;
}
- log_warn("WARNING: Requested system ID \"%s\" does not match local system ID \"%s\"",
+ log_warn("WARNING: Requested system ID %s does not match local system ID %s",
system_id, cmd->system_id);
log_warn("WARNING: Volume group %s might become inaccessible from this machine.",
vg->name);
@@ -545,13 +545,13 @@ static int _vgchange_system_id(struct cmd_context *cmd, struct volume_group *vg)
if (!arg_count(cmd, yes_ARG) &&
yes_no_prompt("Set foreign system ID %s on volume group %s? [y/n]: ",
system_id, vg->name) == 'n') {
- log_error("Volume group \"%s\" system ID not changed.", vg->name);
+ log_error("Volume group %s system ID not changed.", vg->name);
return 0;
}
}
}
- log_verbose("Changing system ID for VG %s: %s -> %s.",
+ log_verbose("Changing system ID for VG %s from %s to %s.",
vg->name, vg->system_id, system_id);
vg->system_id = system_id;
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=57e9e76da4a67895…
Commit: 57e9e76da4a678957e2db07a4b6b5f75385d4539
Parent: 379fb90b05b9fae0559fb697981198d8bb58e0f9
Author: Jose Castillo <jcastillo(a)redhat.com>
AuthorDate: Fri Feb 27 15:38:34 2015 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Fri Feb 27 15:38:34 2015 +0100
initscripts: lvm2-monitor: implement status action
Two new functions added in the init script: rh_status and rh_status_q.
First one to be used in status() and second one to be used in start(),
stop(), force_stop(). Check for 'dmeventd' added and print list of
lvs being monitored in status().
---
WHATS_NEW | 1 +
scripts/lvm2_monitoring_init_red_hat.in | 17 ++++++++++++++++-
2 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index bc2630c..87ea7b6 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.117 -
====================================
+ Implement status action for lvm2-monitor initscript to display monitored LVs.
Allow lvchange -p to change kernel state only if metadata state differs.
Fix incorrect persistent .cache after report with label fields only (2.02.106).
Reinstate PV tag recognition for pvs if reporting label fields only (2.02.105).
diff --git a/scripts/lvm2_monitoring_init_red_hat.in b/scripts/lvm2_monitoring_init_red_hat.in
index 44de07f..90b6edc 100644
--- a/scripts/lvm2_monitoring_init_red_hat.in
+++ b/scripts/lvm2_monitoring_init_red_hat.in
@@ -32,18 +32,28 @@
. /etc/init.d/functions
DAEMON=lvm2-monitor
+DMEVENTD_DAEMON=dmeventd
exec_prefix=@exec_prefix@
sbindir=@sbindir@
VGCHANGE=${sbindir}/vgchange
VGS=${sbindir}/vgs
+LVS=${sbindir}/lvs
LOCK_FILE="/var/lock/subsys/$DAEMON"
+PID_FILE="/var/run/dmeventd.pid"
WARN=1
export LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES=1
+rh_status() {
+ status -p $PID_FILE $DMEVENTD_DAEMON
+}
+
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
start()
{
ret=0
@@ -79,12 +89,14 @@ rtrn=1
# See how we were called.
case "$1" in
start)
+ rh_status_q && exit 0
start
rtrn=$?
[ $rtrn = 0 ] && touch $LOCK_FILE
;;
force-stop)
+ rh_status_q || exit 0
WARN=0
stop
rtrn=$?
@@ -92,6 +104,7 @@ case "$1" in
;;
stop)
+ rh_status_q || exit 0
test "$runlevel" = "0" && WARN=0
test "$runlevel" = "6" && WARN=0
stop
@@ -109,7 +122,9 @@ case "$1" in
;;
status)
- # TODO anyone with an idea how to dump monitored volumes?
+ rh_status
+ rtrn=$?
+ [ $rtrn = 0 ] && $LVS -S 'seg_monitor=monitored' -o lv_full_name,seg_monitor
;;
*)
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=379fb90b05b9fae0…
Commit: 379fb90b05b9fae0559fb697981198d8bb58e0f9
Parent: ee4cd2c73774feeef3794c24865add1c28adb946
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Fri Feb 27 14:52:31 2015 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Fri Feb 27 14:52:38 2015 +0100
cleanup: change check order in condition in _check_pv_list fn
"!dev_cache_get(argv[i], cmd->full_filter) && !rescan_done" --> "!rescan_done && !dev_cache_get(argv[i], cmd->full_filter)
Check the simple condition first (variable), then the function return value
(which in this case certainly takes more time to evaluate) - save some time.
---
tools/reporter.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/reporter.c b/tools/reporter.c
index 0e563ac..9bf366e 100644
--- a/tools/reporter.c
+++ b/tools/reporter.c
@@ -578,7 +578,7 @@ static void _check_pv_list(struct cmd_context *cmd, int argc, char **argv,
if (args_are_pvs && argc) {
for (i = 0; i < argc; i++) {
- if (!dev_cache_get(argv[i], cmd->full_filter) && !rescan_done) {
+ if (!rescan_done && !dev_cache_get(argv[i], cmd->full_filter)) {
cmd->filter->wipe(cmd->filter);
/* FIXME scan only one device */
lvmcache_label_scan(cmd, 0);
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9ea77b788b0822fe…
Commit: 9ea77b788b0822fe06e8efb92d13f80dbc62e351
Parent: 8bceb1e0bb460a728638aea179b000f07b4cbd0b
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Fri Feb 27 13:32:52 2015 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Fri Feb 27 13:39:25 2015 +0100
report: fix handling of reports with pure label fields
Two problems fixed by this patch:
- PV tags were not recognized at all when using them with pvs
report that has only label fields (regression since 2.02.105)
- incorrect persistent .cache file to be generated after pvs
report that has only label fields (regression since 2.02.106)
These bugs come from the transition from process_each_pv to
process_each_label introduced by commit
67a7b7a87da65b2350f975272e581be5f41976e0 and commit
490226fc475232e0b158cf9fdc8670a663da4efe and related.
---
WHATS_NEW | 2 ++
tools/reporter.c | 44 +++++++++++++++++++++++++++++++++++---------
2 files changed, 37 insertions(+), 9 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index f4c4cde..cc974a6 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,7 @@
Version 2.02.117 -
====================================
+ Fix incorrect persistent .cache after report with label fields only (2.02.106).
+ Reinstate PV tag recognition for pvs if reporting label fields only (2.02.105).
Rescan devices before vgimport with lvmetad so exported VG is seen.
Fix hang by adjusting cluster mirror regionsize, avoiding CPG msg limit.
Do not crash when --cachepolicy is given without --cachesettings.
diff --git a/tools/reporter.c b/tools/reporter.c
index 779e0bd..df5a58b 100644
--- a/tools/reporter.c
+++ b/tools/reporter.c
@@ -566,6 +566,39 @@ int report_for_selection(struct cmd_context *cmd,
return r;
}
+static void _check_pv_list(struct cmd_context *cmd, int argc, char **argv,
+ report_type_t *report_type, unsigned *args_are_pvs)
+{
+ unsigned i;
+ int rescan_done = 0;
+
+ *args_are_pvs = (*report_type == PVS ||
+ *report_type == LABEL ||
+ *report_type == PVSEGS) ? 1 : 0;
+
+ if (args_are_pvs && argc) {
+ for (i = 0; i < argc; i++) {
+ if (!dev_cache_get(argv[i], cmd->full_filter) && !rescan_done) {
+ cmd->filter->wipe(cmd->filter);
+ /* FIXME scan only one device */
+ lvmcache_label_scan(cmd, 0);
+ rescan_done = 1;
+ }
+ if (*argv[i] == '@') {
+ if (*report_type == LABEL)
+ *report_type = PVS;
+ /*
+ * If we changed the report_type and we did rescan,
+ * no need to iterate over dev list further - nothing
+ * else would change.
+ */
+ if (rescan_done)
+ break;
+ }
+ }
+ }
+}
+
static int _report(struct cmd_context *cmd, int argc, char **argv,
report_type_t report_type)
{
@@ -589,15 +622,8 @@ static int _report(struct cmd_context *cmd, int argc, char **argv,
quoted = find_config_tree_bool(cmd, report_quoted_CFG, NULL);
columns_as_rows = find_config_tree_bool(cmd, report_colums_as_rows_CFG, NULL);
- args_are_pvs = (report_type == PVS ||
- report_type == LABEL ||
- report_type == PVSEGS) ? 1 : 0;
-
- /*
- * FIXME Trigger scans based on unrecognised listed devices instead.
- */
- if (args_are_pvs && argc)
- cmd->filter->wipe(cmd->filter);
+ /* Check PV specifics and do extra changes/actions if needed. */
+ _check_pv_list(cmd, argc, argv, &report_type, &args_are_pvs);
switch (report_type) {
case DEVTYPES:
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8bceb1e0bb460a72…
Commit: 8bceb1e0bb460a728638aea179b000f07b4cbd0b
Parent: 0a19238aa30a3a594abaa544c4972c880cefafe1
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Fri Feb 27 08:53:15 2015 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Fri Feb 27 09:17:10 2015 +0100
conf: be more clear about wipe_signatures_when_zeroing_new_lvs option in comments
---
conf/example.conf.in | 27 +++++++++++++++++++++------
1 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/conf/example.conf.in b/conf/example.conf.in
index 1f10dad..51e8e85 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -330,13 +330,28 @@ allocation {
# to be recognized, it can take more time to complete the signature scan.
use_blkid_wiping = 1
- # Set to 1 to wipe any signatures found on newly-created Logical Volumes
- # automatically in addition to zeroing of the first KB on the LV
- # (controlled by the -Z/--zero y option).
- # The command line option -W/--wipesignatures takes precedence over this
- # setting.
- # The default is to wipe signatures when zeroing.
- #
+ # Set to 1 to detect any signatures found on newly-created Logical Volume
+ # whenever zeroing of the LV is done (zeroing is controlled by -Z/--zero
+ # option and if not specified, zeroing is used by default if possible).
+ #
+ # While zeroing simply overwrites first 4 KiB of the LV with zeroes without
+ # doing any signature detection, signature wiping goes beyond that and it
+ # can detect exact type and position of signature within the whole LV.
+ # As such, it provides cleaner LV for use after creation as all known
+ # signatures are wiped so that the LV is not claimed by other tools
+ # incorrectly by the existence of old signature from any previous use.
+ # The number of signatures that LVM can detect depends on detection
+ # code that is selected - see also use_blkid_wiping option.
+ #
+ # Wiping of each detected signature must be confirmed.
+ #
+ # The default is to wipe signatures when zeroing. The command line
+ # option -W/--wipesignatures takes precedence over this setting.
+ #
+ # Without this option set, signatures on newly-created Logical Volumes
+ # are never detected and wiped and you always need to use
+ # -W/--wipesignatures y option directly to enable this feature
+ # no matter whether zeroing is used or not.
wipe_signatures_when_zeroing_new_lvs = 1
# Set to 1 to guarantee that mirror logs will always be placed on
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=0a19238aa30a3a59…
Commit: 0a19238aa30a3a594abaa544c4972c880cefafe1
Parent: a432066c7c52f59b1d38fbef3896b3ff0c50100f
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Feb 26 16:06:32 2015 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Feb 26 16:33:36 2015 -0600
system_id: remove unwanted foreign error for some commands
Commands that can never use foreign VGs begin with
cmd->error_foreign_vgs = 1. This tells the vg_read
lib layer to print an error as soon as a foreign VG
is read.
The toollib process_each layer also prints an error if a
foreign VG is read, but is more selective about it. It
won't print an error if the command did not explicitly
name the foreign VG. We want to silently ignore foreign VGs
unless a command attempts to use one explicitly.
So, foreign VG errors are printed from two different layers:
vg_read (lower layer) and process_each (upper layer).
Commands that use toollib process_each, only want errors from
the process_each layer, not from both layers. So, process_each
disables the lower layer vg_read error message by setting
error_foreign_vgs = 0.
Commands that do not use toollib process_each, want errors
from the vg_read layer, otherwise they would get no error
message. The original cmd->error_foreign_vgs setting
enables this error.
(Commands that are allowed to operate on foreign VGs always
begin with cmd->error_foreign_vgs = 0, and all the commands
in this group use toollib process_each with the selective
error reporting.)
---
tools/toollib.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/tools/toollib.c b/tools/toollib.c
index 8b750d8..7d1c380 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -200,8 +200,8 @@ static int _ignore_vg(struct volume_group *vg, const char *vg_name,
*/
if (read_error & FAILED_SYSTEMID) {
if (arg_vgnames && str_list_match_item(arg_vgnames, vg->name)) {
- log_error("Skipping volume group %s with system ID %s",
- vg->name, vg->system_id ? : vg->lvm1_system_id ? : "");
+ log_error("Cannot access VG %s with system id \"%s\" with local system ID %s.",
+ vg->name, vg->system_id, vg->cmd->system_id);
return 1;
} else {
read_error &= ~FAILED_SYSTEMID; /* Check for other errors */
@@ -1877,6 +1877,8 @@ int process_each_vg(struct cmd_context *cmd, int argc, char **argv,
unsigned one_vgname_arg = (flags & ONE_VGNAME_ARG);
int ret;
+ cmd->error_foreign_vgs = 0;
+
dm_list_init(&arg_tags);
dm_list_init(&arg_vgnames);
dm_list_init(&vgnameids_on_system);
@@ -2277,6 +2279,8 @@ int process_each_lv(struct cmd_context *cmd, int argc, char **argv, uint32_t fla
int enable_all_vgs = (cmd->command->flags & ALL_VGS_IS_DEFAULT);
int ret;
+ cmd->error_foreign_vgs = 0;
+
dm_list_init(&arg_tags);
dm_list_init(&arg_vgnames);
dm_list_init(&arg_lvnames);
@@ -2761,6 +2765,8 @@ int process_each_pv(struct cmd_context *cmd,
int ret_max = ECMD_PROCESSED;
int ret;
+ cmd->error_foreign_vgs = 0;
+
dm_list_init(&arg_tags);
dm_list_init(&arg_pvnames);
dm_list_init(&arg_devices);