1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Add missing LV error target activation in _remove_mirror_images.

This commit is contained in:
Alasdair Kergon 2008-09-18 19:09:47 +00:00
parent 08b481bbc5
commit 4bb7a2f523
2 changed files with 12 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.40 -
================================
Add missing LV error target activation in _remove_mirror_images.
Prevent resizing an LV while lvconvert is using it.
Avoid repeatedly wiping cache while VG_GLOBAL is held in vgscan & pvscan.
Fix pvresize to not allow resize if PV has two metadata areas.

View File

@ -552,6 +552,17 @@ static int _remove_mirror_images(struct logical_volume *lv,
log_very_verbose("Updating \"%s\" in kernel", mirrored_seg->lv->name);
/*
* Avoid having same mirror target loaded twice simultaneouly by first
* activating the removed LV which now contains an error segment.
* As it's now detached from mirrored_seg->lv we must activate it
* explicitly.
*/
if (lv1 && !activate_lv(lv1->vg->cmd, lv1)) {
log_error("Problem reactivating removed %s", lv1->name);
return 0;
}
if (!resume_lv(mirrored_seg->lv->vg->cmd, mirrored_seg->lv)) {
log_error("Problem reactivating %s", mirrored_seg->lv->name);
return 0;