Mark Holm wrote:

[...]

> I am going to have to dig into the source to see how
> it passes parameters to the changer script when two drives are defined.
> Experimentation is now in order, unless of course you are already using your
> Qualstar with Amanda and have a working script?

Actually, my library is a BreeceHill, not a Qualstar.  MTX shouldn't number
the elements any differently for your library though.

As far as changer scripts go, I've had good luck with the chg-scsi program
and I've also used my own perl script.  My OS (FreeBSD) provides its own
changer tools though, so I've never bothered to try scripting mtx.

Anyway, amanda doesn't "pass" any information about the tape drives to the
changer script -- it actually wants the changer to provide the info back to 
it! You can use "amgetconf" from your script to query various parameters 
from the amanda.conf file if you want -- perhaps "amgetconf tapedev".

Since Amanda doesn't really care what the "tapedev" in amanda.conf is set 
to, I just set it to the drive number that the particular configuration 
should use and then do something like

  drivenum=`amgetconf tapedev`
  ...
  mtx -f $changerdev load $slotno $drivenum

I use a config file to keep track of things like which device name is 
equivalent to drive 0.

In a seperate message, you wrote:

> >       Storage Element 1:Full :VolumeTag=DLT000
> >       Storage Element 2:Full :VolumeTag=DLT001
> >       Storage Element 3:Full :VolumeTag=DLT002
> 
> Now this is interesting.  Do you know anything about these VolumeTag
> fields?  I haven't seen this before.  Where are they stored such that
> mtx can get at them?  Is amanda able to actually make use of them or
> does she still cycle through the library to read the tape labels?
> I.e. is 'amtape <conf> show' real fast or real slow?

Those VolumeTags are the actual text from the barcodes on my tapes (printed 
my own).  That info is stored by the library, from its barcode reader.  Many
changer scripts maintain some kind of database that maps the barcodes to the
Amanda labels.  Since I printed the barcodes myself, I cheated and made the
barcodes and Amanda labels match.

When Amanda (2.4.2+) uses a changer script/program, it first calls it with
the "-info" option.  One of the pieces of information Amanda is looking for
is whether the changer is "searchable".  If the changer indicates that it is
searchable, Amanda will ask it to load tapes by Amanda label rather than 
slot number if appropriate (if it knows it's looking for a particular 
label).

You don't have to have a barcode reader to take advantage of this.  If your
changer script can keep some sort of database as to which tape is in which
slot, you can implement the "-search" option.  Much more information about
this is in the file docs/TAPE.CHANGERS in the amanda source.  You'll want
to get the file from CVS since the searchable stuff wasn't documented when
2.4.2p2 was released (it was implemented though).  You can also look at
changer-src/chg-zd-mtx.sh.in -- that script takes advantage of those
features.

-Ben

-- 
Benjamin Lewis                        Thank goodness modern convenience is a 
Database Analyst/Programmer                  thing of the remote future.
Purdue University Computing Center                  -- Pogo, by Walt Kelly
[EMAIL PROTECTED]                 


Reply via email to