Product SiteDocumentation Site

25.2.  Adding FCP-Attached Logical Units (LUNs)

The following is an example of how to add an FCP LUN.

Note

If running under z/VM, make sure the FCP adapter is attached to the z/VM guest virtual machine. For multipathing in production environments there would be at least two FCP devices on two different physical adapters (CHPIDs). For example:
CP ATTACH FC00 TO * 
CP ATTACH FCD0 TO *

25.2.1. Dynamically activating an FCP LUN

Follow these steps to activate a LUN:
  1. 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:
  2. To bring the FCP adapter device online, use the following command:
    # chccwdev -e fc00
  3. 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
  4. 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
  5. 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.