FCP setups running in NPIV mode detect the LUNs automatically
and after setting the device online. No further configuration is necessary.
Procedure
- NPIV example
- To set FCP device 0.0.5400 online,
issue the following command:
# chccwdev --online 0.0.5400
Setting device 0.0.5400 online
Done
The chccwdev command is part of s390-tools.
For a description of the command see Device Drivers, Features, and Commands, SC33-8411After
setting the
FCP device online, all LUNs with valid
host-connections for the WWPN of the NPIV
FCP device are
automatically visible as SCSI devices:
# lsscsi
[0:0:0:1073758410]disk IBM 2107900 0.33 /dev/sda
[0:0:0:1073823946]disk IBM 2107900 0.33 /dev/sdb
- To find out if the FCP setup is running
in NPIV mode, check the port_type attribute of the FCP
device, for example:
# cat /sys/bus/ccw/drivers/zfcp/0.0.5400/host0/fc_host/host0/port_type
NPIV VPORT
- Non-NPIV example
- To set the non-NPIV FCP device 0.0.54ea
online, issue the following command:
# chccwdev --online 0.0.54ea
Setting device 0.0.54ea online
Done
- To configure a LUN 0x4010403200000000, issue the following
command:
# cd /sys/bus/ccw/drivers/zfcp/0.0.54ea
# echo 0x4010403200000000 > 0x500507630303c562/unit_add
If
the port and the LUN specify a disk in a storage subsystem you should
now see a new SCSI disk:
# lsscsi
[0:0:0:0] disk IBM 2107900 .309 /dev/sda
# lszfcp -D
0.0.5400/0x500507630303c562/0x4010403200000000 0:0:0:0
The
lszfcp command
is part of s390-tools. For a description of the command see
Device Drivers, Features, and Commands, SC33-8411
Results
Now the device, for example /dev/sda,
can be used. In our example the disk can be formatted and mounted.