Attached is the changer script that I have been using successfully on two
120T's for several months at the School of Computer Science & Electrical
Engineering at The University of Queensland, Australia. These are attached
to Dell PowerEdge 4400's, one running RH6.2 and one running RH7.0.
I had also no luck with the original scripts supplied with Amanda on the
Dell changer - so set out and modified them. I started with the
csee-chg-mtx script in 2.4.1p1 and got it going with the mtx from
http://mtx.sourceforge.net/, basically by confirming that the tapes were
offline before doing any unload command. Then Joe Rhett released a modified
script for the mtx changer that had other things I liked so I adopted and
modified his script into what is here. My script fixes major problems we
were seeing, that potentially could arise with many changers - like
hardcoded bits in the script to load the first slot, but if the first slot
was empty so the script would loop forever! This script uses the sensors in
the changer to determine which slots are full/empty and automatically skips
empty slots, returns to amanda only the number of slots that are full, and
so on. We don't run automated cleaning tapes (at the moment) so I haven't
tested that part of the script, but my script has been 100% reliable for
what it does for us.
You've said you have the changer going now, so hopefully in your logs you
have lines like:
(scsi2:0:0:0) Synchronous at 20.0 Mbyte/sec, offset 8.
Vendor: QUANTUM Model: DLT7000 Rev: 2561
Type: Sequential-Access ANSI SCSI revision: 02
Vendor: ADIC Model: FastStor DLT Rev: D116
Type: Medium Changer ANSI SCSI revision: 02
st: bufsize 32768, wrt 30720, max buffers 5, s/g segs 16.
Detected scsi tape st0 at scsi2, channel 0, id 0, lun 0
Detected scsi generic sg4 at scsi2, channel 0, id 1, lun 0
For other Linux users who might be watching, if you haven't figured out what
devices to use you can determine which tape device and changer device to use
from the last two lines above - in this example, the changerdev is
/dev/sg4, and the tapedev is /dev/nst0 (the no-rewind version of st0). If
you don't have a /dev/sgN or /dev/nstN then use MAKEDEV sgN to create it.
Specify the 'changerfile' to be somewhere writable by the amanda user, and
the script will generate changerfile-clean, changerfile-access and
changerfile-slot files recording number of cleans, number of accesses,
current slot (as per the original scripts).
Hope this helps and you have as much success with my script as I do.
Regards,
Chris
chg-csee-mtx