First, many thanks for all the tips that came flying in. Here's how I got
to the root of the problems. This summary is for the archives (although
they seem to be dead since July 30th) so the next person doesn't suffer
for days :) I know, what's the fun in that? :)

I'm running RH71, with hand-compiled mtx-1.2.13, and the original
Amanda-2.4.2p2 RH71 rpm. I've been wrestling with my IBM 7332 4x or 12x
4mm DDS2 DAT library. Its a stacker with random access capabilities.

Here's what I found:

1. It's critical that all possible options that can be set are set in your
changer.conf file. Don't include the .conf in the name of the changerfile
in amanda.conf.  Also, when specifying options, separate the option names
from their values with "=" and no white space, not tabs as
/usr/share/doc/amanda*/TAPE.CHANGERS shows.

The "unary operator expected" failure comes in when comparing things like
the slot you want to load vs the first available slot as configured in the
config file. If you don't structure the lines properly, their values won't
get read and the script will fail to compare something like "is the
desired slot less than the first usable slot" because there is no "first
usable slot" defined. The equation falls apart when the second value is
completely missing.

BTW, the 'startuse' and 'enduse' variables in the docs are now 'firstslot'
and 'endslot'. These indicate which slots will hold usable tapes.

I set number_configs, eject, cleanmax, changerdev, havereader,
autocleancount, offlinestatus, config, drivenum, dev, scsitapedev,
firstslot, lastslot, statfile, cleanslot (1 higher than the last slot if
none, not -1 BTW), cleanfile, usagecount, tapestatus,
OFFLINE_BEFORE_UNLOAD, and AUTOCLEAN in the changer.conf file.

2. Around line 104 in chg-zd-mtx, the drivenum variable uses sed to pull
out the trailing number from the tapedevice variable. The drivenum
variable is used later on in constructing mtx commands. In my case, my
library is my second tape drive, with devices /dev/nst1 for the read/write
head and /dev/sg1 for the robotic arm. When drivenum pulled the '1' off
the end of either /dev/nst1 or /dev/sg1, it was used in an mtx load
command as "mtx load 1 1" which caused a segfault. I commented out the
drivenum calculator and replaced it with

drivenum = 0

which fixed that problem when the mtx command was rerun as "mtx load 1 0"
(load slot 1 into read/write head 0).

3. In amanda.conf, I set tapedev to "/dev/nst1" and changerdev to
"/dev/sg1", not the same device as the docs hint. I also created a symlink
to /dev/sg1 as /dev/changer since the script doesn't seem to give mtx the
needed -f parameter.

That's all I can think of for now. Hope this helps someone, somewhere,
sometime.

--
Steve Jackson
e-business Architect for $$
Linux hacker for :)
- finger for PGP public key -



Reply via email to