mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
Fix lvchange --test to exit cleanly.
This commit is contained in:
parent
b51cd542be
commit
cef065f63f
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.82 -
|
Version 2.02.82 -
|
||||||
===================================
|
===================================
|
||||||
|
Fix lvchange --test to exit cleanly.
|
||||||
Add change_tag to toollib.
|
Add change_tag to toollib.
|
||||||
Allow multiple pvchange command line options to be specified together.
|
Allow multiple pvchange command line options to be specified together.
|
||||||
Add -f (don't fork) option to clvmd and fix clvmd -d<num> description.
|
Add -f (don't fork) option to clvmd and fix clvmd -d<num> description.
|
||||||
|
@ -3321,6 +3321,11 @@ int lv_create_single(struct volume_group *vg,
|
|||||||
|
|
||||||
backup(vg);
|
backup(vg);
|
||||||
|
|
||||||
|
if (test_mode()) {
|
||||||
|
log_verbose("Test mode: Skipping activation and zeroing.");
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
init_dmeventd_monitor(lp->activation_monitoring);
|
init_dmeventd_monitor(lp->activation_monitoring);
|
||||||
|
|
||||||
if (lp->snapshot) {
|
if (lp->snapshot) {
|
||||||
@ -3399,6 +3404,7 @@ int lv_create_single(struct volume_group *vg,
|
|||||||
/* FIXME out of sequence */
|
/* FIXME out of sequence */
|
||||||
backup(vg);
|
backup(vg);
|
||||||
|
|
||||||
|
out:
|
||||||
log_print("Logical volume \"%s\" created", lv->name);
|
log_print("Logical volume \"%s\" created", lv->name);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -285,6 +285,11 @@ static int _init_mirror_log(struct cmd_context *cmd,
|
|||||||
uint64_t orig_status = log_lv->status;
|
uint64_t orig_status = log_lv->status;
|
||||||
int was_active = 0;
|
int was_active = 0;
|
||||||
|
|
||||||
|
if (test_mode()) {
|
||||||
|
log_verbose("Test mode: Skipping mirror log initialisation.");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (!activation() && in_sync) {
|
if (!activation() && in_sync) {
|
||||||
log_error("Aborting. Unable to create in-sync mirror log "
|
log_error("Aborting. Unable to create in-sync mirror log "
|
||||||
"while activation is disabled.");
|
"while activation is disabled.");
|
||||||
|
@ -51,7 +51,7 @@ void init_verbose(int level)
|
|||||||
void init_test(int level)
|
void init_test(int level)
|
||||||
{
|
{
|
||||||
if (!_test && level)
|
if (!_test && level)
|
||||||
log_print("Test mode: Metadata will NOT be updated.");
|
log_print("Test mode: Metadata will NOT be updated and volumes will not be (de)activated.");
|
||||||
_test = level;
|
_test = level;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user