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.
`/dev/disk/by-path/` now accounts for NPIV paths
Previously, if two or more virtual host bus adapters (HBAs) were created on a single physical HBA, only a single link to the device was created in the `/dev/disk/by-path/` directory instead of one link for each path. As a consequence, creating a *virsh* pool with virtual HBAs by using Fibre Channel N_Port ID Virtualization (NPIV) did not work correctly. With this update, symbolic links in `/dev/disk/by-path/` are created correctly and are unique. Symbolic links in `/dev/disk/by-path/` created by *udev* for logical unit numbers (LUNs) connected through a physical Fibre Channel N_Port stay the same.
Created attachment 826223[details]
ls of /dev/disk/by-path
Description of problem:
If I create two or more virtual host bus adapters on a single physical HBA, only one link gets created in /dev/disk/by-path
I believe this behavior is the result of by-path taking into account different PCI adapters and logical unit serial numbers, but not the scsi host number when creating the links. Since the PCI BDF and the device serial numbers match, only one link gets created.
/sys/class/block/sdg/device/scsi_device/9\:0\:0\:0/
Version-Release number of selected component (if applicable):
udev-147-2.51.el6.x86_64
How reproducible:
always
Steps to Reproduce:
1. create multiple vHBAs on the same physical HBA and expose a target and LUN to the vHBAs
See:
https://fedoraproject.org/wiki/Features/VirtStorageManagement#Create_and_destroy_a_virtual_HBA_with_NPIV
Actual results:
/dev/disk/by-path has only a single link to the device (see attached files)
Expected results:
/dev/disk/by-path has only a link per path to the device
Additional info:
This behavior requires an NPIV capable SAN to reproduce, so please let me know what information I can provide and I'll help in any way I can.
I didn't quite finish the description before submitting the BZ:
/sys/class/block/sdg/device/scsi_device/9\:0\:0\:0/
shows the relationship between the block device and the SCSI device
Comment 6RHEL Program Management
2013-11-22 19:02:55 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 11Maurizio Lombardi
2015-10-14 13:00:59 UTC
I'm working on it right now,
So the by-path format /dev/by-path/pci-xxx-fc-<port_name>-<lun> is ambiguous when there are multiple virtual HBAs on the same physical HBA (NPIV),
I'm not sure about how to properly fix this bug yet, we could add the scsi host number to by-path as Dave suggests or maybe the port_name of the virtual HBA?
I'll try to come up with a solution.
Maurizio, can you please post the patch upstream via GitHub pull request?
Comment 16Maurizio Lombardi
2015-12-21 10:40:16 UTC
Michal, I will post it soon. Sorry for the delay but one customer reported some problems with the first version of the patch and I had to modify it.
They are going to test the new version right now, if they confirm the patch works then I proceed to send it upstream.
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://rhn.redhat.com/errata/RHBA-2016-0903.html