Setting up the zfcp device driver

Ubuntu 22.04 LTS LPAR mode z/VM guest

Configure the zfcp device driver through the module parameters. You might also need to install the zfcp HBA API library.

zfcp module parameter syntax

Read syntax diagramSkip visual syntax diagram modprobe zfcp device= <device_bus_id>, <wwpn>, <fcp_lun>1  allow_lun_scan=1 allow_lun_scan= <value> datarouter=1 datarouter=0 dbflevel=3 dbflevel= <level> dbfsize=4 dbfsize= <pages> dif=0 dif=1dix=0dix=1 port_scan_ratelimit=60000 port_scan_ratelimit= <limit> port_scan_backoff=500 port_scan_backoff= <limit>no_auto_port_rescan=0no_auto_port_rescan=1queue_depth=32queue_depth= <depth>ber_stop=1ber_stop=0
Notes:
  • 1 For experimental use only. Do not use on production systems.
where:
device=<device_bus_id>,<wwpn>,<fcp_lun>
Attention: The device= parameter is reserved for internal use. Do not use.

<device_bus_id>
specifies the FCP device through which the SCSI device is attached.
<wwpn>
specifies the target port through which the SCSI device is attached.
<fcp_lun>
specifies the LUN of the SCSI device.
allow_lun_scan=<value>
disables the automatic LUN scan for FCP devices that run in NPIV mode if set to 0, n, or N. To enable the LUN scanning set the parameter to 1, y, or Y. When the LUN scan is disabled, all LUNs must be configured through the unit_add zfcp attribute in sysfs. LUN scan is enabled by default.
datarouter=
enables (if set to 1, y, or Y) or disables (if set to 0, n, or N) support for the hardware data routing feature. The default is 1.
Note: The hardware data routing feature becomes active only for FCP devices that are based on adapter hardware with hardware data routing support.
dbflevel=<level>
sets the initial log level of the debug feature. The value is an integer in the range 0 - 6, where greater numbers generate more detailed information. The default is 3.
dbfsize=<pages>
specifies the number of pages to be used for the debug feature.

The debug feature is available for each FCP device and the following areas:

hba
FCP device.
san
Storage Area Network.
rec
Error Recovery Process.
scsi
SCSI
The value given is used for all areas. The default is 4, that is, four pages are used for each area and FCP device. In the following example the dbsfsize is increased to 6 pages:
dbfsize=6
This results in six pages being used for each area and FCP device.
dif=
turns on end-to-end data consistency checking in DIF-only mode if set to 1, y, or Y (and off if set to 0, n, or N). The default is 0.
dix=
turns on end-to-end data consistency checking in extended mode if set to 1, y, or Y (and off if set to 0, n, or N). The default is 0.

Specifying zfcp.dix=1 enables both DIF and DIX. Enabling zfcp.dix= overrides specifications for zfcp.dif=.

Note: End-to-end data consistency checking in extended mode is experimental and can cause errors if enabled.
port_scan_ratelimit=<limit>
sets the minimum delay, in milliseconds, between automatic port scans of your Linux instance. The default value is 60000 milliseconds. To turn off the rate limit, specify 0. Use this parameter to avoid frequent scans, while you still ensure that a scan is conducted eventually.
port_scan_backoff=<delay>
sets additional random delay, in milliseconds, in which the port scans of your Linux instance are spread. The default value is 500 milliseconds. To turn off the random delay, specify 0. In an installation with multiple Linux instances, use this attribute for every Linux instance to spread scans to avoid potential multiple simultaneous scans.
no_auto_port_rescan=<value>
turns the automatic port rescan feature off ( if set to 1, y, or Y) or on (if set to 0, n, or N). The default is 0. Automatic rescan is always performed when an FCP device is set online and when user-triggered writes to the sysfs attribute port_rescan occur.
Tip: Use port_scan_backoff and port_scan_ratelimit rather than no_auto_port_rescan.
queue_depth=<depth>
specifies the number of commands that can be issued simultaneously to a SCSI device. The default is 32. The value that you set here is used as the default queue depth for new SCSI devices. You can change the queue depth for each SCSI device that uses the queue_depth sysfs attribute.
ber_stop=<value>
sets the mode of handling FCP devices for which the FCP channel reports a bit-error count in excess of its threshold.

If set to 1, y, or Y, the zfcp device driver shuts down such FCP devices; this is the default. If set to 0, n, or N, such FCP devices keep running and might cause I/O command timeouts with an associated performance degradation.

Kernel message All paths over this FCP device are disused because of excessive bit errors indicates that the zfcp device driver shut down a device because of bit errors. To resolve the problem, ensure that fibre optics on the local fibre link are clean and functional, and that all cables are properly plugged. Then recover the FCP device by writing 0 to its failed sysfs attribute. If recovery through sysfs is not possible, set the CHPID of the device offline and back online on the Support Element.

Example

Use the following kernel parameter to enable end-to-end data consistency checking:
modprobe zfcp dif=1