Device definitions allow configuring the vendor and product information of a virtual medium changer or a virtual tape drive device. The vendor and product information is returned to a host in response to a SCSI INQUIRY command. The SCSI INQUIRY command is used by the host to identify the device. When a VTL device is created a medium changer device and tape drive device template are used to define the SCSI INQUIRY response of the VTL devices. The list of configured device definitions can be viewed from the "Device Definitions" menu as shown in the figure below

List Device Definitions

Configuring a Medium Changer Device Definition

To create a new medium changer click on "Device Definitions" menu and then click on "Add  Changer Definition". A form is displayed as shown in the figure below

Add Changer Definition

In the above form

  • Name is the unique name given to the changer definition. A valid name can only contain alphabets and numbers
  • Vendor is the emulated vendor string of the medium changer device. A valid vendor can only contain alphabets and numbers
  • Product is the emulated product string. A valid product string can only contain alphabets, numbers or a space in between words
  • Revision is the emulated firmware version string. A valid revision can only contain alphabets, numbers a space in between words or a dot '.'
  • Serial suffix is a suffix added to a serial number
  • Serial prefix is a prefix added to the generated serial number
  • Serial length is the length of the serial number of the medium changer device. For most changer devices, this value is 56 bytes
  • Inquiry length is the length of the SCSI inquiry response for the medium changer device. For most changer devices, this value is 10 or 12 bytes
  • Drive Start Address specifies the starting element address to report for the tape drives. Similarly for the storage slots the Slot Start Address and for the I/E port the IE Start Address.
  • AVoltag specifies that the medium changer device report it virtual drive serial numbers in response to a SCSI READ ELEMENT STATUS command.

In order to emulate real tape libraries, the vendor and product string must match the strings reported by the tape library changer and drive device. Contact your tape library vendor for these strings. A good reference document is the "Hardware and Cloud Storage Compatibility List" in https://www.veritas.com/support/en_US/article.100040087

Some applications and OS look for specific serial numbers length, suffix and prefix to identify the device. Contact your tape library vendor or application vendor for such requirements. Some examples are

3584 libraries report a 12 byte serial number which are right justified with leading zeros, for e.g a prefix 000007. The INQUIRY response length (Inquiry length) is 58. The slot start address is usually 1027 and the serial number suffix is then the slot start address in hex (for e.g 403 for a slot start address of 1027).

3100 libraries report a 12 byte serial number which starts with a prefix 00L2. The INQUIRY response length is 56. The serialnumber suffix is usually a string of the form _LL1 or _LL3.

ESL series library reports drive serial numbers in response to a SCSI READ ELEMENT STATUS command (AVoltag is selected). This is required for applications to match a drive to a library.

For ease of creating changer defintiions the "Import Changer Definition" option is provided to import the changer defintions from a text file. http://www.quadstor.com/uscripts/changer-definitions.txt has a set of useful definitions which can be used as a starting point to emulate vendor tape libraries.Click on the "Import Changer Defintion" button and in the next page select the drive definitions file to upload and click on Submit.

 

Configuring a Tape Drive Device Definition

To create a new medium changer click on "Device Definitions" menu and then click on "Add Drive Definition". A form is displayed as shown in the figure below

Add Drive Definition

In the above form

  • Name is the unique name given to the drive definition. A valid name can only contain alphabets and numbers
  • Vendor is the emulated vendor string of the tape drive device. A valid vendor can only contain alphabets and numbers
  • Product is the emulated product string. A valid product string can only contain alphabets, numbers or a space in between words
  • Revision is the emulated firmware version string. A valid revision can only contain alphabets, numbers a space in between words or a dot '.'
  • Serial suffix is a suffix added to a serial number
  • Serial prefix is a prefix added to the generated serial number
  • Serial length is the length of the serial number of the tape drive device.
  • Inquiry length is the length of the SCSI inquiry response for the tape drive device.
  • Media Type defines the type of tape being emulated.

Click on Submit to add a new tape drive definition

For ease of creating drive defintiions the "Import Drive Definition" option is provided to import the drive defintions from a text file. http://www.quadstor.com/uscripts/drive-definitions.txt has a set of useful definitions which can be used as a starting point to emulate vendor tape drives. Click on the "Import Drive Defintion" button and in the next page select the drive definitions file to upload and click on Submit.

Custom Inquiry Command Response

Some host query additional inquiry pages (EVPD) pages during device identification. Check with your tape drive or host vendor for the specific pages that are needed.

Custom inquiry commands can be added to a medium changer or tape drive definition by click on the "Modify" link. A new custom inquiry command can be added by clicking on the "Add Inquiry" button. A form is displayed as shown in the figure below

Add EVPD Inquiry Command

In the form above,

Page Code specifies the EVPD page code. 

File Path specifies the binary file which contains the INQUIRY command response sent when the host sends a INQUIRY command for this EVPD page code

To create the binary file, add the hexadecimal byte codes in a file and use the xxd command on linux to create the binary file.

For example, to add a custom C1 page code for a drive definition with the following hexadecimal bytes

01 c1 00 18 30 30 39 37 34 34 37 30 30 33 30 31 30 30 39 37 34 34 37 30 30 33 30 31

Add the above to a temporary file /tmp/c1.txt

Then run the command 

mkdir -p /quadstorvtl/inquirycmds/

xxd -r -p /tmp/c1.txt /quadstorvtl/inquirycmds/drive_c1.txt

 

The binary file can also be created by querying the same page from a tape drive device as follows

sg_raw -r 255 -o <output file> <device path> 12 1 <EVPD page code> 0 ff 0

For e.g to query the INQUIRY command response for EVPD page code C1

sg_raw -r 255 -o /quadstor/inquirycmds/drive_c1.txt /dev/nst0 12 1 c1 0 ff 0

 

Custom EVPD codes are required when a host queries them to further identify the device.

The medium changer device returns a valid response for following VPD pages

Page Code Inquiry Page
0x00 Supported VPD pages
0x80 Unit Serial Number
0x83 Device Identification

The tape drive device returns a valid response for the following VPD page codes

Page Code Inquiry Page
0x00 Supported VPD pages
0x03 Firmware Designation
0x80 Unit Serial Number
0x83 Device Identification

For many applications the implemented VPD page codes are sufficient to identify the device correctly. However, some applications, drivers or operating systems can query for more VPD pages in order to correctly identify a device. For e.g OS/400 may require VPD pages C0 and D0 which need to be added to the changer definition or in the individual VTL for the changer device. Similarly for a tape drive VPD pages E0, E1 which need to be added to the drive definition or in the individual VTL page for a drive device.