mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
test: Drop --mirrorlog when not a mirror.
This commit is contained in:
parent
fc93085c7a
commit
175e0905d5
@ -97,7 +97,15 @@ test_lvconvert() {
|
|||||||
alloc="--alloc anywhere"
|
alloc="--alloc anywhere"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
lvconvert --type mirror -m $finish_count --mirrorlog $finish_log_type \
|
# --mirrorlog is invalid with -m0
|
||||||
|
if [ "$finish_count" -eq 0 ]; then
|
||||||
|
mirrorlog=""
|
||||||
|
finish_log_type=""
|
||||||
|
else
|
||||||
|
mirrorlog="--mirrorlog"
|
||||||
|
fi
|
||||||
|
|
||||||
|
lvconvert --type mirror -m $finish_count $mirrorlog $finish_log_type \
|
||||||
$vg/$lv1 $alloc
|
$vg/$lv1 $alloc
|
||||||
|
|
||||||
test $active || lvchange -aey $vg/$lv1
|
test $active || lvchange -aey $vg/$lv1
|
||||||
|
@ -1700,8 +1700,8 @@ static int _lvconvert_mirrors(struct cmd_context *cmd,
|
|||||||
uint32_t new_mimage_count;
|
uint32_t new_mimage_count;
|
||||||
uint32_t new_log_count;
|
uint32_t new_log_count;
|
||||||
|
|
||||||
if (*lp->type_str && strcmp(lp->type_str, SEG_TYPE_NAME_MIRROR)) {
|
if ((lp->corelog || lp->mirrorlog) && *lp->type_str && strcmp(lp->type_str, SEG_TYPE_NAME_MIRROR)) {
|
||||||
log_error("--corelog and --mirrorlog is only compatible with --type mirror");
|
log_error("--corelog and --mirrorlog are only compatible with mirror devices");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1894,7 +1894,7 @@ static int _lvconvert_raid(struct logical_volume *lv, struct lvconvert_params *l
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((lp->corelog || lp->mirrorlog) && strcmp(lp->type_str, SEG_TYPE_NAME_MIRROR)) {
|
if ((lp->corelog || lp->mirrorlog) && strcmp(lp->type_str, SEG_TYPE_NAME_MIRROR)) {
|
||||||
log_error("--corelog and --mirrorlog is only compatible with --type mirror");
|
log_error("--corelog and --mirrorlog are only compatible with mirror devices");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user