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 1511047 - LVM RAID: internal error when performing take-over
Summary: LVM RAID: internal error when performing take-over
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Heinz Mauelshagen
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-08 15:36 UTC by Jonathan Earl Brassow
Modified: 2021-09-03 12:41 UTC (History)
9 users (show)

Fixed In Version: lvm2-2.02.176-4.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 15:22:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0853 0 None None None 2018-04-10 15:23:07 UTC

Description Jonathan Earl Brassow 2017-11-08 15:36:54 UTC
See last command for 'internal error'.  Read the rest for how I got there and other feedback.

[root@bp-01 ~]# lvcreate -L 1G -n lv vg
  Logical volume "lv" created.

# this could print clearer message
[root@bp-01 ~]# lvconvert --type striped vg/lv
  Unknown operation on striped or linear LV vg/lv.

[root@bp-01 ~]# lvconvert --type raid1 -m 1 vg/lv
Are you sure you want to convert linear LV vg/lv to raid1 with 2 images enhancing resilience? [y/n]: y
  Logical volume vg/lv successfully converted.

[root@bp-01 ~]# lvconvert --type raid5 -i 2 vg/lv
  Using default stripesize 64.00 KiB.
Are you sure you want to convert raid1 LV vg/lv to raid5 type? [y/n]: y
  Logical volume vg/lv successfully converted.

[root@bp-01 ~]# lvs -o name,segtype,copypercent vg
  LV   Type  Cpy%Sync
  lv   raid5 100.00

[root@bp-01 ~]# lvconvert --type raid0 -i 2 vg/lv
  Using default stripesize 64.00 KiB.
  Unable to convert LV vg/lv from raid5 to raid0.
  Converting vg/lv from raid5 (same as raid5_ls) is directly possible to the following layouts:
    raid5_n
    raid5_la
    raid5_ra
    raid5_rs
    raid6_ls_6
    raid1

[root@bp-01 ~]# lvconvert --type raid5_n -i 2 vg/lv
  Using default stripesize 64.00 KiB.
  Converting raid5 (same as raid5_ls) LV vg/lv to raid5_n.
Are you sure you want to convert raid5 LV vg/lv? [y/n]: y
  Logical volume vg/lv successfully converted.

[root@bp-01 ~]# lvs -o name,segtype,copypercent vg
  LV   Type    Cpy%Sync
  lv   raid5_n 100.00

# Note the internal error...
[root@bp-01 ~]# lvconvert --type raid0 -i 2 vg/lv
  Using default stripesize 64.00 KiB.
Are you sure you want to convert raid5_n LV vg/lv to raid0 type? [y/n]: y
  Internal error: Unable to remove RAID layer from segment type raid5_n.
  Failed to remove RAID layer after linear conversion.

Comment 3 Heinz Mauelshagen 2017-11-08 16:51:48 UTC
Fixed in uptsream commit 763db8aab02d7df551a3e8500d261ef6c9651bdb.

[root@vm254 ~]# lvs -aoname,size,attr,segtype,datastripes,syncpercent,reshapelen,devices,data_offset nvm
  LV           LSize   Attr       Type    #DStr Cpy%Sync RSize Devices                     DOff
  r            256.00m rwi-a-r--- raid5_n     1 100.00      0  r_rimage_0(0),r_rimage_1(0)    0
  [r_rimage_0] 256.00m iwi-aor--- linear      1             0  /dev/sda(0)                    0
  [r_rimage_1] 256.00m iwi-aor--- linear      1             0  /dev/sdb(1)                    0
  [r_rmeta_0]    1.00m ewi-aor--- linear      1                /dev/sda(256)                   
  [r_rmeta_1]    1.00m ewi-aor--- linear      1                /dev/sdb(0)                     
[root@vm254 ~]# lvconvert -y --ty raid0 nvm/r
  Using default stripesize 64.00 KiB.
  Can't convert raid5_n LV nvm/r to raid0 with < 3 legs.

