ftp://ftp.estinc.com/pub/unsupported/mtxl-1.3.tar.gz

This is a major modification to Leonard Zubkoff's 'mtx' program to support
multi-drive tape libraries and bar-code readers. Unfortunately, the only
multi-drive tape library I have inhouse appears to have died with a bad power
supply :-(, so I haven't tested it with multi-drive libraries yet. This is a
chance for someone to be a guinea pig :-). 

Basically, I extended mtx to accept a second (optional) 'tape drive' argument
to its commands. I count tape drives starting from 0, since I am a computer
scientist, not an ancient Roman (who started counting at 1). For backward
compatibility, the actual element slots are still counted starting at 1
(though internally they're started at '0', sigh). I also changed it so that it
would report barcodes on the tapes (assuming that the tape library has barcode
capability). Note that I programmed all of this from the raw T10 SCSI specs
and there's no guarantee that (especially) the barcode stuff works. (The
multiple tape drive stuff has a better chance of working, since if it didn't,
the 1st tape drive probably wouldn't work :-).

For that matter, there's no guarantee that any of this stuff works :-). See
the README file. In particular, note that 'mtx first', 'mtx last', etc. are
currently broken/unimplemented. I haven't figured out what makes sense to do
there for multi-drive libraries. But do note that it will accept multiple
unload/load commands on one command line, so there's no need to do 'mtx -f
/dev/sg4 unload 4' then 'mtx -f /dev/sg4 load 5' to load the next tape... just
do 'mtx -f /dev/sg4 unload 4 load 5' and it SHOULD work (though you may have
had to issue a 'mt offline' on the tape drive to eject the tape first,
depending upon the tape changer and drive, sigh).   

Also note that the only OS that I have tested on is Linux. I am using Leonard
Zubkoff's low-level SCSI code, which SHOULD still work cross-platform, but no
guarantees (there's a reason why it's in the 'unsupported' area :-). 

Another mod -- I changed some of the messages to make them more easily
parsable from Perl (or the scripting language of your choice). Comments
regarding whether I succeeded in doing so are appreciated. 

Last major mod -- I pulled all the stuff that issued actual SCSI commands out
of the main 'mtx.c' file into a "mtxl.c" file. If you want to control a tape
library from your own "C" programs, this should allow you to do that by simply
linking "mtxl.c" into your program. Note that, since 'mtxl.c' is mostly LNZ's
code, it is under the GPL, so you can only do this if you intend to release
your program under the GPL. 

-- 
Eric Lee Green                         [EMAIL PROTECTED]
Software Engineer                      Visit our Web page:
Enhanced Software Technologies, Inc.   http://www.estinc.com/
(602) 470-1115 voice                   (602) 470-1116 fax

Reply via email to