mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
Do not allow creating mirrors of more than 8 images.
This is kernel limitation in all kernel versions, so better detect this early.
This commit is contained in:
parent
16e033b91a
commit
5800aa5c07
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.57 -
|
Version 2.02.57 -
|
||||||
====================================
|
====================================
|
||||||
|
Do not allow creating mirrors of more than 8 images.
|
||||||
Use locking_type 3 (compiled in cluster locking) in lvmconf.
|
Use locking_type 3 (compiled in cluster locking) in lvmconf.
|
||||||
Remove duplicate dm_list macros and functions.
|
Remove duplicate dm_list macros and functions.
|
||||||
Log failure type and recognise type 'F' (flush) in dmeventd mirror plugin.
|
Log failure type and recognise type 'F' (flush) in dmeventd mirror plugin.
|
||||||
|
@ -47,6 +47,7 @@
|
|||||||
#define DEFAULT_MIRRORLOG "disk"
|
#define DEFAULT_MIRRORLOG "disk"
|
||||||
#define DEFAULT_MIRROR_LOG_FAULT_POLICY "allocate"
|
#define DEFAULT_MIRROR_LOG_FAULT_POLICY "allocate"
|
||||||
#define DEFAULT_MIRROR_DEV_FAULT_POLICY "remove"
|
#define DEFAULT_MIRROR_DEV_FAULT_POLICY "remove"
|
||||||
|
#define DEFAULT_MIRROR_MAX_IMAGES 8 /* limited by kernel DM_KCOPYD_MAX_REGIONS */
|
||||||
#define DEFAULT_DMEVENTD_MIRROR_LIB "libdevmapper-event-lvm2mirror.so"
|
#define DEFAULT_DMEVENTD_MIRROR_LIB "libdevmapper-event-lvm2mirror.so"
|
||||||
#define DEFAULT_DMEVENTD_MONITOR 1
|
#define DEFAULT_DMEVENTD_MONITOR 1
|
||||||
|
|
||||||
|
@ -571,6 +571,12 @@ static int _lvconvert_mirrors(struct cmd_context *cmd, struct logical_volume *lv
|
|||||||
else
|
else
|
||||||
lp->mirrors += 1;
|
lp->mirrors += 1;
|
||||||
|
|
||||||
|
if (lp->mirrors > DEFAULT_MIRROR_MAX_IMAGES) {
|
||||||
|
log_error("Only up to %d images in mirror supported currently.",
|
||||||
|
DEFAULT_MIRROR_MAX_IMAGES);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (repair) {
|
if (repair) {
|
||||||
cmd->handles_missing_pvs = 1;
|
cmd->handles_missing_pvs = 1;
|
||||||
cmd->partial_activation = 1;
|
cmd->partial_activation = 1;
|
||||||
|
@ -500,6 +500,12 @@ static int _lvcreate_params(struct lvcreate_params *lp,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (lp->mirrors > DEFAULT_MIRROR_MAX_IMAGES) {
|
||||||
|
log_error("Only up to %d images in mirror supported currently.",
|
||||||
|
DEFAULT_MIRROR_MAX_IMAGES);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read ahead.
|
* Read ahead.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user