FreeBSD 4.1.1
Exabyte 210 Robot
Exabyte 8900 (Mammoth)
Adaptec 2940W (Differential) Adapter
Amanda 2.4.2b2
I'm being forced by some horribly sadistic upper-management types to fight
a very old, crusty Exabyte 210 robot with an implanted Exabyte Mammoth
drive. The chg-chio (Perl script version) that comes with Amanda 2.4.2b2
*almost* works but just misses the mark.
Does anyone have a happier, more shiny chg-chio script they would like to
share? Preferably compatible with post-CAM FreeBSD? (4.1.1 to be exact)
In hopes of saving some other poor FreeBSD 3/4+ user the sheer agony of my
evening I'll explain my problem: Unlike chg-scsi (also referred to as/with
chg-scsi-chio and chg-chio in TAPE.CHANGERS for the sole purpose of
confusing people) the Perl chg-chio doesn't use a changer configuration
file. The robot keeping me down has 11 slots, 10 data and 1 cleaning tape
which is slot 0. The Perl version of chg-chio sees the slots one position
off. To illustrate:
/usr/local/sbin/amtape daily slot 3
results in:
amtape: changed to slot mt: on /dev/nsa0: Device not configured
$ /bin/chio -f /dev/ch0 status
picker 0:
slot 0: <ACCESS,FULL>
slot 1: <ACCESS,FULL>
slot 2: <ACCESS> <----- Mommy?
slot 3: <ACCESS,FULL>
slot 4: <ACCESS,FULL>
slot 5: <ACCESS,FULL>
slot 6: <ACCESS,FULL>
slot 7: <ACCESS,FULL>
slot 8: <ACCESS,FULL>
slot 9: <ACCESS,FULL>
slot 10: <ACCESS,FULL>
drive 0: <FULL>
(NOTE: the "amtape: changed to slot mt: on /dev/nsa0: Device not
configured" freaks me out but, device or not, it seems to do it's thing..)
Debug output:
Wed Nov 8 1:45:43 2000: slot 0: <ACCESS>
Wed Nov 8 1:45:43 2000: slot 1: <ACCESS,FULL>
Wed Nov 8 1:45:43 2000: slot 2: <ACCESS,FULL>
Wed Nov 8 1:45:43 2000: slot 3: <ACCESS,FULL>
Wed Nov 8 1:45:43 2000: slot 4: <ACCESS,FULL>
Wed Nov 8 1:45:43 2000: slot 5: <ACCESS,FULL>
Wed Nov 8 1:45:43 2000: slot 6: <ACCESS,FULL>
Wed Nov 8 1:45:43 2000: slot 7: <ACCESS,FULL>
Wed Nov 8 1:45:43 2000: slot 8: <ACCESS,FULL>
Wed Nov 8 1:45:43 2000: slot 9: <ACCESS,FULL>
Wed Nov 8 1:45:43 2000: slot 10: <ACCESS,FULL>
Wed Nov 8 1:45:43 2000: drive 0: <ACCESS,FULL>
Wed Nov 8 1:45:43 2000: enter: getCurrentTape
Wed Nov 8 1:45:43 2000: leave: getCurrentTape: 1
Wed Nov 8 1:45:43 2000: leave: getTapeStatus: 11
Wed Nov 8 1:45:43 2000: enter: changeTape: 3
Wed Nov 8 1:45:43 2000: enter: Unload: 1
Wed Nov 8 1:45:51 2000: leave: Unload
Wed Nov 8 1:45:51 2000: enter: Load: 3
Wed Nov 8 1:45:51 2000: running: /bin/chio -f /dev/ch0 move slot 2 drive
0
Wed Nov 8 1:46:02 2000: leave: Load
Wed Nov 8 1:46:02 2000: leave: changeTape
Wed Nov 8 1:46:02 2000: 3 /dev/nsa0
HA! move slot 2 drive 0!! You bastard!! And you have the nerve to answer
to slot 3? Shame upon thee! I said 3!
Also, due to not reading the changer.conf file we also end up not sending
an offline (eject) to the tape drive so the 210's robot arm will just end
up grasping at space in any tape-moving operation. It and me both... =)
I banged my head against a wall for quite a while (2-3 hours?) trying to
figure out why this wasn't working while reading over and over the
"TAPE.CHANGERS" file. My mistake was believing the line 483, "chg-chio:
(new Perl script, that replaces the original chg-chio written in C)"
actually meant "compatible" replacement. When taken in context with the
line 294: "chg-scsi-chio: (former seagate-changer, then chg-chio)" I got
the impression that the same options and configuration would be
appropriate to the latter form of chg-chio (Perl.) NOPE! =)
In a way I hope I'm not the only one who washed against this sea wall of
lament and frustration. I already feel beaten up enough.
If nobody has a wonderific replacement for chg-chio(.pl) I would be
beaming joy to hear from you. I would appreciate any quick-fixes to the
present script as well. Basically I just want my slots to line up, a
cleaning tape in slot 0 recognized as such, and an eject whenever we need
to unload a tape. So simple on paper...