APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

OSR5 Tape Autoloaders

Generic Autoloader Configuration Information - SCO OpenServer 5.0.5.

Copyright 1999 D. Thomas Podnar [email protected]

Note: Some autoloaders, in particular HP models, can cheat the operating system by allowing communication with the changer on the same SCSI ID and LUN as communication to the tape drive. HP's mtx is an example of a program that can do this.

This discussion is on how to do changers properly per spec so that any application can access them. The SCO juke command and the Microlite edge.changer command are two examples of standard programs.

There are two standard ways to set up an autochanger device.

1) Small changers, typically those with one integrated tape drive, usually communicate with the host on the same SCSI ID but on LUN 1 instead of LUN 0.

2) Larger changers are really boxes with one or more tape drives installed. The changer itself usually has its own SCSI id and lives on LUN 0 of that ID.

It is important to remember that SCO disables LUN scanning by default in many host adapter drivers. Although you may link in a changer with no complaints using mkdev juke, the host adapter will not pass commands except through LUN 0. This affect changers in class (1) above.

To check to see if LUN scanning is enabled, check the space.c or space.h file for your host adapter in /etc/conf/pack.d/[adapter].

For instance, on an Adaptec 2940U2w, which uses the blad driver, you would search /etc/conf/pack.d/blad/space.c for the following line:

   int blad_scan_lun = 0;
 

If LUN scanning is set at 0, change it to 1.

   int blad_scan_lun = 1;

The next time you link the kernel, LUN scanning will be enabled.

Next, run mkdev juke (SCOAdmin ->gt; Hardware/Kernel Manager ->gt; SCSI Juke Box) and (1. Install a SCSI Juke Box).

Choose the hardware , SCSI ID and LUN as appropriate, and relink the kernel. A device node (/dev/Sjk0, /dev/Sjk1 etc.) will be created.

OSR5 Juke commands

Juke commands at a glance.

juke elem /dev/Sjk0         (show element names)
Here is sample output from a Tecmar LD8 (8 slots, one tape drive).

Import/Export Elements:
Medium Transport Elements:      mt0
Storage Elements:               st0 st1 st2 st3 st4 st5 st6 st7
Data Transfer Elements:         dt0
 

This says:

  • There are no Import/Export Elements. (These are individual tape insertion/removal doors used by large devices.)
  • There is one Medium Transport Element. (This is the equivalent of the "Robot Arm" on room size changers. Although most small changers show its existence, it can be ignored.)
  • There are 8 Storage Elements (slots) numbered st0 through st7
  • There is one Data Transfer Element (tape drive).

Typical command:


   juke move st0 dt0 /dev/Sjk0.
 

This tells juke to take the tape from storage element st0 and send it to the tape drive (dt0).

   juke move dt0 st0 /dev/Sjk0.
 

This will remove the tape from the drive and return it to storage.

Microlite Edge edge.changer

The Microlite edge.changer program is a little more sophisticated.

Sample usage of the edge.changer program:

   edge.changer show /dev/Sjk0

mt0 EMPTY
st0 EMPTY
st1 FULL
st2 FULL
st3 FULL
st4 FULL
st5 FULL
st6 FULL
st7 FULL
dt0 FULL
    unld st0
 

This shows the same information as juke, with two important changes:

  • The element status (FULL/EMPTY) is displayed.
  • The dt (tape drive) element indicates where it got the tape from.

Barcode labels are also displayed on changers so equipped.

  edge.changer move dt0 st0 /dev/Sjk0
 

This will remove the tape from the drive and return it to storage.

edge.changer commands may be stacked.

  edge.changer move dt0 st0 move st3 dt0 show /dev/Sjk0
 

This would:

  • remove the tape from the drive and return it to storage st0
  • move the tape from element 4 (st3) into the tape drive (dt0).
  • show the resulting changer status.

edge.changer has an easy program interface.

   edge.changer -terse show /dev/Sjk0

EC_MT0="0"
EC_MT0_PVT=""
EC_MT="1"
EC_ST0="0"
EC_ST0_PVT=""
EC_ST1="1"
EC_ST1_PVT=""
EC_ST2="1"
EC_ST2_PVT=""
EC_ST3="1"
EC_ST3_PVT=""
EC_ST4="1"
EC_ST4_PVT=""
EC_ST5="1"
EC_ST5_PVT=""
EC_ST6="1"
EC_ST6_PVT=""
EC_ST7="1"
EC_ST7_PVT=""
EC_ST="8"
EC_IE="0"
EC_DT0="1"
EC_DT0_PVT=""
EC_SA0="0"
EC_SAQ0="1"
EC_DT="1"
EC_RETCODE="0"
 

For users wishing to incorporate changer support into their own programs, this places all changer information into environment variables. Other obvious variables shown here are the number of each element type available (EC_ST=8 indicates 8 slots), and the EC_PVTx (Private Volume Tag, usually a barcode label) assoicated with each tape).


D. Thomas Podnar - President  [email protected]  Email
MicroliteCorporation 724-375-6711 Voice
2315 Mill Street 724-375-6908 Fax
Aliquippa PA 15001-2228 888-257-3343 Toll Free Sales

Makers of Microlite BackupEDGE - Data Archiving Software For Unix

http://www.microlite.com ftp://ftp.microlite.com

© October 1999 D. Thomas Podnar. Published by permission


Got something to add? Send me email.





Increase ad revenue 50-250% with Ezoic


More Articles by © D.Thomas Podnar



Kerio Samepage


Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us





We are questioning more than the philosophy behind our dependence upon limited and limiting systems. We question the power structures that have grown up around such systems. (Frank Herbert)

Better to fight for something than live for nothing. (George S. Patton)












This post tagged: