]> sourceware.org Git - lvm2.git/commitdiff
Don't allow size change of RAID LV that is tracking changes for a split image
authorJonathan Earl Brassow <jbrassow@redhat.com>
Thu, 1 Dec 2011 00:13:16 +0000 (00:13 +0000)
committerJonathan Earl Brassow <jbrassow@redhat.com>
Thu, 1 Dec 2011 00:13:16 +0000 (00:13 +0000)
  Don't allow size change of RAID sub-LVs independently

WHATS_NEW
tools/lvresize.c

index 9c1f364131c8ecfe131981a96b6d0f2b0f17ecee..ed652f7dc24212d721275176aec3ad06b300d3fd 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,7 +1,9 @@
 Version 2.02.89 - 
 ==================================
-  Don't allow name change of RAID LV while tracking a split image.
-  Do not allow users to change the name of RAID sub-LVs
+  Don't allow size change of RAID LV that is tracking changes for a split image
+  Don't allow size change of RAID sub-LVs independently
+  Don't allow name change of RAID LV that is tracking changes for a split image
+  Do not allow users to change the name of RAID sub-LVs independently
   Do not allow users to change permissions on RAID sub-LVs
   Support the ability to replace specific devices in a RAID array via lvconvert.
   Add activation/use_linear_target enabled by default.
index 6107843a03dded06ecf19f620fc63e4e569b8419..20ea366a465cdf95d2088c8b09e7199b2d6ed48f 100644 (file)
@@ -361,6 +361,19 @@ static int _lvresize(struct cmd_context *cmd, struct volume_group *vg,
                return ECMD_FAILED;
        }
 
+       if (lvl->lv->status & (RAID_IMAGE | RAID_META)) {
+               log_error("Cannot resize a RAID %s directly",
+                         (lvl->lv->status & RAID_IMAGE) ? "image" :
+                         "metadata area");
+               return ECMD_FAILED;
+       }
+
+       if (lv_is_raid_with_tracking(lvl->lv)) {
+               log_error("Cannot resize %s while it is tracking a split image",
+                         lvl->lv->name);
+               return ECMD_FAILED;
+       }
+
        if (arg_count(cmd, stripes_ARG)) {
                if (vg->fid->fmt->features & FMT_SEGMENTS)
                        lp->stripes = arg_uint_value(cmd, stripes_ARG, 1);
This page took 0.043665 seconds and 5 git commands to generate.