Removing ports
Removing unused ports can save FCP channel resources. Additionally setting the no_auto_port_rescan attribute avoids unnecessary attempts to recover unused remote ports.
Before you begin
About this task
List the contents of /sys/bus/ccw/drivers/zfcp/<device_bus_id> to find out which ports are currently configured for the FCP device.
You cannot remove a port while SCSI devices are configured for it or if the port is in use, for example, by error recovery.
Note: The next port scan will attach all available ports, including
any previously removed ports. To prevent removed ports from being
reattached automatically, use zoning or the no_auto_port_rescan module
parameter.
To remove a port from an FCP device, write the WWPN of the port to the port_remove attribute of the FCP device.
Procedure
Issue a command of this form:
# echo <wwpn> > /sys/bus/ccw/drivers/zfcp/<device_bus_id>/port_remove
where: - <device_bus_id>
- specifies the FCP device.
- <wwpn>
- is the WWPN of the port to be removed.
Example
In this example, two ports with WWPN 0x500507630303c562
and 0x500507630300c562 are configured for an FCP device with bus ID 0.0.3d0c.
The port with WWPN 0x500507630303c562 is then removed.
# ls /sys/bus/ccw/drivers/zfcp/0.0.3d0c/0x*
0x500507630303c562
0x500507630300c562
# echo 0x500507630303c562 > /sys/bus/ccw/drivers/zfcp/0.0.3d0c/port_remove
# ls /sys/bus/ccw/drivers/zfcp/0.0.3d0c/0x*
0x500507630300c562