25.2. Adding FCP-Attached Logical Units (LUNs)
The following is an example of how to add an FCP LUN.
25.2.1. Dynamically activating an FCP LUN
Follow these steps to activate a LUN:
-
Use the cio_ignore
command to remove the FCP adapter from the list of ignored devices and make it visible to Linux:
# cio_ignore -r device_number
Replace device_number
with the device number of the FCP adapter. For example:
-
To bring the FCP adapter device online, use the following command:
# chccwdev -e fc00
-
Verify that the required WWPN was found by the automatic port scanning of the zfcp device driver:
# ls -l /sys/bus/ccw/drivers/zfcp/0.0.fc00/
drwxr-xr-x. 3 root root 0 Apr 28 18:19 0x500507630040710b
drwxr-xr-x. 3 root root 0 Apr 28 18:19 0x50050763050b073d
drwxr-xr-x. 3 root root 0 Apr 28 18:19 0x500507630e060521
drwxr-xr-x. 3 root root 0 Apr 28 18:19 0x500507630e860521
-r--r--r--. 1 root root 4096 Apr 28 18:17 availability
-r--r--r--. 1 root root 4096 Apr 28 18:19 card_version
-rw-r--r--. 1 root root 4096 Apr 28 18:17 cmb_enable
-r--r--r--. 1 root root 4096 Apr 28 18:17 cutype
-r--r--r--. 1 root root 4096 Apr 28 18:17 devtype
lrwxrwxrwx. 1 root root 0 Apr 28 18:17 driver -> ../../../../bus/ccw/drivers/zfcp
-rw-r--r--. 1 root root 4096 Apr 28 18:17 failed
-r--r--r--. 1 root root 4096 Apr 28 18:19 hardware_version
drwxr-xr-x. 35 root root 0 Apr 28 18:17 host0
-r--r--r--. 1 root root 4096 Apr 28 18:17 in_recovery
-r--r--r--. 1 root root 4096 Apr 28 18:19 lic_version
-r--r--r--. 1 root root 4096 Apr 28 18:17 modalias
-rw-r--r--. 1 root root 4096 Apr 28 18:17 online
-r--r--r--. 1 root root 4096 Apr 28 18:19 peer_d_id
-r--r--r--. 1 root root 4096 Apr 28 18:19 peer_wwnn
-r--r--r--. 1 root root 4096 Apr 28 18:19 peer_wwpn
--w-------. 1 root root 4096 Apr 28 18:19 port_remove
--w-------. 1 root root 4096 Apr 28 18:19 port_rescan
drwxr-xr-x. 2 root root 0 Apr 28 18:19 power
-r--r--r--. 1 root root 4096 Apr 28 18:19 status
lrwxrwxrwx. 1 root root 0 Apr 28 18:17 subsystem -> ../../../../bus/ccw
-rw-r--r--. 1 root root 4096 Apr 28 18:17 uevent
-
Activate the FCP LUN by adding it to the port (WWPN) through which you would like to access the LUN:
# echo 0x4020400100000000 > /sys/bus/ccw/drivers/zfcp/0.0.fc00/0x50050763050b073d/unit_add
-
Find out the assigned SCSI device name:
# lszfcp -DV
/sys/devices/css0/0.0.0015/0.0.fc00/0x50050763050b073d/0x4020400100000000
/sys/bus/ccw/drivers/zfcp/0.0.fc00/host0/rport-0:0-21/target0:0:21/0:0:21:1089355792
For more information, refer to the chapter on SCSI-over-Fibre Channel in Linux on System z Device Drivers, Features, and Commands on Red Hat Enterprise Linux 6.