Bug 2095534
| Summary: | use wwid to eliminate duplicate devices from multipath or mdraid | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | David Teigland <teigland> |
| Component: | lvm2 | Assignee: | David Teigland <teigland> |
| lvm2 sub component: | Devices, Filtering and Stacking | QA Contact: | cluster-qe <cluster-qe> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | unspecified | ||
| Priority: | unspecified | CC: | agk, cmarthal, heinzm, jbrassow, mcsontos, msnitzer, prajnoha, zkabelac |
| Version: | 8.0 | Keywords: | Triaged |
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | lvm2-2.03.14-4.el8 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-11-08 10:55:29 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
David Teigland
2022-06-09 21:34:23 UTC
Marking Verified:Tested in the latest build.
kernel-4.18.0-398.g366e.el8.kpq1 BUILT: Tue Jun 7 04:56:38 CDT 2022
lvm2-2.03.14-4.el8 BUILT: Wed Jun 15 17:14:34 CDT 2022
lvm2-libs-2.03.14-4.el8 BUILT: Wed Jun 15 17:14:34 CDT 2022
[root@hayes-01 ~]# grep multipath_component_detection /etc/lvm/lvm.conf
# Configuration option devices/multipath_component_detection.
# multipath_component_detection = 1
#
[root@hayes-01 ~]# grep multipath_wwids_file /etc/lvm/lvm.conf
# Configuration option devices/multipath_wwids_file.
# multipath_wwids_file = "/etc/multipath/wwids"
[root@hayes-01 ~]# multipath -ll
mpathd (36d094660575ece002291bade2acdbd28) dm-0 DELL,PERC H330 Adp
size=1.8T features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
`- 0:2:4:0 sde 8:64 active ready running
[root@hayes-01 ~]# pvcreate /dev/mapper/mpathd1
Physical volume "/dev/mapper/mpathd1" successfully created.
[root@hayes-01 ~]# vgcreate test /dev/mapper/mpathd1
Volume group "test" successfully created
[root@hayes-01 ~]# lvcreate -L 10M test
Rounding up size to full physical extent 12.00 MiB
Logical volume "lvol0" created.
[root@hayes-01 ~]# pvscan
PV /dev/mapper/mpathd1 VG test lvm2 [<1.82 TiB / <1.82 TiB free]
Total: 1 [<1.82 TiB] / in use: 1 [<1.82 TiB] / in no VG: 0 [0 ]
# Alter lvm.conf
[root@hayes-01 ~]# grep multipath_component_detection /etc/lvm/lvm.conf
# Configuration option devices/multipath_component_detection.
multipath_component_detection = 0
[root@hayes-01 ~]# grep multipath_wwids_file /etc/lvm/lvm.conf
# Configuration option devices/multipath_wwids_file.
multipath_wwids_file = ""
[root@hayes-01 ~]# pvscan
PV /dev/mapper/mpathd1 VG test lvm2 [<1.82 TiB / <1.82 TiB free]
Total: 1 [<1.82 TiB] / in use: 1 [<1.82 TiB] / in no VG: 0 [0 ]
[root@hayes-01 ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/mapper/mpathd1 test lvm2 a-- <1.82t <1.82t
[root@hayes-01 ~]# echo $?
0
[root@hayes-01 ~]# vgchange -ay test
1 logical volume(s) in volume group "test" now active
[root@hayes-01 ~]# echo $?
0
[root@hayes-01 ~]# lvs test
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
lvol0 test -wi-a----- 12.00m
Note this feature is amended in bug 2111137 to provide the ability to disable it using multipath_component_detection=0. Marking VERIFIED with the latest rpms. kernel-4.18.0-414.el8 BUILT: Mon Aug 1 20:27:19 CDT 2022 lvm2-2.03.14-6.el8 BUILT: Fri Jul 29 05:40:53 CDT 2022 lvm2-libs-2.03.14-6.el8 BUILT: Fri Jul 29 05:40:53 CDT 2022 SCENARIO - lvm_usage_w_multipath_component_detection_disabled: Test that lvm doesn't ignore multipath component_detection with devicesfile disabled (bug 2111137/2095534) adding entry to the devices file for /dev/sde1 removing entry from the devices file for /dev/sde1 Setting use_devicesfile to disable Setting multipath_component_detection to enable WARNING: This scenario will end up repartitioning your device for use w/ mpath! multipath /dev/sde create: mpatha (36d094660650d1e0022bd29f91ebe756c) undef DELL,PERC H330 Adp size=1.8T features='0' hwhandler='0' wp=undef `-+- policy='service-time 0' prio=1 status=undef `- 0:2:4:0 sde 8:64 undef ready running adding entry to the devices file for /dev/mapper/mpatha1 ** use_devicesfile is NOT currently enabled ** creating PV on hayes-02 using device /dev/mapper/mpatha1 pvcreate --yes -ff /dev/mapper/mpatha1 Physical volume "/dev/mapper/mpatha1" successfully created. creating VG on hayes-02 using PV(s) /dev/mapper/mpatha1 vgcreate df /dev/mapper/mpatha1 Volume group "df" successfully created lvcreate --yes --type linear -n dflv -L 500M df Logical volume "dflv" created. Re-scanning lvm PVs (pvscan --cache) pvscan[28415] PV /dev/mapper/mpatha1 online. Setting multipath_component_detection to disable Re-scanning lvm PVs (pvscan --cache) pvscan[28425] PV /dev/mapper/mpatha1 online. verify pvs multipath path /dev/mapper/mpatha1 PV VG Fmt Attr PSize PFree /dev/mapper/mpatha1 df lvm2 a-- <1.82t <1.82t pvs -vvvv 2>&1| grep 'duplicate device' vgchange -ay -vvvv test 2>&1 | grep 'duplicate device' lvremove -f df/dflv Logical volume "dflv" successfully removed. removing vg df from hayes-02 Volume group "df" successfully removed removing pv /dev/mapper/mpatha1 on hayes-02 Labels on physical volume "/dev/mapper/mpatha1" successfully wiped. removing entry from the devices file for /dev/mapper/mpatha1 ** use_devicesfile is NOT currently enabled ** multipath -f mpatha multipath -W successfully reset wwids Device /dev/sde already has 1 partitions Setting use_devicesfile to enable Setting multipath_component_detection to enable 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 (lvm2 bug fix and enhancement update), 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-2022:7792 |