- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: How to view HBA card are connected with fabric...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2010 03:45 AM
тАО03-26-2010 03:45 AM
I have four HBA cards are connected with two servers, but only two of them are connected with fabric swith (that only two have the link) , two servers are having different OS (RHEL 4 and RHEL 5).
As i am working from offshore , i am not able to view physically that which two ports are having connected , so i would like to know from OS , is it possible?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2010 03:46 AM
тАО03-26-2010 03:46 AM
Re: How to view HBA card are connected with fabric switch in RHEL 4 and RHEL 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2010 04:56 AM
тАО03-26-2010 04:56 AM
SolutionThe the directory /sys/class/fc_host will have one sub-directory named like "hostN" for each FC port.
In each sub-directory, there are multiple files. These contain human-readable text: you can view them with the "cat" command. The most useful ones for identifying the HBA cards and checking their connection states would be:
node_name = the WWNN of the HBA port.
port_name = the WWPN of the HBA port.
port_state = whether the port has a link or not.
device = a symbolic link to the PCI bus device hierarchy in the /sys tree: use "ls -ld device" to see the PCI bus ID of the HBA port.
The /proc/scsi/qla2xxx/* or /proc/scsi/lpfc/* files that existed in older RHEL versions are not there in RHEL 5 any more.
RHEL 4:
In RHEL 4, the FibreChannel HBA information was in the middle of a transition to the /sys presentation format, and Emulex and Qlogic drivers present their information differently.
Like RHEL 5, RHEL 4 has a /sys/class/fc_host directory, but the hostN sub-directories contain very little information.
RHEl 4, Emulex HBAs:
The directory /sys/class/scsi_host has sub-directories named like hostN for each SCSI-like bus adapter, including but not limited to FC HBAs.
The sub-directories of Emulex lpfc cards are identifiable by the fact that they have multiple files named lpfc_* in addition to the standard contents.
The most interesting files:
disc_map = WWNs of the mapped disks
fwrev = HBA firmware revision
node_name = WWNN of the HBA
port_name = WWPN of the HBA
state = link state
The /proc/scsi/lpfc/* files exist, but only have the same information as the /sys/class/scsi_host/host*/disc_map files. The firmware and HBA WWN information that used to be in the /proc/scsi/lpfc/* files in RHEL 3 has been moved to /sys.
RHEL 4, Qlogic HBAs:
In RHEL 4, Qlogic HBA driver still uses the pre-RHEL4 style /proc format: each HBA has a file in /proc/scsi/qla2xxx directory. That file contains the HBA state information, WWNs and firmware version numbers.
The /sys/class/fc_host/hostN and /sys/class/scsi_host/hostN sub-directories exist, but won't have much FC-specific information.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2010 07:17 AM
тАО03-27-2010 07:17 AM
Re: How to view HBA card are connected with fabric switch in RHEL 4 and RHEL 5
RHEL5.3:
I have checked as you said in /sys/class/fc_host.
# cd /sys/class/fc_host
# cd host1
# more port_state
Online
# cd ../host2
# more port_state
Online
# cd ../host3
# more port_state
Online
# cd ../host4
# more port_state
Online
So as per above output, four HBA ports are having connectivity , but I have given the connectivity only for two ports.
So /sys/class/fc_host is not showing the correct link state.
Then I checked in /sys/class/scsi_host
# cd /sys/class/scsi_host
# cd host1
# more state
Link Up - F_Port
# cd ../host2
# more state
Link Up - F_Port
# cd ../host3
# more state
Link Down
# cd ../host4
# more state
Link Down
So as per above output , The link states are shown correct.
RHEL 4:
As you said , There is no information about link state in "/sys/class/scsi_host/hostX"
Then I have checked in /proc/scsi/qlaxxxx.
# cd /proc/scsi/qlaxxxx
# more 1
SCSI Device Information:
scsi-qla1-adapter-node=500110a0001a5387;
scsi-qla1-adapter-port=500110a0001a5386;
scsi-qla1-target-0=50060e8005472f00;
# more 2
SCSI Device Information:
scsi-qla1-adapter-node=500110a0001a5388;
scsi-qla1-adapter-port=500110a0001a5387;
scsi-qla1-target-0=50060e8005472f01;
# more 3
SCSI Device Information:
scsi-qla1-adapter-node=500110a0001a5389;
scsi-qla1-adapter-port=500110a0001a5388;
# more 4
SCSI Device Information:
scsi-qla1-adapter-node=500110a0001a5390;
scsi-qla1-adapter-port=500110a0001a5389;
So as per above output, the last two HBA ports are not having the entry like "scsi-qla1-target" , so i believe those two are not having the connectivity.
I am going to use above methods to find HBA link state in RHEL5 and RHEL4.
Can i use these methods?
Are above methods are correct?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2010 02:24 PM
тАО03-27-2010 02:24 PM
Re: How to view HBA card are connected with fabric switch in RHEL 4 and RHEL 5
Interesting that /sys/class/fc_host/host*/port_state did not show the correct state.
(Our RHEL 5.x systems were at a remote location with all HBA connections in use, so I could not just go and disconnect a cable to test - sorry!)
MK