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 1367935 - raid0|raid0_meta create attempt w/ '-i 1' (or no -i flag which currently defaults to '-i 1') fails w/ "LV segments corrupted"
Summary: raid0|raid0_meta create attempt w/ '-i 1' (or no -i flag which currently defa...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.3
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Heinz Mauelshagen
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-17 21:34 UTC by Corey Marthaler
Modified: 2021-09-03 12:39 UTC (History)
8 users (show)

Fixed In Version: lvm2-2.02.164-3.el7
Doc Type: No Doc Update
Doc Text:
Intra-release bug, no documentation needed.
Clone Of:
Environment:
Last Closed: 2016-11-04 04:17:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1445 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2016-11-03 13:46:41 UTC

Description Corey Marthaler 2016-08-17 21:34:53 UTC
Description of problem:
[root@host-123 ~]# vgcreate foo /dev/sd[abcdefgh]1
  Volume group "foo" successfully created

[root@host-123 ~]# lvcreate --type raid0 -n testA -L 32M -i 1 foo
  LV testA invalid: zero stripe size for raid0 segment
  LV testA invalid: non power of 2 stripe size (is 0) for raid0 segment
  Internal error: LV segments corrupted in testA.

[root@host-123 ~]# lvcreate --type raid0_meta -n testA -L 32M -i 1 foo
  LV testA invalid: zero stripe size for raid0_meta segment
  LV testA invalid: non power of 2 stripe size (is 0) for raid0_meta segment
  Internal error: LV segments corrupted in testA.

[root@host-123 ~]# lvcreate --type raid0_meta -n testA -L 32M foo
  LV testA invalid: zero stripe size for raid0_meta segment
  LV testA invalid: non power of 2 stripe size (is 0) for raid0_meta segment
  Internal error: LV segments corrupted in testA.

[root@host-123 ~]# lvcreate --type raid0 -n testA -L 32M foo
  LV testA invalid: zero stripe size for raid0 segment
  LV testA invalid: non power of 2 stripe size (is 0) for raid0 segment
  Internal error: LV segments corrupted in testA.

[root@host-123 ~]# lvcreate -i 1 -n testA -L 32M foo
  Logical volume "testA" created.

[root@host-123 ~]# lvs -a -o +devices
  LV    VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices       
  testA foo           -wi-a-----  32.00m                                                     /dev/sda1(0)


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

lvm2-2.02.164-2.el7    BUILT: Tue Aug 16 05:43:50 CDT 2016
lvm2-libs-2.02.164-2.el7    BUILT: Tue Aug 16 05:43:50 CDT 2016
lvm2-cluster-2.02.164-2.el7    BUILT: Tue Aug 16 05:43:50 CDT 2016
device-mapper-1.02.133-2.el7    BUILT: Tue Aug 16 05:43:50 CDT 2016
device-mapper-libs-1.02.133-2.el7    BUILT: Tue Aug 16 05:43:50 CDT 2016
device-mapper-event-1.02.133-2.el7    BUILT: Tue Aug 16 05:43:50 CDT 2016
device-mapper-event-libs-1.02.133-2.el7    BUILT: Tue Aug 16 05:43:50 CDT 2016
device-mapper-persistent-data-0.6.3-1.el7    BUILT: Fri Jul 22 05:29:13 CDT 2016
cmirror-2.02.164-2.el7    BUILT: Tue Aug 16 05:43:50 CDT 2016
sanlock-3.4.0-1.el7    BUILT: Fri Jun 10 11:41:03 CDT 2016
sanlock-lib-3.4.0-1.el7    BUILT: Fri Jun 10 11:41:03 CDT 2016
lvm2-lockd-2.02.164-2.el7    BUILT: Tue Aug 16 05:43:50 CDT 2016

Comment 1 Heinz Mauelshagen 2016-08-17 21:39:06 UTC
lvcreate doesn't set a default for stripe_size, hence the failure in vg metadata validation (vg_validate()).

Comment 2 Alasdair Kergon 2016-08-22 12:23:17 UTC
Firstly, for now we are requiring a minimum of 2 stripes for raid0 and raid0_meta.

The stripe size logic is fixed.

# ./lvm lvcreate vg1 --type raid0_meta -L16M
  Using default stripesize 64.00 KiB.
  Logical volume "lvol3" created.

# ./lvm lvcreate vg1 --type raid0 -L16M
  Using default stripesize 64.00 KiB. 
  Logical volume "lvol4" created.

# ./lvm lvcreate vg1 --type raid0 -L16M -i1
  Using default stripesize 64.00 KiB.
  Minimum of 2 stripes required for raid0.
  Run `lvcreate --help' for more information.

Comment 4 Corey Marthaler 2016-08-26 17:26:16 UTC
Fix verified in the latest rpms.


lvm2-2.02.164-3.el7    BUILT: Wed Aug 24 05:20:41 CDT 2016
lvm2-libs-2.02.164-3.el7    BUILT: Wed Aug 24 05:20:41 CDT 2016
lvm2-cluster-2.02.164-3.el7    BUILT: Wed Aug 24 05:20:41 CDT 2016



[root@host-117 ~]# lvcreate --type raid0_meta -n testA -L 32M -i 0 test
  --stripes may not be zero.
  Run `lvcreate --help' for more information.
[root@host-117 ~]# lvcreate --type raid0 -n testA -L 32M -i 0 test
  --stripes may not be zero.
  Run `lvcreate --help' for more information.

[root@host-117 ~]# lvcreate --type raid0 -n testA -L 32M -i 1 test
  Using default stripesize 64.00 KiB.
  Minimum of 2 stripes required for raid0.
  Run `lvcreate --help' for more information.
[root@host-117 ~]# lvcreate --type raid0_meta -n testA -L 32M -i 1 test
  Using default stripesize 64.00 KiB.
  Minimum of 2 stripes required for raid0_meta.
  Run `lvcreate --help' for more information.

[root@host-117 ~]# lvcreate --type raid0_meta -n testA -L 32M test
  Using default stripesize 64.00 KiB.
  Logical volume "testA" created.
[root@host-117 ~]# lvcreate --type raid0 -n testB -L 32M test
  Using default stripesize 64.00 KiB.
  Logical volume "testB" created.

[root@host-117 ~]# lvs -a -o +devices
  LV               VG    Attr       LSize   Devices
  testA            test  rwi-a-r---  32.00m testA_rimage_0(0),testA_rimage_1(0)
  [testA_rimage_0] test  iwi-aor---  16.00m /dev/sda1(1)
  [testA_rimage_1] test  iwi-aor---  16.00m /dev/sdb1(1)
  [testA_rmeta_0]  test  ewi-aor---   4.00m /dev/sda1(0)
  [testA_rmeta_1]  test  ewi-aor---   4.00m /dev/sdb1(0)
  testB            test  rwi-a-r---  32.00m testB_rimage_0(0),testB_rimage_1(0)
  [testB_rimage_0] test  iwi-aor---  16.00m /dev/sda1(5)
  [testB_rimage_1] test  iwi-aor---  16.00m /dev/sdb1(5)

Comment 6 errata-xmlrpc 2016-11-04 04:17:55 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.

https://rhn.redhat.com/errata/RHBA-2016-1445.html


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