Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions

  




 

 

Red Hat Enterprise Linux 6 Essentials eBook now available in PDF and ePub formats for only $9.99
RHEL 6 Essentials contains 40 chapters and over 250 pages.

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.

 
 
  Published under the terms of the Creative Commons License Design by Interspire