SCSI Media Changer and Backup Device Control System
mtx is a set of low level driver programs to control features
of SCSI backup related devices such as autoloaders, tape changers,
media jukeboxes, and tape drives. It can also report much data,
including serial numbers, maximum block sizes, and TapeAlert(tm)
messages that most modern tape drives implement (to tell you the exact
reason why a backup or restore failed), as well as do raw SCSI READ
and WRITE commands to tape drives (not important on Linux, but
important on Solaris due to the fact that the Solaris tape driver
supports none of the additional features of tape drives invented after
1988). mtx is designed to be a low level driver in a larger
scripted backup solution, such as Amanda or BRU Professional. mtx is not
supposed to itself be a high level interface to the SCSI devices that
it controls.
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.
- Now runs under FreeBSD and at least Solaris 8.
- 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).
This program supposedly supports FreeBSD, Solaris, Linux, and
IRIX. Tru64 Unix and VMS are probably irretrievably broken at this
time. This program has 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.
- Ecrix Autopack 15-tape and 30-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.
Leonard Zhubkoff's original (obsolete) 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).
- VMS and Tru64 support are probably irretrievably busted. The last time
IRIX was tested was for mtx 1.2.10.
- This program will only use the first arm of multiple-arm robots unless
the robot re-maps all arms to one element ID.
- 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.
Philosophy
The Unix philosophy is "many small tools chained together". mtx supplies
those small tools so that you can create your own backup and
recovery tools by chaining
mtx pieces together, whether it be with /bin/sh, Perl, Python, or
CAML.
Future
mtx 1.2 will continue to have enhancements done to its core functionality
as long as there is demand.
mtx 2.0 is once again back into planning stages. The biggest change
envisioned for mtx 2.0 is a major change in the way that it handles
the low-level device interface to allow multiple interfaces. The main
reason for this is to allow NDMP loader support (not that I have a NDMP
loader at present, but the NDMP standard definitely allows for them to
exist!). This should also make it possible to program a distributed backup
system using mtx 2.0.
Some other things
envisioned for mtx 2.0:
- Make the output format even more shell-script friendly.
- 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 :-(.
- Figure out some way to support multiple arms on libraries with more than
one robot arm (currently the 2nd and subsequent arms are ignored).
- Support the new 'sg' driver in the Linux 2.4 kernel, which will allow
grabbing of sense data that currently gets munched in the 2.2 kernel.
- A TCL/TK GUI for controlling tape libraries and possibly for
controlling tape drives. Any volunteers to write
this?!
Support
See Also:
Maintained by Eric Lee Green
Hosted by VA Linux's SourceForge
Last modified: Mon Apr 23 12:39:08 MST 2001