RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 995628 - LVM RAID: Unable to change recovery rate via 'lvchange'
Summary: LVM RAID: Unable to change recovery rate via 'lvchange'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jonathan Earl Brassow
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-09 21:49 UTC by Jonathan Earl Brassow
Modified: 2013-11-21 23:26 UTC (History)
10 users (show)

Fixed In Version: lvm2-2.02.100-1.el6
Doc Type: Bug Fix
Doc Text:
New feature in RHEL6.5 - no need to document it not working.
Clone Of:
Environment:
Last Closed: 2013-11-21 23:26:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1704 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2013-11-20 21:52:01 UTC

Description Jonathan Earl Brassow 2013-08-09 21:49:51 UTC
Should be able to change the recovery rates for all RAID types.

Actual results:
[~]# lvcreate --type raid5 -i 2 -L 500M -n raid5 vg
  Using default stripesize 64.00 KiB
  Rounding size (125 extents) up to stripe boundary size (126 extents).
  Logical volume "raid5" created

[~]# lvs -o name,segtype,raid_min_recovery_rate,raid_max_recovery_rate vg
  LV    Type  MinSync MaxSync
  raid5 raid5                

[~]# lvchange --minrecoveryrate 50 vg/raid5
  Need 1 or more of -a, -C, -M, -p, -r, -Z, --resync, --refresh, --alloc, --addtag, --deltag, --monitor, --poll or --discards
  Run `lvchange --help' for more information.


Expected results:
[root@bp-02 lvm2]# lvchange --minrecoveryrate 50 vg/raid5  Logical volume "raid5" changed.

[root@bp-02 lvm2]# lvs -o name,segtype,raid_min_recovery_rate,raid_max_recovery_rate vg
  LV    Type  MinSync MaxSync
  raid5 raid5      50        

[root@bp-02 lvm2]# lvchange --maxrecoveryrate 100 vg/raid5  Logical volume "raid5" changed.

[root@bp-02 lvm2]# lvs -o name,segtype,raid_min_recovery_rate,raid_max_recovery_rate vg
  LV    Type  MinSync MaxSync
  raid5 raid5      50     100
[root@bp-02 lvm2]# lvchange --maxrecoveryrate 10 vg/raid5  Minumum recovery rate cannot be higher than maximum.
[root@bp-02 lvm2]# lvchange --minrecoveryrate 200 vg/raid5
  Minumum recovery rate cannot be higher than maximum.

Comment 1 Jonathan Earl Brassow 2013-08-09 22:12:15 UTC
Fix committed upstream:

commit 8615234c0fa331852a11e1bf595bf1d4b858f4bc
Author: Jonathan Brassow <jbrassow>
Date:   Fri Aug 9 17:09:47 2013 -0500

    RAID: Fix bug making lvchange unable to change recovery rate for RAID
    
    1) Since the min|maxrecoveryrate args are size_kb_ARGs and they
       are recorded (and sent to the kernel) in terms of kB/sec/disk,
       we must back out the factor multiple done by size_kb_arg.  This
       is already performed by 'lvcreate' for these arguments.
    2) Allow all RAID types, not just RAID1, to change these values.
    3) Add min|maxrecoveryrate_ARG to the list of 'update_partial_unsafe'
       commands so that lvchange will not complain about needing at
       least one of a certain set of arguments and failing.
    4) Add tests that check that these values can be set via lvchange
       and lvcreate and that 'lvs' reports back the proper results.

Comment 3 Jonathan Earl Brassow 2013-08-12 19:15:27 UTC
Upstream commit failed to include the code changes.  It only included the unit tests...  Plz also grab the following commit:

commit bb457adbb6d625a5f942faf8498bb5ee87645ec3
Author: Jonathan Brassow <jbrassow>
Date:   Mon Aug 12 12:40:52 2013 -0500

    RAID: Fix bug making lvchange unable to change recovery rate for RAID
    
    Commit ID 8615234c0fa331852a11e1bf595bf1d4b858f4bc failed to include
    the actual code changes that were made to fix the bug.  Instead, all
    tests went in to validate the bug fix.  This patch adds the missing
    code changes.

Comment 5 Corey Marthaler 2013-10-18 21:33:11 UTC
Fix verified in the latest rpms.


2.6.32-410.el6.x86_64
lvm2-2.02.100-6.el6    BUILT: Wed Oct 16 07:26:00 CDT 2013
lvm2-libs-2.02.100-6.el6    BUILT: Wed Oct 16 07:26:00 CDT 2013
lvm2-cluster-2.02.100-6.el6    BUILT: Wed Oct 16 07:26:00 CDT 2013
udev-147-2.50.el6    BUILT: Fri Oct 11 05:58:10 CDT 2013
device-mapper-1.02.79-6.el6    BUILT: Wed Oct 16 07:26:00 CDT 2013
device-mapper-libs-1.02.79-6.el6    BUILT: Wed Oct 16 07:26:00 CDT 2013
device-mapper-event-1.02.79-6.el6    BUILT: Wed Oct 16 07:26:00 CDT 2013
device-mapper-event-libs-1.02.79-6.el6    BUILT: Wed Oct 16 07:26:00 CDT 2013
cmirror-2.02.100-6.el6    BUILT: Wed Oct 16 07:26:00 CDT 2013


[root@harding-02 ~]# lvcreate --type raid5 -i 2 -L 500M -n raid5 vg
  Using default stripesize 64.00 KiB
  Rounding size (125 extents) up to stripe boundary size (126 extents).
  Logical volume "raid5" created
[root@harding-02 ~]# lvs -a -o +devices
  LV               VG  Attr       LSize   Cpy%Sync Devices
  raid5            vg  rwi-a-r--- 504.00m   100.00 raid5_rimage_0(0),raid5_rimage_1(0),raid5_rimage_2(0)
  [raid5_rimage_0] vg  iwi-aor--- 252.00m          /dev/sdb1(1)
  [raid5_rimage_1] vg  iwi-aor--- 252.00m          /dev/sdb2(1)
  [raid5_rimage_2] vg  iwi-aor--- 252.00m          /dev/sdb3(1)
  [raid5_rmeta_0]  vg  ewi-aor---   4.00m          /dev/sdb1(0)
  [raid5_rmeta_1]  vg  ewi-aor---   4.00m          /dev/sdb2(0)
  [raid5_rmeta_2]  vg  ewi-aor---   4.00m          /dev/sdb3(0)

[root@harding-02 ~]# lvs -o name,segtype,raid_min_recovery_rate,raid_max_recovery_rate vg
  LV    Type  MinSync MaxSync
  raid5 raid5                

[root@harding-02 ~]# lvchange --minrecoveryrate 50 vg/raid5
  Logical volume "raid5" changed.
[root@harding-02 ~]# lvs -o name,segtype,raid_min_recovery_rate,raid_max_recovery_rate vg
  LV    Type  MinSync MaxSync
  raid5 raid5      50        

[root@harding-02 ~]# lvchange --maxrecoveryrate 100 vg/raid5
  Logical volume "raid5" changed.
[root@harding-02 ~]# lvs -o name,segtype,raid_min_recovery_rate,raid_max_recovery_rate vg
  LV    Type  MinSync MaxSync
  raid5 raid5      50     100

[root@harding-02 ~]# lvchange --maxrecoveryrate 10 vg/raid5
  Minumum recovery rate cannot be higher than maximum.
[root@harding-02 ~]# lvchange --minrecoveryrate 200 vg/raid5
  Minumum recovery rate cannot be higher than maximum.

Comment 6 errata-xmlrpc 2013-11-21 23:26:57 UTC
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.

http://rhn.redhat.com/errata/RHBA-2013-1704.html


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