SCSI Media Changer Control Program
This is a major overhaul of Leonard Zubkoff's 'mtx' program. Note that
Leonard is no longer maintaining 'mtx' and has asked me to handle
further enhancements of the program, so please bother me (Eric Lee Green) or the MTX mailing
list with any problems. This version has the following features:
- Will deal with LARGE media libraries (over a hundred elements).
- Supports multi-drive media changers such as the Exabyte 220 dual-
drive tape library.
- Supports the 'invert' bit for optical jukeboxes that need that in
order to flip their media.
- Supports the 'eepos' bits for libraries that need this to extend/retract
their import/export tray.
- Now supports import/export elements!
- Reports volume tags (bar codes) and "alternate volume tags"
(whatever those are!) for those tape libraries
that support them.
- Has been altered on Linux to use the SCSI
generic interface rather than the SCSI_IOCTL_SEND_COMMAND ioctl, due to the
size limitations on the ioctl (which precludes being able to request more
than 4096 bytes in a SCSI command -- a large tape library could return
10K or more for a READ_ELEMENT_STATUS command).
- Now runs under FreeBSD.
- Will use the "_ATTACHED" API for SCSI devices that report the
'MChangr' bit in their status information (see the ANSI SCSI specification for more info).
- Now has a 'man' page!
- The actual SCSI manipulation has been separated out into a library, so
that you can create your own "C" programs that manipulate SCSI media changers
directly. (Please note: this is under GPL, so any such programs will have
to be under GPL also!).
Notes:
You may wish to use MTX 1.1 (ftp://ftp.estinc.com/pub/unsupported/mtx-1.1.tar.gz
for smaller autochangers because:
- mtx 1.2 requires a Linux kernel of version 2.2.6 or greater for reliable
operation. See "Known bugs and limitations" below.
- This program requests element status with volume tag (bar code)
information, and many small tape changers will report back that it's
an illegal command. mtx 1.2 will back off and request element status
WITHOUT the volume tag, and thus will work, but this is an extra
level of complexity.
- This program has only been tested under FreeBSD, Solaris, and Linux, and there only with
a limited set of hardware:
- Seagate DDS-4 six-tape DAT loader
- Exabyte EZ-17 seven-tape 8mm loader
- Exabyte 220 21-tape dual-drive 8mm tape library.
- HP SureStore DAT 40x6 6 tape DAT loader.
Source Code
The current source code is:
RPMs may be available from the following place:
A .spec file is now included in the 'mtx' distribution for building your
own RPM's.
Note that RPMs
are courtesy of Kenneth Porter,
who should be contacted regarding rpm-related problems.
The most stable source code is:
Always check the directory ftp://ftp.estinc.com/pub/unsupported/ before believing anything
that you read here.
Known Bugs And Limitations
-
You may need to do a 'mt offline' (or equivalent for your OS)
on the tape drive to
eject the tape before you can issue the 'mtx unload' command.
The Exabyte EZ-17 and 220 in particular will happily
sit there snapping the robot arm's claws around thin air
trying to grab a tape that's not there.
-
The 'next' command does not understand the 'invert' bit (i.e., does not
recognize that for optical jukeboxes, the 'next' of side one is to unload,
invert, and reload the same disk). It always advances to the next
slot instead.
-
For some Linux distributions, you may need to re-compile
the kernel to scan SCSI LUN's in order to detect the media
changer. Check /proc/scsi/scsi to see what's going on.
-
If you try to unload a tape to its 'source' slot, and said
slot is full, it will instead put the tape into the first
empty slot. Unfortunately the list of empty slots is not
updated between commands on the command line, so if you
try to unload another drive to a full 'source' slot during
the same invocation of 'mtx', it will try to unload to the
same (no longer empty) slot and will urp with a SCSI
error.
- For big tape libraries (more than a couple dozen elements) this
may set a big Allocation_Size in the SCSI command block for the
REQUEST_ELEMENT_STATUS command. Some operating systems may not be able
to handle this. Versions of Linux earlier than 2.2.6, in particular,
may fail this request due to inability to find contiguous pages of
memory for the SCSI transfer (later versions of Linux 'sg' device do
scatter-gather so that this should no longer be a problem).
- This program has only been tested on Linux and FreeBSD
with a limited number
of tape loaders (a dual-drive Exabyte 220 tape library, with bar-code
reader and 21 slots, an Exabyte EZ-17 7-slot autoloader, and a Seagate
DDS-4 autochanger with 6 slots).
- This program will not work on libraries
with multiple robot arms unless said libraries present themselves as multiple
one-robot-arm libraries to the SCSI bus.
- It has been reported that this program works on Solaris 7 using the 'sst'
driver, and may work on Solaris 8 using the 'sgen' driver. 'sst' can
be gotten from the Amanda contrib directory at
http://download.sourceforge.net/amanda/amanda-2.4.2-19991216-beta1.tar.gz.
Future
mtx 1.2 is now in maintenance mode. No new features will be added unless
necessary for the proper operation of some device, though I may twiddle the
output format very slightly in order to make it more easily parsable by
shell scripts. I will attempt to keep such changes backward-compatible.
mtx 2.0 will be a major overhaul of the mtx user interface. Some things
envisioned for mtx 2.0:
- Use autoloader's own numbering scheme, rather than the virtual
numbering scheme, and tag each number with what kind of element it is.
This will allow eventually supporting things like, e.g.,
multiple robot arms.
- Make the output format even more shell-script friendly.
- zap the 'load' and 'unload' commands, have a single 'transfer' command
with source and destination element numbers.
('next' with optional drive number
might still be supported since it is useful for many people).
- Better support for invertable media. In particular, 'next' in
conjunction with the 'invert' bit should be
able to issue the proper mode sense command to note what side is in the
drive, and if it's side one, should be able to eject to its source slot then
flip it and put side two into the drive.
- Better support for import/export ports. This, alas, will require some
research, since nobody seems to do import/export ports the same on any
two libraries that they offer :-(.
- A generic SCSI tape control program that uses the mtxl.c library, so that
your shell scripts will work the same whether they are on Linux, FreeBSD,
Solaris, or IRIX, without having to figure out whether to use 'mtx' or
'tapectl' or etc to eject a tape and if so, what arguments to use to eject
it.
- A TCL/TK GUI for controlling tape libraries and possibly for
controlling tape drives. Any volunteers to write
this?!
Support
See Also:
Eric Lee Green
Last modified: Tue Nov 28 08:55:26 MST 2000