mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Additional kernel target checks before pvmove & snapshot creation.
This commit is contained in:
parent
ea556d1ffe
commit
abaf083ddc
@ -1,3 +1,7 @@
|
||||
Version 2.00.17 -
|
||||
=============================
|
||||
Additional kernel target checks before pvmove & snapshot creation.
|
||||
|
||||
Version 2.00.16 - 24 May 2004
|
||||
=============================
|
||||
Set area_count within alloc_lv_segment.
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "toolcontext.h"
|
||||
#include "segtypes.h"
|
||||
#include "display.h"
|
||||
#include "activate.h"
|
||||
|
||||
/*
|
||||
* Replace any LV segments on given PV with temporary mirror.
|
||||
@ -42,6 +43,13 @@ int insert_pvmove_mirrors(struct cmd_context *cmd,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (activation() && segtype->ops->target_present &&
|
||||
!segtype->ops->target_present()) {
|
||||
log_error("%s: Required device-mapper target(s) not "
|
||||
"detected in your kernel", segtype->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Work through all segments on the supplied PV */
|
||||
list_iterate(segh, &lv->segments) {
|
||||
seg = list_item(segh, struct lv_segment);
|
||||
|
@ -246,6 +246,11 @@ static int _read_params(struct lvcreate_params *lp, struct cmd_context *cmd,
|
||||
}
|
||||
lp->chunk_size = 2 * arg_uint_value(cmd, chunksize_ARG, 8);
|
||||
log_verbose("Setting chunksize to %d sectors.", lp->chunk_size);
|
||||
|
||||
if (!(lp->segtype = get_segtype_from_string(cmd, "snapshot"))) {
|
||||
stack;
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
if (arg_count(cmd, chunksize_ARG)) {
|
||||
log_error("-c is only available with snapshots");
|
||||
|
Loading…
Reference in New Issue
Block a user