mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
activate: skip manual activation for --sysinit -aay
When --sysinit -a ay is used with vg/lvchange and lvmetad is up and running, we should skip manual activation as that would be a useless step - all volumes are autoactivated once all the PVs for a VG are present. If lvmetad is not active at the time of the vgchange --sysinit -a ay call, the activation proceeds in standard 'manual' way. This way, we can still have vg/lvchange --sysinit -a ay called unconditionally in system initialization scripts no matter if lvmetad is used or not.
This commit is contained in:
parent
8767435ef8
commit
cd8ea8b437
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.97 -
|
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 extending RAID 4/5/6 logical volumes
|
||||||
Fix test for PV with unknown VG in process_each_pv to ignore ignored mdas.
|
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.
|
Update man pages with --activate ay option and auto_activation_volume_list.
|
||||||
|
@ -105,6 +105,11 @@ this is equivalent to using \fB\-\-ignorelockingfailure\fP,
|
|||||||
\fB\-\-ignoremonitoring\fP, \fB\-\-poll n\fP and setting
|
\fB\-\-ignoremonitoring\fP, \fB\-\-poll n\fP and setting
|
||||||
\fBLVM_SUPPRESS_LOCKING_FAILURE_MESSAGES\fP
|
\fBLVM_SUPPRESS_LOCKING_FAILURE_MESSAGES\fP
|
||||||
environment variable.
|
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
|
.TP
|
||||||
.B \-\-noudevsync
|
.B \-\-noudevsync
|
||||||
Disable udev synchronisation. The
|
Disable udev synchronisation. The
|
||||||
|
@ -121,6 +121,11 @@ this is equivalent to using
|
|||||||
.B \-\-poll n
|
.B \-\-poll n
|
||||||
and setting \fBLVM_SUPPRESS_LOCKING_FAILURE_MESSAGES\fP
|
and setting \fBLVM_SUPPRESS_LOCKING_FAILURE_MESSAGES\fP
|
||||||
environment variable.
|
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
|
.TP
|
||||||
.BR \-\-noudevsync
|
.BR \-\-noudevsync
|
||||||
Disable udev synchronisation. The
|
Disable udev synchronisation. The
|
||||||
|
@ -798,6 +798,13 @@ int lvchange(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
return EINVALID_CMD_LINE;
|
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,
|
return process_each_lv(cmd, argc, argv,
|
||||||
update ? READ_FOR_UPDATE : 0, NULL,
|
update ? READ_FOR_UPDATE : 0, NULL,
|
||||||
&lvchange_single);
|
&lvchange_single);
|
||||||
|
@ -608,6 +608,13 @@ int vgchange(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
return EINVALID_CMD_LINE;
|
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,
|
return process_each_vg(cmd, argc, argv, update ? READ_FOR_UPDATE : 0,
|
||||||
NULL, &vgchange_single);
|
NULL, &vgchange_single);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user