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 1373628

Summary: mirror and raid1 segtypes should behave the same when down-converting w/ a specified not-in-use PV
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 WONTFIX Docs Contact:
Severity: low    
Priority: unspecified CC: agk, heinzm, jbrassow, msnitzer, prajnoha, prockai, zkabelac
Version: 7.3   
Target Milestone: rc   
Target Release: 7.7   
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: 2018-10-24 12:39:14 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 2016-09-06 19:12:06 UTC
Description of problem:


# RAID
[root@host-123 ~]# lvcreate -m 1 --type raid1 -L 100M test
  Logical volume "lvol0" created.
[root@host-123 ~]# lvs -a -o +devices
  LV               VG    Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Devices                            
  lvol0            test  rwi-a-r--- 100.00m                                    100.00   lvol0_rimage_0(0),lvol0_rimage_1(0)
  [lvol0_rimage_0] test  iwi-aor--- 100.00m                                             /dev/sda1(1)                       
  [lvol0_rimage_1] test  iwi-aor--- 100.00m                                             /dev/sdb1(1)                       
  [lvol0_rmeta_0]  test  ewi-aor---   4.00m                                             /dev/sda1(0)                       
  [lvol0_rmeta_1]  test  ewi-aor---   4.00m                                             /dev/sdb1(0)                       

[root@host-123 ~]# lvconvert -m 0 --type raid1 test/lvol0 /dev/sdFAKE
  Physical Volume "/dev/sdFAKE" not found in Volume Group "test".
[root@host-123 ~]# lvconvert -m 0 --type mirror test/lvol0 /dev/sdFAKE
  Physical Volume "/dev/sdFAKE" not found in Volume Group "test".
[root@host-123 ~]# lvconvert -m 0 --type raid1 test/lvol0 /dev/sdc1
  Unable to extract enough images to satisfy request
  Failed to extract images from test/lvol0
[root@host-123 ~]# lvconvert -m 0 --type mirror test/lvol0 /dev/sdc1
  Unable to extract enough images to satisfy request
  Failed to extract images from test/lvol0



# MIRROR
[root@host-123 ~]# lvcreate -m 1 --type mirror -L 100M test
  Logical volume "lvol0" created.
[root@host-123 ~]# lvs -a -o +devices
  LV               VG    Attr       LSize   Pool Origin Data%  Meta%  Move Log          Cpy%Sync Devices                            
  lvol0            test  mwi-a-m--- 100.00m                                [lvol0_mlog] 100.00   lvol0_mimage_0(0),lvol0_mimage_1(0)
  [lvol0_mimage_0] test  iwi-aom--- 100.00m                                                      /dev/sda1(0)                       
  [lvol0_mimage_1] test  iwi-aom--- 100.00m                                                      /dev/sdb1(0)                       
  [lvol0_mlog]     test  lwi-aom---   4.00m                                                      /dev/sdh1(0)                       

[root@host-123 ~]# lvconvert -m 0 --type raid1 test/lvol0 /dev/sdFAKE
  Physical Volume "/dev/sdFAKE" not found in Volume Group "test".
[root@host-123 ~]# lvconvert -m 0 --type mirror test/lvol0 /dev/sdFAKE
  Physical Volume "/dev/sdFAKE" not found in Volume Group "test".

# shouldn't this also fail?
[root@host-123 ~]# lvconvert -m 0 --type raid1 test/lvol0 /dev/sdc1
  Logical volume test/lvol0 converted.



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

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
device-mapper-1.02.133-3.el7    BUILT: Wed Aug 24 05:20:41 CDT 2016
device-mapper-libs-1.02.133-3.el7    BUILT: Wed Aug 24 05:20:41 CDT 2016
device-mapper-event-1.02.133-3.el7    BUILT: Wed Aug 24 05:20:41 CDT 2016
device-mapper-event-libs-1.02.133-3.el7    BUILT: Wed Aug 24 05:20:41 CDT 2016
device-mapper-persistent-data-0.6.3-1.el7    BUILT: Fri Jul 22 05:29:13 CDT 2016

Comment 3 Jonathan Earl Brassow 2017-05-10 15:29:51 UTC
unable to prioritize this "nice-to-have" bug for 7.4 - moving to 7.5