sysfs structures for FCP devices and SCSI devices

Red Hat Enterprise Linux 9.2 LPAR mode z/VM guest

FCP devices are CCW devices. In the sysfs device driver view, remote target ports with their LUNs are nested below the FCP devices.

When Linux® is booted, it senses the available FCP devices and creates directories of the form:

/sys/bus/ccw/drivers/zfcp/<device_bus_id>

where <device_bus_id> is the device bus-ID that corresponds to an FCP device. You use the attributes in this directory to work with the FCP device.

Example: /sys/bus/ccw/drivers/zfcp/0.0.3d0c
The zfcp device driver automatically adds port information when the FCP device is set online and when remote storage ports (target ports) are added. Each added target port extends this structure with a directory of the form:
/sys/bus/ccw/drivers/zfcp/<device_bus_id>/<wwpn>

where <wwpn> is the worldwide port name (WWPN) of the target port. You use the attributes of this directory to work with the port.

Example: /sys/bus/ccw/drivers/zfcp/0.0.3d0c/0x500507630300c562

With NPIV-enabled FCP devices, Red Hat® Enterprise Linux 9.2 uses automatic LUN scanning by default. The zfcp sysfs branch ends with the target port entries. FCP devices that are not NPIV-enabled, or if automatic LUN scanning is disabled, can be configured manually.

Information about zfcp objects and their associated objects in the SCSI stack is distributed over the sysfs tree. To ease the burden of collecting information about zfcp devices, ports, units, and their associated SCSI stack objects, a command that is called lszfcp is provided with the s390utils RPM.