Comment 4 Jonathan Earl Brassow 2017-11-14 21:01:28 UTC
confirmed:

[root@bp-01 lvm2]# lvconvert --type raid0 -i 2 vg/lv
  Using default stripesize 64.00 KiB.
Are you sure you want to convert raid5_n LV vg/lv to raid0 type? [y/n]: y
  Can't convert raid5_n LV vg/lv to raid0 with < 3 legs.

Comment 6 Corey Marthaler 2017-12-13 21:28:47 UTC
# Marking this verified in the latest rpms with two caveat RFEs to be filed as a result.

lvm2-2.02.176-5.el7    BUILT: Wed Dec  6 04:13:07 CST 2017
lvm2-libs-2.02.176-5.el7    BUILT: Wed Dec  6 04:13:07 CST 2017
lvm2-cluster-2.02.176-5.el7    BUILT: Wed Dec  6 04:13:07 CST 2017
lvm2-lockd-2.02.176-5.el7    BUILT: Wed Dec  6 04:13:07 CST 2017
lvm2-python-boom-0.8.1-5.el7    BUILT: Wed Dec  6 04:15:40 CST 2017
cmirror-2.02.176-5.el7    BUILT: Wed Dec  6 04:13:07 CST 2017
device-mapper-1.02.145-5.el7    BUILT: Wed Dec  6 04:13:07 CST 2017
device-mapper-libs-1.02.145-5.el7    BUILT: Wed Dec  6 04:13:07 CST 2017
device-mapper-event-1.02.145-5.el7    BUILT: Wed Dec  6 04:13:07 CST 2017
device-mapper-event-libs-1.02.145-5.el7    BUILT: Wed Dec  6 04:13:07 CST 2017
device-mapper-persistent-data-0.7.0-0.1.rc6.el7    BUILT: Mon Mar 27 10:15:46 CDT 2017




[root@mckinley-03 ~]# lvcreate -L 1G -n lv vg
  Logical volume "lv" created.
 
[root@mckinley-03 ~]# lvconvert --type raid1 -m 1 vg/lv
Are you sure you want to convert linear LV vg/lv to raid1 with 2 images enhancing resilience? [y/n]: y
  Logical volume vg/lv successfully converted.
 
 
# The "-i 2" in all the commands in the original report i believe was a red herring as the user really meant "--stripes 2", which in most cases would have produced a "-stripes not allowed for LV when converting", That said it doesn't always appear which should be new RFE to be fixed for all cases
[root@mckinley-03 ~]# lvconvert --type raid5 --stripes 2 vg/lv
  Using default stripesize 64.00 KiB.
  --stripes not allowed for LV vg/lv when converting from raid1 to raid5.
  Converting vg/lv from raid1 is directly possible to the following layouts:
    mirror
    raid4
    raid5_n
    raid5_la
    raid5_ls
    raid5_ra
    raid5_rs
 
[root@mckinley-03 ~]# lvconvert --type raid5 vg/lv
  Using default stripesize 64.00 KiB.
Are you sure you want to convert raid1 LV vg/lv to raid5 type? [y/n]: y
 
 Logical volume vg/lv successfully converted.
[root@mckinley-03 ~]# lvs -o name,segtype,copypercent,data_stripes vg
  LV   Type  Cpy%Sync #DStr
  lv   raid5 100.00       1
 
# Now here, one would expect the same "--stripes not allowed for LV when converting" warning like above, first RFE
[root@mckinley-03 ~]# lvconvert --type raid0 --stripes 2 vg/lv
  Using default stripesize 64.00 KiB.
  Unable to convert LV vg/lv from raid5 to raid0.
  Converting vg/lv from raid5 (same as raid5_ls) is directly possible to the following layouts:
    raid5_n
    raid5_la
    raid5_ra
    raid5_rs
    raid6_ls_6
    raid1
