]> sourceware.org Git - lvm2.git/commitdiff
pvmove: remove spurious "Skipping mirror LV" message on pvmove of clustered mirror
authorPeter Rajnoha <prajnoha@redhat.com>
Thu, 7 Aug 2014 13:23:58 +0000 (15:23 +0200)
committerPeter Rajnoha <prajnoha@redhat.com>
Thu, 7 Aug 2014 13:23:58 +0000 (15:23 +0200)
With cmirrord, we can do pvmove of clustered mirror. The code checking
suitability of LVs on the PV being moved issued a message if a mirror
LV was found and the VG was clustered. However, the actual pvmove did
work correctly.

The top-level mirror LV is actually skipped in the code since it's
always layered on top of internal LVs making up the mirror LV and for pvmove
we consider these internal devices only as they're actually layered on
top of concrete PVs then. But we don't need to issue any message here
about skipping the top-level mirror LV - it's misleading here.

WHATS_NEW
tools/pvmove.c

index afefd6e818c3ede8eb8b19634f84fed8edfd3e0d..028758efbbc97af186a55f032dae5ec233ba2691 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.110 -
 ==================================
+  Remove spurious "Skipping mirror LV" message on pvmove of clustered mirror.
 
 Version 2.02.109 - 5th August 2014
 ==================================
index c4c590b5f1fac34927b49423fe0e092a190f934c..3448af416a370f65657266725fd92dc570735b5c 100644 (file)
@@ -319,12 +319,15 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd,
                        continue;
 
                /*
-                * RAID, thin, mirror, and snapshot-related LVs are not
-                * processed in a cluster, so we don't have to worry about
-                * avoiding certain PVs in that context.
+                * RAID, thin and snapshot-related LVs are not
+                * processed in a cluster, so we don't have to
+                * worry about avoiding certain PVs in that context.
                 */
-               if (vg_is_clustered(lv->vg))
-                       continue;
+               if (vg_is_clustered(lv->vg)) {
+                       /* Allow clustered mirror, but not raid mirror. */
+                       if (!lv_is_mirror_type(lv) || lv_is_raid(lv))
+                               continue;
+               }
 
                if (!lv_is_on_pvs(lv, source_pvl))
                        continue;
@@ -391,8 +394,7 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd,
                 */
                if (vg_is_clustered(vg) &&
                    (lv_is_origin(lv) || lv_is_cow(lv) ||
-                    lv_is_thin_type(lv) || lv_is_raid_type(lv) ||
-                    lv_is_mirrored(lv))) {
+                    lv_is_thin_type(lv) || lv_is_raid_type(lv))) {
                        log_print_unless_silent("Skipping %s LV %s",
                                                lv_is_origin(lv) ? "origin" :
                                                lv_is_cow(lv) ?
@@ -405,11 +407,7 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd,
                                                seg_is_raid(first_seg(lv)) ?
                                                "RAID" :
                                                lv_is_raid_type(lv) ?
-                                               "RAID-related" :
-                                               lv_is_mirrored(lv) ?
-                                               "mirror" :
-                                               lv_is_mirror_type(lv) ?
-                                               "mirror-related" : "",
+                                               "RAID-related" : "",
                                                lv->name);
                        lv_skipped = 1;
                        continue;
This page took 0.055662 seconds and 5 git commands to generate.