An example system with two FCP disks illustrates how to use udev and zfcp.
Assuming an example system with two FCP disks and udev, use the following commands to make the disks accessible:
# chccwdev --online 0.0.54ae
Setting device 0.0.54ae online
Done
Alternatively, you can write “1” to the online attribute of the FCP device to set it online:
cd /sys/bus/ccw/drivers/zfcp/0.0.54ae/
echo 1 > online
If you are using NPIV for your setup, LUNs are detected automatically and no further configuration is necessary.
cd /sys/bus/ccw/drivers/zfcp/0.0.54ae/0x5005076300cb93cb
echo 0x512e000000000000 > unit_add
echo 0x512f000000000000 > unit_add
No further steps are necessary to create the device files if udev is installed and set up correctly. The new device nodes /dev/sda and /dev/sdb are created automatically and even the entries for the partitions on the disks, that is, /dev/sda1 will appear. If the last two commands are issued in reversed order the naming of the disks will also be reversed. The sd devices /dev/sda, /dev/sdb, and so on, are not persistent. If one device disappears and another appears on the system, the new device might take the free name.
You should not directly access a SCSI device in a FC SAN environment: The storage server might decide to failover to its backup controller, forcing the host systems to access the storage over another path. If there is no multipath setup in place, access to the storage is then lost. Using multipathing, the names /dev/sda, /dev/sdb, and so on, do not matter, as multipathing automatically adds the SCSI devices to the correct multipath device.