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 1720705

Summary: lvconvert fails to upconvert to striped 'mirror' leg
Product: Red Hat Enterprise Linux 8 Reporter: Heinz Mauelshagen <heinzm>
Component: lvm2Assignee: Heinz Mauelshagen <heinzm>
lvm2 sub component: Mirroring and RAID QA Contact: cluster-qe <cluster-qe>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: agk, heinzm, jbrassow, mcsontos, msnitzer, prajnoha, rbednar, rhandlin, zkabelac
Version: 8.0Flags: pm-rhel: mirror+
Target Milestone: rc   
Target Release: 8.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lvm2-2.03.05-2.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-05 22:35:15 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:
Bug Depends On:    
Bug Blocks: 1494135, 1513771    

Description Heinz Mauelshagen 2019-06-14 15:15:05 UTC
Description of problem:
lvconvert used to support upconverting a linear LV to a 2-legged 'mirror' in RHEL6 with the 2nd legged striped with 'lvconvert --type mirror --mirrors 1 --stripes 4 $LV'

Version-Release number of selected component (if applicable):
lvm 2.03.02(2)-RHEL8 / kernel 4.18.0-100.el8.x86_64

How reproducible:
Alsways

Steps to Reproduce:
1. Run lvconvert as above with enough free PVs and space
2.
3.

Actual results:
Fails with 'Command does not accept option: --stripes 4.'

Expected results:
Should create the 2nd leg striped as before.

Additional info:

Comment 1 Heinz Mauelshagen 2019-06-14 15:21:33 UTC
2-legged 'mirror' resulting from RHEL6 'lvconvert --type mirrro --mirrors 1 --stripes 4 t/t' activated ok on RHEL8:
[root@vm147 ~]# lvs -aoname,size,attr,segtype,devices t
  LV           LSize   Attr       Type    Devices                                        
  t            512.00m mwi-a-m--- mirror  t_mimage_0(0),t_mimage_1(0)                    
  [t_mimage_0] 512.00m iwi-aom--- linear  /dev/sda(0)                                    
  [t_mimage_1] 512.00m iwi-aom--- striped /dev/sdb(0),/dev/sdc(0),/dev/sdd(0),/dev/sde(0)
  [t_mlog]       4.00m lwi-aom--- linear  /dev/sdg(0)                                    

Downconvert to linear on RHEL8:
[root@vm147 ~]# lvconvert -m0 t/t
  Logical volume t/t converted.
[root@vm147 ~]# lvs -aoname,size,attr,segtype,devices t
  LV   LSize   Attr       Type   Devices    
  t    512.00m -wi-a----- linear /dev/sda(0)

RHEL8 regression rejecting --stripes:
[root@vm147 ~]# lvconvert --ty mirror -m1 --stripes 4 t/t
  Command does not accept option: --stripes 4.

Because the 'mirror' LV ca be activated fine, I assume it's the CLI changes which don't allow this 2nd striped leg creation any more by rejecting the --stripes option during upconvert from linear.

[root@vm147 ~]# uname -r
4.18.0-100.el8.x86_64
[root@vm147 ~]# lvm version
  LVM version:     2.03.02(2)-RHEL8 (2019-01-04)
  Library version: 1.02.155-RHEL8 (2019-01-04)
  Driver version:  4.40.0
  Configuration:   ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm --with-default-pid-dir=/run --with-default-locking-dir=/run/lock/lvm --with-usrlibdir=/usr/lib64 --enable-fsadm --enable-write_install --with-user= --with-group= --with-device-uid=0 --with-device-gid=6 --with-device-mode=0660 --enable-pkgconfig --enable-cmdlib --enable-dmeventd --enable-blkid_wiping --with-cluster=internal --enable-cmirrord --with-udevdir=/usr/lib/udev/rules.d --enable-udev_sync --with-thin=internal --with-cache=internal --enable-lvmpolld --enable-lvmlockd-dlm --enable-lvmlockd-sanlock --enable-dbus-service --enable-notify-dbus --enable-dmfilemapd --with-vdo=internal --with-vdo-format=/usr/bin/vdoformat --disable-silent-rules

Comment 2 Heinz Mauelshagen 2019-07-08 17:16:29 UTC
As we had the logic to add striped 'mirror' legs before and we regressed during the command line rework, enable it again.

lvm2 stable commit e3c8cebd87f9bd7591529f3d65783cc6f1fd3f92

Comment 3 Jonathan Earl Brassow 2019-07-08 22:50:52 UTC
does this 8.1 fix also apply to https://bugzilla.redhat.com/show_bug.cgi?id=1513771 ?

Comment 4 Roman Bednář 2019-07-24 11:01:06 UTC
Adding QA ack for 8.1

Comment 6 Roman Bednář 2019-08-13 13:37:53 UTC
Verified.

# lvconvert --type mirror --mirrors 1 --stripes 4 vg/lv
  Using default stripesize 64.00 KiB.
  Logical volume vg/lv being converted.
  vg/lv: Converted: 0.78%
  vg/lv: Converted: 100.00%


lvm2-2.03.05-2.el8.x86_64

Comment 9 errata-xmlrpc 2019-11-05 22:35:15 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/RHBA-2019:3654