mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
mirror: fix splitmirrors for mirror type
With improved mirror activation code --splitmirror issue poppedup since there was missing proper preload code and deactivation for splitted mirror leg.
This commit is contained in:
parent
c34291e3bf
commit
acab591378
@ -1,5 +1,6 @@
|
||||
Version 3.0.0
|
||||
=============
|
||||
Fix lvconvert --splitmirror for mirror type (2.02.178).
|
||||
Do not pair cache policy and cache metadata format.
|
||||
lvconvert: reject conversions on raid1 LVs with split tracked SubLVs
|
||||
lvconvert: reject conversions on raid1 split tracked SubLVs
|
||||
|
@ -2001,6 +2001,11 @@ static int _preload_detached_lv(struct logical_volume *lv, void *data)
|
||||
!lv_is_raid_metadata(lv_pre) && lv_is_active(lv) &&
|
||||
!_lv_preload(lv_pre, detached->laopts, detached->flush_required))
|
||||
return_0;
|
||||
} else if (lv_is_mirror_image(lv)) {
|
||||
if ((lv_pre = find_lv_in_vg_by_lvid(detached->lv_pre->vg, &lv->lvid)) &&
|
||||
!lv_is_mirror_image(lv_pre) && lv_is_active(lv) &&
|
||||
!_lv_preload(lv_pre, detached->laopts, detached->flush_required))
|
||||
return_0;
|
||||
}
|
||||
|
||||
if (!lv_is_visible(lv) && (lv_pre = find_lv(detached->lv_pre->vg, lv->name)) &&
|
||||
|
@ -774,7 +774,7 @@ static int _split_mirror_images(struct logical_volume *lv,
|
||||
|
||||
act = lv_is_active(lv_lock_holder(lv));
|
||||
|
||||
if (act && !_activate_lv_like_model(lv, new_lv)) {
|
||||
if (act && (!deactivate_lv(cmd, new_lv) || !_activate_lv_like_model(lv, new_lv))) {
|
||||
log_error("Failed to rename newly split LV in the kernel");
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user