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.
[RFE] $lvconvert -m 0 should print warnings while unmirror the device from the mirroring and it should remove the device which mention in the lvconvert command only not the all device or any other devices
Description of problem:
$lvconvert -m 0 command should print warnings while unmirror the device from the mirroring and it should only remove the device which mention in the lvconvert command not the all device or any other devices.
Version-Release number of selected component (if applicable):
RHEL ALL
How reproducible:
Steps to Reproduce:
1. I mirrored sdf and sdc and the original was on sdd and sdb
I ran the command to remove FROM sdb and sdf (instead of sdd) and it removed it from sdf and sdc, the new mirror.
[root@rhel8-3 ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sdb vgapp lvm2 a-- 100.00m 0
/dev/sdc vgapp lvm2 a-- 100.00m 100.00m
/dev/sdd vgapp lvm2 a-- 100.00m 0
/dev/sdf vgapp lvm2 a-- 100.00m 100.00m
[root@rhel8-3 ~]# lvs --all --segments -o lv_name,vg_name,stripes,segtype,seg_size,copy_percent,devices vgapp
LV VG #Str Type SSize Cpy%Sync Devices
lvapplication vgapp 1 linear 100.00m /dev/sdb(0)
lvapplication vgapp 1 linear 100.00m /dev/sdd(0)
--> Added /dev/sdf & /dev/sdc
[root@rhel8-3 ~]# lvconvert -m 1 --type mirror --mirrorlog core /dev/vgapp/lvapplication /dev/sdf /dev/sdc
Logical volume vgapp/lvapplication being converted.
vgapp/lvapplication: Converted: 8.00%
vgapp/lvapplication: Converted: 100.00%
[root@rhel8-3 ~]# lvs --all --segments -o lv_name,vg_name,stripes,segtype,seg_size,copy_percent,devices vgapp
LV VG #Str Type SSize Cpy%Sync Devices
lvapplication vgapp 2 mirror 200.00m 100.00 lvapplication_mimage_0(0),lvapplication_mimage_1(0)
[lvapplication_mimage_0] vgapp 1 linear 100.00m /dev/sdb(0)
[lvapplication_mimage_0] vgapp 1 linear 100.00m /dev/sdd(0)
[lvapplication_mimage_1] vgapp 1 linear 100.00m /dev/sdf(0)
[lvapplication_mimage_1] vgapp 1 linear 100.00m /dev/sdc(0)
--> I ran the command to remove from the /dev/sdb and /dev/sdf
[root@rhel8-3 ~]# lvconvert -m 0 /dev/vgapp/lvapplication /dev/sdb /dev/sdf
Logical volume vgapp/lvapplication converted.
-->But it removed it from sdf and sdc, the new mirror instead of /dev/sdb.
[root@rhel8-3 ~]# lvs --all --segments -o lv_name,vg_name,stripes,segtype,seg_size,copy_percent,devices vgapp
LV VG #Str Type SSize Cpy%Sync Devices
lvapplication vgapp 1 linear 100.00m /dev/sdb(0)
lvapplication vgapp 1 linear 100.00m /dev/sdd(0)
[root@rhel8-3 ~]#
2. Second example
I mirrored to sdf and sdc again and then unmirrored from just one of the old disks, sdb, and it removed the mirror from sdf and sdc again.
[root@rhel8-3 ~]# lvconvert -m 1 --type mirror --mirrorlog core /dev/vgapp/lvapplication /dev/sdf /dev/sdc
Logical volume vgapp/lvapplication being converted.
vgapp/lvapplication: Converted: 8.00%
vgapp/lvapplication: Converted: 100.00%
[root@rhel8-3 ~]# lvs --all --segments -o lv_name,vg_name,stripes,segtype,seg_size,copy_percent,devices vgapp
LV VG #Str Type SSize Cpy%Sync Devices
lvapplication vgapp 2 mirror 200.00m 100.00 lvapplication_mimage_0(0),lvapplication_mimage_1(0)
[lvapplication_mimage_0] vgapp 1 linear 100.00m /dev/sdb(0)
[lvapplication_mimage_0] vgapp 1 linear 100.00m /dev/sdd(0)
[lvapplication_mimage_1] vgapp 1 linear 100.00m /dev/sdf(0)
[lvapplication_mimage_1] vgapp 1 linear 100.00m /dev/sdc(0)
[root@rhel8-3 ~]# lvconvert -m 0 /dev/vgapp/lvapplication /dev/sdb
Logical volume vgapp/lvapplication converted.
[root@rhel8-3 ~]# lvs --all --segments -o lv_name,vg_name,stripes,segtype,seg_size,copy_percent,devices vgapp
LV VG #Str Type SSize Cpy%Sync Devices
lvapplication vgapp 1 linear 100.00m /dev/sdb(0) -----------> the device which I mentioned that device still lvm showing.
lvapplication vgapp 1 linear 100.00m /dev/sdd(0)
~~~~
Actual results:
$lvconvert command unmirror newly added mirror device
$lvconvert unmirror the device which accidentally mentioned while removing the device without warning.
Expected results:
$lvconvert command should print warning prior to unmirror device.
$lvconvert should remove the device that's only mentioned in the command not the other device.
Additional info: