diff --git a/WHATS_NEW b/WHATS_NEW index 02ac14afc..9d6f091a3 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.97 - =============================== + Skip activation when using vg/lvchange --sysinit -a ay and lvmetad is active. Fix extending RAID 4/5/6 logical volumes Fix test for PV with unknown VG in process_each_pv to ignore ignored mdas. Update man pages with --activate ay option and auto_activation_volume_list. diff --git a/man/lvchange.8.in b/man/lvchange.8.in index c7507d473..bf9ef480a 100644 --- a/man/lvchange.8.in +++ b/man/lvchange.8.in @@ -105,6 +105,11 @@ this is equivalent to using \fB\-\-ignorelockingfailure\fP, \fB\-\-ignoremonitoring\fP, \fB\-\-poll n\fP and setting \fBLVM_SUPPRESS_LOCKING_FAILURE_MESSAGES\fP environment variable. + +If \fB\-\-sysinit\fP is used in conjunction with lvmetad(8) enabled and running, +autoactivation is preferred over manual activation via direct lvchange call. +Logical volumes are autoactivated according to auto_activation_volume_list +set in lvm.conf(5). .TP .B \-\-noudevsync Disable udev synchronisation. The diff --git a/man/vgchange.8.in b/man/vgchange.8.in index 28e262361..0f5fc588c 100644 --- a/man/vgchange.8.in +++ b/man/vgchange.8.in @@ -121,6 +121,11 @@ this is equivalent to using .B \-\-poll n and setting \fBLVM_SUPPRESS_LOCKING_FAILURE_MESSAGES\fP environment variable. + +If \fB\-\-sysinit\fP is used in conjunction with lvmetad(8) enabled and running, +autoactivation is preferred over manual activation via direct vgchange call. +Logical volumes are autoactivated according to auto_activation_volume_list +set in lvm.conf(5). .TP .BR \-\-noudevsync Disable udev synchronisation. The diff --git a/tools/lvchange.c b/tools/lvchange.c index 9876847bb..9054ac785 100644 --- a/tools/lvchange.c +++ b/tools/lvchange.c @@ -798,6 +798,13 @@ int lvchange(struct cmd_context *cmd, int argc, char **argv) return EINVALID_CMD_LINE; } + if (arg_count(cmd, sysinit_ARG) && lvmetad_active() && + arg_uint_value(cmd, activate_ARG, 0) == CHANGE_AAY) { + log_warn("lvmetad is active while using --sysinit -a ay, " + "skipping manual activation"); + return ECMD_PROCESSED; + } + return process_each_lv(cmd, argc, argv, update ? READ_FOR_UPDATE : 0, NULL, &lvchange_single); diff --git a/tools/vgchange.c b/tools/vgchange.c index ebabb0885..2013447b0 100644 --- a/tools/vgchange.c +++ b/tools/vgchange.c @@ -608,6 +608,13 @@ int vgchange(struct cmd_context *cmd, int argc, char **argv) return EINVALID_CMD_LINE; } + if (arg_count(cmd, sysinit_ARG) && lvmetad_active() && + arg_uint_value(cmd, activate_ARG, 0) == CHANGE_AAY) { + log_warn("lvmetad is active while using --sysinit -a ay, " + "skipping manual activation"); + return ECMD_PROCESSED; + } + return process_each_vg(cmd, argc, argv, update ? READ_FOR_UPDATE : 0, NULL, &vgchange_single); }