summaryrefslogtreecommitdiff
path: root/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c
diff options
context:
space:
mode:
authorJonathan Brassow <jbrassow@redhat.com>2013-11-08 09:52:00 -0600
committerJonathan Brassow <jbrassow@redhat.com>2013-11-08 09:52:00 -0600
commit7de533ad12972f5a9c5bf2d2b477d8320f7e4a8e (patch)
tree1a674fd283f44e600af7a0b63466f4c271c5135e /daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c
parentb6b5299d1e1f6bdddb9bda30c4f37aaccbe3df44 (diff)
downloadlvm2-7de533ad12972f5a9c5bf2d2b477d8320f7e4a8e.tar.gz
mirror: Handle failures in tmp mirror used when up-converting.
Failures in the temporary mirror used when up-converting cause dmeventd to issue 'lvconvert --repair' on the sub-LV, <lv_name>_mimagetmp_?. The 'lvconvert' command refuses to deal with this sub-LV outright - it expects to be given the name of the top-level LV. So, just like we do with mirrored logs, we strip-off the portion of the name that is not the top-level LV and issue the command on the top-level LV instead.
Diffstat (limited to 'daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c')
-rw-r--r--daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c b/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c
index 5d5a46b80..6d2c3de21 100644
--- a/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c
+++ b/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c
@@ -159,8 +159,8 @@ int dmeventd_lvm2_command(struct dm_pool *mem, char *buffer, size_t size,
}
/* strip off the mirror component designations */
- layer = strstr(lv, "_mlog");
- if (layer)
+ if ((layer = strstr(lv, "_mimagetmp")) ||
+ (layer = strstr(lv, "_mlog")))
*layer = '\0';
r = dm_snprintf(buffer, size, "%s %s/%s", cmd, vg, lv);