You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.6 KiB
46 lines
1.6 KiB
6 years ago
|
WHATS_NEW | 1 +
|
||
|
lib/activate/activate.c | 5 +++++
|
||
|
lib/metadata/mirror.c | 2 +-
|
||
|
3 files changed, 7 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/WHATS_NEW b/WHATS_NEW
|
||
|
index 17aff08..6560357 100644
|
||
|
--- a/WHATS_NEW
|
||
|
+++ b/WHATS_NEW
|
||
|
@@ -1,5 +1,6 @@
|
||
|
Version 2.02.182 -
|
||
|
==============================
|
||
|
+ Fix lvconvert --splitmirror for mirror type (2.02.178).
|
||
|
Do not pair cache policy and cache metadata format.
|
||
|
|
||
|
Version 2.02.181 -
|
||
|
diff --git a/lib/activate/activate.c b/lib/activate/activate.c
|
||
|
index e38ab03..16704f6 100644
|
||
|
--- a/lib/activate/activate.c
|
||
|
+++ b/lib/activate/activate.c
|
||
|
@@ -2125,6 +2125,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)) &&
|
||
|
diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c
|
||
|
index 7f38d4f..c7d8a9e 100644
|
||
|
--- a/lib/metadata/mirror.c
|
||
|
+++ b/lib/metadata/mirror.c
|
||
|
@@ -786,7 +786,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;
|
||
|
}
|