Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1443636

Summary: lvcreate -R regionsize max is 8m (16384 sectors)?
Product: Red Hat Enterprise Linux 7 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Heinz Mauelshagen <heinzm>
lvm2 sub component: Mirroring and RAID QA Contact: cluster-qe <cluster-qe>
Status: CLOSED NOTABUG Docs Contact:
Severity: low    
Priority: unspecified CC: agk, heinzm, jbrassow, msnitzer, prajnoha, zkabelac
Version: 7.4   
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-20 13:23:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Corey Marthaler 2017-04-19 15:22:12 UTC
Description of problem:
I'm attempting to automate random raid region size alterations and found that the max value allowed during a create is 8m (16384 sectors * 512k) regardless of the value given, even if the value is allowed using the lvconvert cmd. Is this expected?


[root@host-127 ~]# lvcreate  --type raid4 -R 65536k -L 500M VG
  Using default stripesize 64.00 KiB.
  Rounding size 500.00 MiB (125 extents) up to stripe boundary size 504.00 MiB(126 extents).
  Using reduced mirror region size of 16384 sectors.
  Logical volume "lvol0" created.

[root@host-127 ~]# lvcreate  --type raid4 -R 32768k -L 500M VG
  Using default stripesize 64.00 KiB.
  Rounding size 500.00 MiB (125 extents) up to stripe boundary size 504.00 MiB(126 extents).
  Using reduced mirror region size of 16384 sectors.
  Logical volume "lvol1" created.

[root@host-127 ~]# lvcreate  --type raid4 -R 16384k -L 500M VG
  Using default stripesize 64.00 KiB.
  Rounding size 500.00 MiB (125 extents) up to stripe boundary size 504.00 MiB(126 extents).
  Using reduced mirror region size of 16384 sectors.
  Logical volume "lvol2" created.

[root@host-127 ~]# lvcreate  --type raid4 -R 8192k -L 500M VG
  Using default stripesize 64.00 KiB.
  Rounding size 500.00 MiB (125 extents) up to stripe boundary size 504.00 MiB(126 extents).
  Logical volume "lvol3" created.

[root@host-127 ~]# lvcreate  --type raid4 -R 4096k -L 500M VG
  Using default stripesize 64.00 KiB.
  Rounding size 500.00 MiB (125 extents) up to stripe boundary size 504.00 MiB(126 extents).
  Logical volume "lvol4" created.

[root@host-127 ~]# lvcreate  --type raid4 -R 2048k -L 500M VG
  Using default stripesize 64.00 KiB.
  Rounding size 500.00 MiB (125 extents) up to stripe boundary size 504.00 MiB(126 extents).
  Logical volume "lvol5" created.


[root@host-127 ~]# lvs -o +regionsize
  LV    VG  Attr       LSize   Cpy%Sync Region
  lvol0 VG  rwi-a-r--- 504.00m 100.00    8.00m
  lvol1 VG  rwi-a-r--- 504.00m 100.00    8.00m
  lvol2 VG  rwi-a-r--- 504.00m 100.00    8.00m
  lvol3 VG  rwi-a-r--- 504.00m 100.00    8.00m
  lvol4 VG  rwi-a-r--- 504.00m 100.00    4.00m
  lvol5 VG  rwi-a-r--- 504.00m 100.00    2.00m

[root@host-127 ~]# lvconvert  -R 65536k  VG/lvol0
Do you really want to change the region_size 8.00 MiB of LV VG/lvol0 to 64.00 MiB? [y/n]: y
  Changed region size on RAID LV VG/lvol0 to 64.00 MiB.
[root@host-127 ~]# lvconvert  -R 32768k  VG/lvol1
Do you really want to change the region_size 8.00 MiB of LV VG/lvol1 to 32.00 MiB? [y/n]: y
  Changed region size on RAID LV VG/lvol1 to 32.00 MiB.
[root@host-127 ~]# lvconvert  -R 16384k  VG/lvol2
Do you really want to change the region_size 8.00 MiB of LV VG/lvol2 to 16.00 MiB? [y/n]: y
  Changed region size on RAID LV VG/lvol2 to 16.00 MiB.

[root@host-127 ~]# lvs -o +regionsize
  LV    VG  Attr       LSize   Cpy%Sync Region
  lvol0 VG  rwi-a-r--- 504.00m 100.00   64.00m
  lvol1 VG  rwi-a-r--- 504.00m 100.00   32.00m
  lvol2 VG  rwi-a-r--- 504.00m 100.00   16.00m
  lvol3 VG  rwi-a-r--- 504.00m 100.00    8.00m
  lvol4 VG  rwi-a-r--- 504.00m 100.00    4.00m
  lvol5 VG  rwi-a-r--- 504.00m 100.00    2.00m


Version-Release number of selected component (if applicable):
3.10.0-651.el7.x86_64

lvm2-2.02.170-2.el7    BUILT: Thu Apr 13 14:37:43 CDT 2017
lvm2-libs-2.02.170-2.el7    BUILT: Thu Apr 13 14:37:43 CDT 2017
lvm2-cluster-2.02.170-2.el7    BUILT: Thu Apr 13 14:37:43 CDT 2017
device-mapper-1.02.139-2.el7    BUILT: Thu Apr 13 14:37:43 CDT 2017
device-mapper-libs-1.02.139-2.el7    BUILT: Thu Apr 13 14:37:43 CDT 2017
device-mapper-event-1.02.139-2.el7    BUILT: Thu Apr 13 14:37:43 CDT 2017
device-mapper-event-libs-1.02.139-2.el7    BUILT: Thu Apr 13 14:37:43 CDT 2017
device-mapper-persistent-data-0.7.0-0.1.rc6.el7    BUILT: Mon Mar 27 10:15:46 CDT 2017

Comment 2 Heinz Mauelshagen 2017-04-19 20:50:12 UTC
That is ok for such a small RaidLV.
Try a larger one to allow for larger regionsize.