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 *
CP ATTACH FC00 TO *
CP ATTACH FCD0 TO *
25.2.1. Dynamically Activating an FCP LUN Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
Follow these steps to activate a LUN:
- Use the
cio_ignorecommand to remove the FCP adapter from the list of ignored devices and make it visible to Linux:cio_ignore -r DeviceNumber
# cio_ignore -r DeviceNumberCopy to Clipboard Copied! Toggle word wrap Toggle overflow Replace DeviceNumber with the device number of the FCP adapter. For example: - To bring the FCP adapter device online, use the following command:
chccwdev -e fc00
# chccwdev -e fc00Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Verify that the required WWPN was found by the automatic port scanning of the zfcp device driver:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 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
# echo 0x4020400100000000 > /sys/bus/ccw/drivers/zfcp/0.0.fc00/0x50050763050b073d/unit_addCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Find out the assigned SCSI device name:
lszfcp -DV
# 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:1089355792Copy to Clipboard Copied! Toggle word wrap Toggle overflow
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.