Recovering a failed port

Red Hat Enterprise Linux 9.2 LPAR mode z/VM guest

Failed target ports are automatically recovered by the zfcp device driver. You can read the in_recovery attribute to check whether recovery is under way.

Before you begin

The FCP device must be online.

Procedure

Perform these steps to find out the recovery status of a port and, if needed, start or restart recovery:

  1. Issue a command of this form:
    # cat /sys/bus/ccw/drivers/zfcp/<device_bus_id>/<wwpn>/in_recovery
    where:
    <device_bus_id>
    specifies the FCP device.
    <wwpn>
    is the WWPN of the target port.

    The value is 1 if recovery is under way and 0 otherwise. If the value is 0 for a non-operational port, recovery might have failed or the device driver might have failed to detect that the port is malfunctioning.

  2. To find out whether recovery failed, read the failed attribute. Issue a command of this form:
    # cat /sys/bus/ccw/drivers/zfcp/<device_bus_id>/<wwpn>/failed

    The value is 1 if recovery has failed and 0 otherwise.

  3. You can start or restart the recovery process for the port by writing 0 to the failed attribute. Issue a command of this form:
    # echo 0 > /sys/bus/ccw/drivers/zfcp/<device_bus_id>/<wwpn>/failed

Example

In the following example, a port with WWPN 0x500507630300c562 that is attached through an FCP device with bus ID 0.0.3d0c is malfunctioning. The first command reveals that recovery is not already under way. The second command manually starts recovery for the port:

# cat /sys/bus/ccw/drivers/zfcp/0.0.3d0c/0x500507630300c562/in_recovery
0
# echo 0 > /sys/bus/ccw/drivers/zfcp/0.0.3d0c/0x500507630300c562/failed