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.
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:
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.
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:
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:
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 | tom@microlite.com | |
| 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 |
Publish your articles, comments, book reviews or opinions here!
© October 1999 D. Thomas Podnar. Published by permissionMore Articles by D.Thomas Podnar

/Unixart/autoload.html copyright May 2000 D.Thomas Podnar All Rights Reserved
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. We appreciate comments and article submissions.
Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.
Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.
We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.
Click here to add your comments
Don't miss responses! Subscribe to Comments by RSS or by Email
Click here to add your comments
If you want a picture to show with your comment, go get a Gravatar