From: Peter Rajnoha Date: Thu, 29 Aug 2024 11:57:52 +0000 (+0200) Subject: lvresize: ignore given stripe and stripe size args for raid0 X-Git-Tag: v2_03_27~57 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=83ae675f8df53010c984b78d0318d0d92d5ac83a;p=lvm2.git lvresize: ignore given stripe and stripe size args for raid0 --- diff --git a/WHATS_NEW b/WHATS_NEW index ddab5e0d7..c63ea566f 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.03.27 - ================== + Ignore -i|--stripes, -I|--stripesize for lvextend on raid0 LV, like raid10. Do not accept duplicate device names for pvcreate. Version 2.03.26 - 23rd August 2024 diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index cb77ee77e..523e780d7 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -5458,6 +5458,9 @@ static int _lvresize_adjust_extents(struct logical_volume *lv, /* FIXME Warn if command line values are being overridden? */ lp->stripes = seg_last->area_count / seg_mirrors; lp->stripe_size = seg_last->stripe_size; + } else if (seg_is_raid0(seg_last)) { + lp->stripes = seg_last->area_count; + lp->stripe_size = seg_last->stripe_size; } else if (!(lp->stripes == 1 || (lp->stripes > 1 && lp->stripe_size))) { /* If extending, find stripes, stripesize & size of last segment */ /* FIXME Don't assume mirror seg will always be AREA_LV */