Scanning for ports

Red Hat Enterprise Linux 8.6 LPAR mode z/VM guest

Newly available target ports are discovered. However, you might want to trigger a port scan to re-create accidentally removed port information or to assure that all ports are present.

Before you begin

The FCP device must be online.

About this task

The zfcp device driver automatically adds port information to sysfs when:
  • The FCP device is set online
  • Target ports are added to the Fibre Channel fabric, unless the module parameter no_auto_port_rescan is set to 1.
Scanning for ports might take some time to complete. Commands that you issue against ports or LUNs while scanning is in progress are delayed and processed when port scanning is completed.

Use the port_rescan attribute if a remote storage port was accidentally deleted from the adapter configuration or if you are unsure whether all ports were added to sysfs.

Procedure

Issue a command of this form:
# echo 1 > /sys/bus/ccw/drivers/zfcp/<device_bus_id>/port_rescan
where <device_bus_id> specifies the FCP device through which the target ports are attached.
Tip: List the contents of /sys/bus/ccw/drivers/zfcp/<device_bus_id> to find out which ports are currently configured for the FCP device.

Example

In this example, a port with WWPN 0x500507630303c562 is already configured for an FCP device with bus ID 0.0.3d0c. An additional target port with WWPN 0x500507630300c562 is automatically configured by triggering a port scan.
# ls /sys/bus/ccw/drivers/zfcp/0.0.3d0c/0x*
0x500507630303c562
# echo 1 > /sys/bus/ccw/drivers/zfcp/0.0.3d0c/port_rescan
# ls /sys/bus/ccw/drivers/zfcp/0.0.3d0c/0x*
0x500507630303c562
0x500507630300c562