[root@mckinley-03 ~]# lvconvert --type raid0 vg/lv
  Using default stripesize 64.00 KiB.
  Unable to convert LV vg/lv from raid5 to raid0.
  Converting vg/lv from raid5 (same as raid5_ls) is directly possible to the following layouts:
    raid5_n
    raid5_la
    raid5_ra
    raid5_rs
    raid6_ls_6
    raid1
 
# Again, where's the "--stripes not allowed for LV when converting" warning like above
[root@mckinley-03 ~]# lvconvert --type raid5_n --stripes 2 vg/lv
  Using default stripesize 64.00 KiB.
  Invalid conversion request on vg/lv.
 
[root@mckinley-03 ~]# lvconvert --type raid5_n vg/lv
  Using default stripesize 64.00 KiB.
  Converting raid5 (same as raid5_ls) LV vg/lv to raid5_n.
Are you sure you want to convert raid5 LV vg/lv? [y/n]: y
  Logical volume vg/lv successfully converted.
 
[root@mckinley-03 ~]# lvs -o name,segtype,copypercent,data_stripes vg
  LV   Type    Cpy%Sync #DStr
  lv   raid5_n 100.00       1
 
# Here's that warning again like expected "--stripes not allowed for LV when converting"
[root@mckinley-03 ~]#  lvconvert --type raid0 --stripes 2 vg/lv
  Using default stripesize 64.00 KiB.
  --stripes not allowed for LV vg/lv when converting from raid5_n to raid0.
  WARNING: ignoring --stripes option on takeover of vg/lv (reshape afterwards).
  Converting vg/lv from raid5_n is directly possible to the following layouts:
    raid0
    raid0_meta
    striped
    raid4
    raid6_n_6
    raid5_la
    raid5_ls
    raid5_ra
    raid5_rs
    raid1
 
# Here's that warning again like expected "--stripes not allowed for LV when converting"
[root@mckinley-03 ~]#  lvconvert --type raid0 --stripes 20 vg/lv
  Using default stripesize 64.00 KiB.
  --stripes not allowed for LV vg/lv when converting from raid5_n to raid0.
  WARNING: ignoring --stripes option on takeover of vg/lv (reshape afterwards).
  Converting vg/lv from raid5_n is directly possible to the following layouts:
    raid0
    raid0_meta
    striped
    raid4
    raid6_n_6
    raid5_la
    raid5_ls
    raid5_ra
    raid5_rs
    raid1
 
# Now, w/o the stripes flag, we see the fix to this bug, *however* why don't we see a "Convert raid5_n LV vg/lv to minimum N stripes first (i.e. --stripes N-1)." message like all other attempts? second RFE
[root@mckinley-03 ~]#  lvconvert --type raid0 vg/lv
  Using default stripesize 64.00 KiB.
Are you sure you want to convert raid5_n LV vg/lv to raid0 type? [y/n]: y
  Can't convert raid5_n LV vg/lv to raid0 with < 3 legs.
 
# These other attempts don't first ask "Are you sure you want to..." before failing, they mention you need to bump up the number of stripes first.
[root@mckinley-03 ~]#  lvconvert --type raid6 vg/lv
  Using default stripesize 64.00 KiB.
  Convert raid5_n LV vg/lv to minimum 4 stripes first (i.e. --stripes 3).
  Converting vg/lv from raid5_n is directly possible to the following layouts:
    raid0
    raid0_meta
    striped
    raid4
    raid6_n_6
    raid5_la
    raid5_ls
    raid5_ra
    raid5_rs
    raid1
[root@mckinley-03 ~]#  lvconvert --type raid10 vg/lv
  Using default stripesize 64.00 KiB.
  Convert raid5_n LV vg/lv to minimum 3 stripes first (i.e. --stripes 2).
  Converting vg/lv from raid5_n is directly possible to the following layouts:
    raid0
    raid0_meta
    striped
    raid4
    raid6_n_6
    raid5_la
    raid5_ls
    raid5_ra
    raid5_rs
    raid1

Comment 9 errata-xmlrpc 2018-04-10 15:22:16 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://access.redhat.com/errata/RHEA-2018:0853


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