1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Disallow 'mirrored' log for cluster mirrors.

Git commit ID 0864378250 was meant to disallow
'mirrored' logs for cluster mirrors.  However, when add_mirror_log is used
to create the log (as is now the case when using 'lvcreate' or converting only
the log) the check is bypassed.

This patch adds the check to add_mirror_log.
This commit is contained in:
Jonathan Earl Brassow 2011-10-25 13:17:04 +00:00
parent eafbdf3029
commit 682309e0b8
2 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.89 -
==================================
Fix regression that allowed mirrored logs for cluster mirrors.
Don't print char type[8] as a plain string in pvck PV type.
Use vg memory pool implicitely for vg read.
Always use vg memory pool for allocated lv segment.

View File

@ -1898,6 +1898,11 @@ int add_mirror_log(struct cmd_context *cmd, struct logical_volume *lv,
unsigned old_log_count;
int r = 0;
if (vg_is_clustered(lv->vg) && (log_count > 1)) {
log_error("Log type, \"mirrored\", is unavailable to cluster mirrors");
return 0;
}
if (dm_list_size(&lv->segments) != 1) {
log_error("Multiple-segment mirror is not supported");
return 0;