mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-21 22:04:19 +03:00
Disallow mirrored logs in cluster mirrors.
The cluster log daemon (cmirrord) is not multi-threaded and can handle only one request at a time. When a log is stacked on top of a mirror (which itself contains a 'core' log), it creates a situation that cannot be solved without threading. When the top level mirror issues a "resume", the log daemon attempts to read from the log device to retrieve the log state. However, the log is a mirror which, before issuing the read, attempts to determine the 'sync' status of the region of the mirror which is to be read. This sync status request cannot be completed by the daemon because it is blocked on a read I/O to the very mirror requesting the sync status.
This commit is contained in:
parent
855e4aac41
commit
0864378250
@ -1,5 +1,6 @@
|
||||
Version 2.02.73 -
|
||||
================================
|
||||
Disallow 'mirrored' log type for cluster mirrors.
|
||||
Do not use VPATH in include/Makefile.
|
||||
Fix exported_symbols generation to use standard compiler arguments.
|
||||
Use #include <> not "" in lvm2app.h which gets installed on the system.
|
||||
|
@ -1970,10 +1970,21 @@ int lv_add_mirrors(struct cmd_context *cmd, struct logical_volume *lv,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (vg_is_clustered(lv->vg) && !(lv->status & ACTIVATE_EXCL) &&
|
||||
!cluster_mirror_is_available(lv)) {
|
||||
log_error("Shared cluster mirrors are not available.");
|
||||
return 0;
|
||||
if (vg_is_clustered(lv->vg)) {
|
||||
if (!(lv->status & ACTIVATE_EXCL) &&
|
||||
!cluster_mirror_is_available(lv)) {
|
||||
log_error("Shared cluster mirrors are not available.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* No mirrored logs for cluster mirrors until
|
||||
* log daemon is multi-threaded.
|
||||
*/
|
||||
if (log_count > 1) {
|
||||
log_error("Log type, \"mirrored\", is unavailable to cluster mirrors");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* For corelog mirror, activation code depends on
|
||||
|
@ -919,6 +919,15 @@ static int _lvconvert_mirrors_parse_params(struct cmd_context *cmd,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* No mirrored logs for cluster mirrors until
|
||||
* log daemon is multi-threaded.
|
||||
*/
|
||||
if ((*new_log_count == 2) && vg_is_clustered(lv->vg)) {
|
||||
log_error("Log type, \"mirrored\", is unavailable to cluster mirrors");
|
||||
return 0;
|
||||
}
|
||||
|
||||
log_verbose("Setting logging type to %s", mirrorlog);
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user