Preparing SCSI disks
Consider these aspects when setting up FC-attached SCSI disks for the use of a virtual server.
Before you begin
- If you want to allow a migration of a virtual server to another host, use unique names
for the virtualized SCSI disks, which can be used from different hosts.
Device-mapper multipathing groups two or more paths to the same SCSI disk, thus providing failover redundancy and load balancing. It assigns unique device mapper-created device nodes to SCSI disks, which are valid for all hosts that access the SCSI disks.
According to your product or distribution mechanism:- Make sure that multipath support is enabled.
- Configure the multipath device mapper not to use user-friendly names. User friendly names are symbolic names, which are not necessarily equal on different hosts.
See your host administration documentation to find out how to prepare multipath support.
- Provide either of the following information:
- The device bus-IDs of the FCP devices, target WWPNs, and the FCP LUNs of the SCSI disk.
- The device mapper-created device node of the SCSI disk.
About this task
- Fibre Channel Protocol for Linux® and z/VM® on IBM® System z®, SG24-7266
- How to use FC-attached SCSI devices with Linux on z Systems®, SC33-8413
- Device Drivers, Features, and Commands, SC33-8411
Procedure
The following steps describe a SCSI disk setup on the host that does not persist across host reboots.
For a persistent setup, see your host administration documentation.
Example
For one example path, you provide the device bus-ID of the FCP device, the target WWPN, and the FCP LUN of the SCSI disk:
/sys/bus/ccw/drivers/zfcp/0.0.1700/0x500507630513c1ae/0x402340bc00000000 provides
the information:
Device bus-ID of the FCP device | 0.0.1700 |
WWPN | 0x500507630513c1ae |
FCP LUN | 0x402340bc00000000 |
- Display the available FCP devices.
# lscss -t 1732/03 | fgrep '1731/03' 0.0.1700 0.0.06d4 1732/03 1731/03 80 80 ff 50000000 00000000 0.0.1740 0.0.0714 1732/03 1731/03 80 80 ff 51000000 00000000 0.0.1780 0.0.0754 1732/03 1731/03 yes 80 80 ff 52000000 00000000 0.0.17c0 0.0.0794 1732/03 1731/03 yes 80 80 ff 53000000 00000000 0.0.1940 0.0.08d5 1732/03 1731/03 80 80 ff 5c000000 00000000 0.0.1980 0.0.0913 1732/03 1731/03 80 80 ff 5d000000 00000000
- Set the FCP device online.
# chccwdev -e 0.0.1700 Setting device 0.0.1700 online Done
- Configure the SCSI disk on the host.
# echo 0x402340bc00000000 > /sys/bus/ccw/drivers/zfcp/0.0.1700/0x500507630513c1ae/unit_add
- Figure out the device mapper-created device node of the SCSI disk.
- You can use the lszfcp command to display the
SCSI device name of a SCSI disk:
# lszfcp -D -b 0.0.1700 -p 0x500507630513c1ae -l 0x402340bc00000000 0.0.1700/0x500507630513c1ae/0x402340bc00000000 2:0:17:1086079011
- The lsscsi -i command displays the multipathed
SCSI disk related to the SCSI device name:
The device mapper-created device node that you can use to uniquely reference the multipathed SCSI disk# lsscsi -i ... [1:0:16:1086144547]disk IBM 2107900 .166 /dev/sdg 36005076305ffc1ae00000000000023bd [1:0:16:1086210083]disk IBM 2107900 .166 /dev/sdk 36005076305ffc1ae00000000000023be [1:0:16:1086275619]disk IBM 2107900 .166 /dev/sdo 36005076305ffc1ae00000000000023bf [2:0:17:1086079011]disk IBM 2107900 2440 /dev/sdq 36005076305ffc1ae00000000000023bc ...
36005076305ffc1ae00000000000023bc
is:/dev/mapper/36005076305ffc1ae00000000000023bc
- You can use the lszfcp command to display the
SCSI device name of a SCSI disk: