Preparing SCSI tape and medium changer devices
Consider these aspects when setting up FC-attached SCSI tapes and SCSI medium changers for the use of a virtual server.
Before you begin
Provide the device bus-IDs of the FCP devices, the target WWPNs, and the FCP LUNs of the SCSI tape or medium changer devices.
You can use the information that is provided as directory names:
/sys/bus/ccw/drivers/zfcp/<device_bus_id>/<wwpn>/<fcp_lun>
The virtual server user can install and use the IBM® lin_tape package on the virtual server for actions such as the mounting and unmounting of tape cartridges into the affected tape drive. The use of the lin_tape device driver is documented in the IBM Tape Device Drivers Installation and User's Guide, GC27-2130.
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
LUNis often referenced as
unit.
Procedure
For a persistent setup, see your host administration documentation (see also ldva_c_conventions.html#ldva_c_conventions__persistentConfig ).
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 tape or medium changer device:
| Device bus-ID of the FCP device | 0.0.1cc8 |
| WWPN | 0x5005076044840242 |
| FCP LUN | 0x0000000000000000 |
- Display the available FCP devices:
# lscss -t 1732/03 | fgrep '1731/03' 0.0.1cc8 0.0.0013 1732/03 1731/03 80 80 ff f0000000 00000000 0.0.1f08 0.0.0015 1732/03 1731/03 yes 80 80 ff 1e000000 00000000 0.0.3b58 0.0.0016 1732/03 1731/03 80 80 ff 68000000 00000000
- Bring the FCP device online:
# chccwdev -e 0.0.1cc8 Setting device 0.0.1cc8 online Done
- Register the SCSI tape device on the host:
# echo 0x0000000000000000 > /sys/bus/ccw/devices/0.0.1cc8/0x5005076044840242/unit_add
- Obtain the SCSI host number, the SCSI ID, and the SCSI LUN of
the registered SCSI tape device:
# lszfcp -D -b 0.0.1cc8 -p 0x5005076044840242 -l 0x0000000000000000 0.0.1cc8/0x5005076044840242/0x0000000000000000 1:0:2:0
where:SCSI host number 1SCSI channel 0 (always) SCSI ID 2SCSI LUN 0