mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-10 05:18:36 +03:00
When down-converting RAID1, don't activate sub-lvs between suspend/resume
of top-level LV. We can't activate sub-lv's that are being removed from a RAID1 LV while it is suspended. However, this is what was being used to have them show-up so we could remove them. 'sync_local_dev_names' is a sufficient and proper replacement and can be done after the top-level LV is resumed.
This commit is contained in:
parent
4332bb3951
commit
7058ed4431
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.88 -
|
Version 2.02.88 -
|
||||||
==================================
|
==================================
|
||||||
|
When down-converting RAID1, don't activate sub-lvs between suspend/resume
|
||||||
Add -V as short form of --virtualsize in lvcreate.
|
Add -V as short form of --virtualsize in lvcreate.
|
||||||
Fix make clean not to remove Makefile. (2.02.87)
|
Fix make clean not to remove Makefile. (2.02.87)
|
||||||
|
|
||||||
|
@ -488,22 +488,9 @@ int lv_raid_change_image_count(struct logical_volume *lv,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Bring extracted LVs into existance, so there are no
|
* Resume original LV
|
||||||
* conflicts for the main RAID device's resume
|
* This also resumes all other sub-lvs (including the extracted)
|
||||||
*/
|
*/
|
||||||
if (!dm_list_empty(&removal_list)) {
|
|
||||||
dm_list_iterate_items(lvl, &removal_list) {
|
|
||||||
/* If top RAID was EX, use EX */
|
|
||||||
if (lv_is_active_exclusive_locally(lv)) {
|
|
||||||
if (!activate_lv_excl(lv->vg->cmd, lvl->lv))
|
|
||||||
return_0;
|
|
||||||
} else {
|
|
||||||
if (!activate_lv(lv->vg->cmd, lvl->lv))
|
|
||||||
return_0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!resume_lv(lv->vg->cmd, lv)) {
|
if (!resume_lv(lv->vg->cmd, lv)) {
|
||||||
log_error("Failed to resume %s/%s after committing changes",
|
log_error("Failed to resume %s/%s after committing changes",
|
||||||
lv->vg->name, lv->name);
|
lv->vg->name, lv->name);
|
||||||
@ -513,6 +500,7 @@ int lv_raid_change_image_count(struct logical_volume *lv,
|
|||||||
/*
|
/*
|
||||||
* Eliminate the extracted LVs
|
* Eliminate the extracted LVs
|
||||||
*/
|
*/
|
||||||
|
sync_local_dev_names(lv->vg->cmd);
|
||||||
if (!dm_list_empty(&removal_list)) {
|
if (!dm_list_empty(&removal_list)) {
|
||||||
dm_list_iterate_items(lvl, &removal_list) {
|
dm_list_iterate_items(lvl, &removal_list) {
|
||||||
if (!deactivate_lv(lv->vg->cmd, lvl->lv))
|
if (!deactivate_lv(lv->vg->cmd, lvl->lv))
|
||||||
|
Loading…
Reference in New Issue
Block a user