Querying and Configuring HBAs
Identifying HBAs
After installing an HBA on a host, run the following command to check whether the host has identified the HBA:
bash-3.2# lsdev -Cc adapter | grep fc
fcs0 Available 05-02 10 Gb FCoE PCI Express Dual Port Adapter (771001801410af03)
fcs1 Available 05-03 10 Gb FCoE PCI Express Dual Port Adapter (771001801410af03)
fcs2 Available 06-00 4Gb FC PCI Express Adapter (df1000fe)
fcs3 Available 06-01 4Gb FC PCI Express Adapter (df1000fe)
According to the command output, the host has identified two 4 Gbit/s Fibre Channel host ports. The information is consistent with that about the actually installed HBA, indicating that the host has identified the installed HBA.
The command output also shows the physical device identifier for each HBA port, for example, fcs2. The identifiers will be used in follow-up query commands.
Querying HBA WWNs
Run the following commands to view the properties of an identified HBA:
bash-3.2# lscfg -vpl fcs2
fcs2 U78AB.001.WZSGU6H-P1-C6-T1 4Gb FC PCI Express Adapter (df1000fe)
Part Number.................10N7255
Serial Number...............1C047083C7
Manufacturer................001C
EC Level....................D77040
Customer Card ID Number.....5774
FRU Number..................10N7255
Device Specific.(ZM)........3
Network Address.............10000000C9AD0B20
ROS Level and ID............02E8277F
Device Specific.(Z0)........2057706D
Device Specific.(Z1)........00000000
Device Specific.(Z2)........00000000
Device Specific.(Z3)........03000909
Device Specific.(Z4)........FFE01212
Device Specific.(Z5)........02E8277F
Device Specific.(Z6)........06E12715
Device Specific.(Z7)........07E1277F
Device Specific.(Z8)........20000000C9AD0B20
Device Specific.(Z9)........ZS2.71X15
Device Specific.(ZA)........Z1F2.70A5
Device Specific.(ZB)........Z2F2.71X15
Device Specific.(ZC)........00000000
Hardware Location Code......U78AB.001.WZSGU6H-P1-C6-T1
PLATFORM SPECIFIC
Name: fibre-channel
Model: LPe11002
Node: fibre-channel@0
Device Type: fcp
Physical Location: U78AB.001.WZSGU6H-P1-C6-T1
bash-3.2#
In the command output, Customer Card ID Number shows the HBA model and Network Address indicates the WWN.
Querying HBA Physical Device Identifier Properties
AIX assigns a unique physical device identifier (fcs#) and a unique virtual device identifier (fscsi#) to each HBA port. The properties of the two identifiers are used in the interaction among storage systems, AIX, and upper-layer applications.
Run the following command to view the properties of an HBA's physical device identifier:
bash-3.2# lsattr -EHl fcs2
attribute value description user_settable
bus_intr_lvl Bus interrupt level False
bus_mem_addr 0xffe7e000 Bus memory address False
bus_mem_addr2 0xffe7c000 Bus memory address False
init_link al INIT Link flags True
intr_msi_1 123461 Bus interrupt level False
intr_priority 3 Interrupt priority False
lg_term_dma 0x800000 Long term DMA True
max_xfer_size 0x100000 Maximum Transfer Size True
num_cmd_elems 200 Maximum number of COMMANDS to queue to the adapter True
pref_alpa 0x1 Preferred AL_PA True
sw_fc_class 2 FC Class for Fabric True
tme yes Target Mode Enabled True
bash-3.2#
Parameter |
Description |
Value |
Remarks |
---|---|---|---|
init_link |
Fibre Channel HBA port mode |
Possible values:
|
To obtain the default init_link value for an HBA, see its parameter description. |
lg_term_dma |
Size of the memory where fcs# stores I/O commands and data |
Default value: 0x800000, namely, 8 MB |
Settings of these parameters affect read/write performance. |
max_xfer_size |
Maximum I/O transfer length of fcs# |
Default value: 0x100000, namely, 1 MB |
|
num_cmd_elems |
Size of concurrent I/Os of fcs# |
Default value: 200 |
|
NOTE:
Change settings of these parameters only when the connection failed between the host and storage systems or the read/write performance is poor. |
Querying HBA Virtual Device Identifier Properties
Run the following command to view the properties of an HBA's virtual device identifier:
bash-3.2# lsattr -EHl fscsi2
attribute value description user_settable
attach none How this adapter is CONNECTED False
dyntrk no Dynamic Tracking of FC Devices True
fc_err_recov delayed_fail FC Fabric Event Error RECOVERY Policy True
scsi_id Adapter SCSI ID False
sw_fc_class 3 FC Class for Fabric True
bash-3.2#
Among the preceding properties, note the following parameters:
- dyntrk
Indicates the status of the dynamic tracking function. By default, the value is no. When dynamic tracking is enabled, HBA service status is monitored in a timely manner.
- fc_err_recov
Indicates the status of the fast error recovery function. By default, the value is delayed_fail. This parameter determines the time an HBA spent in fault diagnosis.
If a switch is used, set dyntrk to yes and fc_err_recov to fast_fail.
These parameters are related to service path selection. Configure these parameters based on site requirements when multiple paths exist. For details about how to configure the parameters, see the user guides specific to multipathing.
Modifying HBA Parameter Settings
To modify an HBA parameter setting, perform the following steps:
- Run the lsattr –Rl fcs# –a parameter name or lsattr -Rl fscsi# -a parameter name command to query the possible values of the desired parameter.
The following is an example:
bash-3.2# lsattr -Rl fcs2 -a max_xfer_size 0x100000 0x200000 0x400000 0x800000 0x1000000 bash-3.2#
The command output shows five possible values of max_xfer_size.
- Run the chdev –l fcs# –a parameter name=value or chdev –l fscsi# –a parameter name=value -P command to change the value.
bash-3.2# chdev -l fcs2 -a max_xfer_size=0x1000000
- Run the lsattr -EHl fcs# or lsattr -EHl fscsi# command to verify that the parameter has been successfully modified.