Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1394048 - LVM RAID: Ability to reduce the size of a RAID LV
LVM RAID: Ability to reduce the size of a RAID LV
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2 (Show other bugs)
7.2
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Heinz Mauelshagen
cluster-qe@redhat.com
Steven J. Levine
: FutureFeature
Depends On:
Blocks: 1385242 1394039 1411727
  Show dependency treegraph
 
Reported: 2016-11-10 16:54 EST by Jonathan Earl Brassow
Modified: 2017-08-01 17:49 EDT (History)
10 users (show)

See Also:
Fixed In Version: lvm2-2.02.169-1.el7
Doc Type: Enhancement
Doc Text:
LVM supports reducing the size of a RAID logical volume As of Red Hat Enterprise Linux 7,4, you can use the "lvreduce" or "lvresize" command to reduce the size of a RAID logical volume.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-01 17:49:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2222 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2017-08-01 14:42:41 EDT

  None (edit)
Description Jonathan Earl Brassow 2016-11-10 16:54:18 EST
Currently, it is not possible to reduce the size of a RAID 4/5/6 LV.  This bug is a feature request to add that ability.
Comment 2 Heinz Mauelshagen 2016-11-16 12:12:59 EST
Prepared for review/integration as lvresize/lvreduce functionality on lvm2 upstream branch dev-lvmguy-raid-takeover-reshape-resize_work
Comment 4 Heinz Mauelshagen 2017-02-09 16:44:13 EST
Upstream commit 55eaabd1183042b8e03b3a969eadf624623c4b62
Comment 9 Roman Bednář 2017-04-18 04:38:20 EDT
Verified with latest rpms, ability to reduce size of raid has been added. 
Tested with raid0, raid1, raid4, raid5, raid6 and raid10.

# lvs
  LV     VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root   rhel_virt-145 -wi-ao----   6.70g                                                    
  swap   rhel_virt-145 -wi-ao---- 876.00m                                                    
  raid0  vg            rwi-a-r---   1.00g                                                    
  raid1  vg            rwi-a-r---   1.00g                                    100.00          
  raid10 vg            rwi-a-r---   1.00g                                    100.00          
  raid4  vg            rwi-a-r---   1.00g                                    100.00          
  raid5  vg            rwi-a-r---   1.00g                                    100.00          
  raid6  vg            rwi-a-r---   1.01g                                    100.00  
        
# for i in raid0 raid1 raid4 raid5 raid6 raid10; do lvreduce -L500M vg/$i --force;done
  WARNING: Reducing active logical volume to 500.00 MiB.
  THIS MAY DESTROY YOUR DATA (filesystem etc.)
  Size of logical volume vg/raid0 changed from 1.00 GiB (256 extents) to 500.00 MiB (125 extents).
  Logical volume vg/raid0 successfully resized.
  WARNING: Reducing active logical volume to 500.00 MiB.
  THIS MAY DESTROY YOUR DATA (filesystem etc.)
  Size of logical volume vg/raid1 changed from 1.00 GiB (256 extents) to 500.00 MiB (125 extents).
  Logical volume vg/raid1 successfully resized.
  WARNING: Reducing active logical volume to 500.00 MiB.
  THIS MAY DESTROY YOUR DATA (filesystem etc.)
  Size of logical volume vg/raid4 changed from 1.00 GiB (256 extents) to 500.00 MiB (125 extents).
  Logical volume vg/raid4 successfully resized.
  WARNING: Reducing active logical volume to 500.00 MiB.
  THIS MAY DESTROY YOUR DATA (filesystem etc.)
  Size of logical volume vg/raid5 changed from 1.00 GiB (256 extents) to 500.00 MiB (125 extents).
  Logical volume vg/raid5 successfully resized.
  WARNING: Reducing active logical volume to 500.00 MiB.
  THIS MAY DESTROY YOUR DATA (filesystem etc.)
  Size of logical volume vg/raid6 changed from 1.00 GiB (256 extents) to 500.00 MiB (125 extents).
  Logical volume vg/raid6 successfully resized.
  WARNING: Reducing active logical volume to 500.00 MiB.
  THIS MAY DESTROY YOUR DATA (filesystem etc.)
  Size of logical volume vg/raid10 changed from 1.00 GiB (256 extents) to 500.00 MiB (125 extents).
  Logical volume vg/raid10 successfully resized.

# lvs
  LV     VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root   rhel_virt-145 -wi-ao----   6.70g                                                    
  swap   rhel_virt-145 -wi-ao---- 876.00m                                                    
  raid0  vg            rwi-a-r--- 504.00m                                                    
  raid1  vg            rwi-a-r--- 500.00m                                    100.00          
  raid10 vg            rwi-a-r--- 504.00m                                    100.00          
  raid4  vg            rwi-a-r--- 504.00m                                    100.00          
  raid5  vg            rwi-a-r--- 504.00m                                    100.00          
  raid6  vg            rwi-a-r--- 504.00m                                    100.00  


3.10.0-640.el7.x86_64

lvm2-2.02.169-3.el7    BUILT: Wed Mar 29 16:17:46 CEST 2017
lvm2-libs-2.02.169-3.el7    BUILT: Wed Mar 29 16:17:46 CEST 2017
lvm2-cluster-2.02.169-3.el7    BUILT: Wed Mar 29 16:17:46 CEST 2017
device-mapper-1.02.138-3.el7    BUILT: Wed Mar 29 16:17:46 CEST 2017
device-mapper-libs-1.02.138-3.el7    BUILT: Wed Mar 29 16:17:46 CEST 2017
device-mapper-event-1.02.138-3.el7    BUILT: Wed Mar 29 16:17:46 CEST 2017
device-mapper-event-libs-1.02.138-3.el7    BUILT: Wed Mar 29 16:17:46 CEST 2017
device-mapper-persistent-data-0.7.0-0.1.rc6.el7    BUILT: Mon Mar 27 17:15:46 CEST 2017
cmirror-2.02.169-3.el7    BUILT: Wed Mar 29 16:17:46 CEST 2017
Comment 10 Steven J. Levine 2017-04-19 15:52:02 EDT
jbrassow:

As per our IRC discussion, I have marked this BZ for inclusion in the 7.4 release notes and I have written up a description.  Can you check that over to be sure it's correct?

Steven
Comment 11 Jonathan Earl Brassow 2017-04-19 16:16:14 EDT
(In reply to Steven J. Levine from comment #10)
> jbrassow:
> 
> As per our IRC discussion, I have marked this BZ for inclusion in the 7.4
> release notes and I have written up a description.  Can you check that over
> to be sure it's correct?
> 
> Steven

yes, looks fine.  A user can reduce the size of a RAID LV with 'lvreduce' or 'lvresize'.
Comment 12 Steven J. Levine 2017-04-19 16:26:22 EDT
I added lvresize to the description for the release notes.
Comment 13 errata-xmlrpc 2017-08-01 17:49:49 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2222

Note You need to log in before you can comment on or make changes to this bug.