summaryrefslogtreecommitdiffstats
path: root/lib/metadata/raid_manip.c
diff options
context:
space:
mode:
authorJonathan Earl Brassow <jbrassow@redhat.com>2011-08-18 19:31:33 +0000
committerJonathan Earl Brassow <jbrassow@redhat.com>2011-08-18 19:31:33 +0000
commit63d32fb6a6e2d77d74967c7874595b0fe0e2dd0b (patch)
tree4351e5da254449a0618a6e59b92037f250bdcc9a /lib/metadata/raid_manip.c
parentf1c2a5af58c908a53aab695fa37a397b0a401133 (diff)
downloadlvm2-63d32fb6a6e2d77d74967c7874595b0fe0e2dd0b.tar.gz
lvm2-63d32fb6a6e2d77d74967c7874595b0fe0e2dd0b.tar.xz
lvm2-63d32fb6a6e2d77d74967c7874595b0fe0e2dd0b.zip
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.
Diffstat (limited to 'lib/metadata/raid_manip.c')
-rw-r--r--lib/metadata/raid_manip.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index 545c79bc..4a00820e 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -488,22 +488,9 @@ int lv_raid_change_image_count(struct logical_volume *lv,
}
/*
- * Bring extracted LVs into existance, so there are no
- * conflicts for the main RAID device's resume
+ * Resume original LV
+ * 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)) {
log_error("Failed to resume %s/%s after committing changes",
lv->vg->name, lv->name);
@@ -513,6 +500,7 @@ int lv_raid_change_image_count(struct logical_volume *lv,
/*
* Eliminate the extracted LVs
*/
+ sync_local_dev_names(lv->vg->cmd);
if (!dm_list_empty(&removal_list)) {
dm_list_iterate_items(lvl, &removal_list) {
if (!deactivate_lv(lv->vg->cmd, lvl->lv))