Configuring a SCSI tape or medium changer device
Configure FC-attached SCSI tape devices and SCSI medium changers as host devices for a virtual server.
Before you begin
Make sure that, as described in Preparing SCSI tape and medium changer devices:
- The SCSI tape or medium changer device is set up.
- You provide the SCSI device name of the SCSI tape or medium changer device.
You need a virtual HBA to connect to.
- Either use a configured virtual HBA (see Configuring a virtual HBA), or
- Connect to a new virtual HBA which will be automatically configured for you.
About this task
SCSI device names are freshly assigned after a host reboot or when a device is set offline and back online. This means that you have to verify an FC-attached SCSI tape or medium changer device configuration after one of these events. This limitation is also important if you plan a live migration.
Tip: Configure both FC-attached SCSI tape and medium changer devices in separate device configuration-XML files. Attach these devices only when necessary, and
detach them before you migrate the virtual server, or set one
of the devices in the configuration path offline.
Procedure
Example
Obtain the SCSI host number, the SCSI ID, and the SCSI LUN of the FC-attached SCSI tape or medium
changer
device:
# lszfcp -D
0.0.1cc8/0x5005076044840242/0x0000000000000000 3:0:8:0
where:
- 0.0.1cc8
- Is the device bus-ID of the FCP device
- 0x5005076044840242
- Is the WWPN
- 0x0000000000000000
- Is the FCP LUN
- 3
- The first position of the quadruple indicates the SCSI host number
- 8
- The third position of the quadruple indicates the SCSI ID
- 0
- The fourth position of the quadruple indicates the SCSI LUN
Assign a SCSI device name to the virtual SCSI device
on the virtual server. The
controller attribute of the address element refers to the index attribute
of the controller element.
- Domain configuration-XML file:
<domain type="kvm"> <name>VM1</name> ... <devices> ... <controller type="scsi" model="virtio-scsi" index="0"> <address type="ccw" cssid="0xfe" ssid="0" devno="0x0002"/> </controller> ... </devices> </domain>
- Device configuration-XML file:
<hostdev mode="subsystem" type="scsi"> <source> <adapter name="scsi_host3"/> <address bus="0" target="8" unit="0"/> </source> <address type="drive" controller="0" bus="0" target="1" unit="1"/> </hostdev>
Display the SCSI tape on the host:
# lsscsi
[3:0:8:0] tape IBM 03592E07 35CD
On the virtual server, the SCSI tape will be displayed like
this:[root@guest:] # lsscsi
[0:0:1:1] tape IBM 03592E07 35CD