3 Jason's new and improved chg-scsi documentation. this documentation
4 will also include an occasional reference to the mtx suite as I have
5 attempted to use chg-zd-mtx. I use mtx often as a fast query tool.
6 Please also refer to docs/TAPE.CHANGERS for additional details.
8 My equipment list is as follows:
10 - dual processor p-III
11 - sony dds3 tape drive
12 - lots of hard disk space
13 - Quantum/ATL L500 scsi changer
14 1 DLT tape drive (three possible)
18 I base this documentation on the following:
20 amanda version 2.4.3b3
21 SCSI2 specification: X3T9.2/375R revision 10L
22 Quantum/ATL Field Service Manual 6321101-03 Ver.3, rel.0
23 Quantum dlt800 Tape system product manual 02 April, 2001 81-60118-04
24 the SCSI bus and IDE interface 2nd ed by Friedhelm Schmidt
25 pub: Addision Wesley 1998
27 Note that quantum/atl's L-series changers follow the scsi command set,
28 and do not use any proprietary commands. thus, it was fairly simple to
31 I had to install amanda --with-suffixes and setup my server's client
32 side of things using amanda-2.4.2p2 --with-suffixes.
34 Please note that my usage of "barcode" and "barcode reader" throughout
35 this document really refers to "physical tape identification system".
36 for example: the EEPROM in the AIT cartridge .
38 ------------------------
41 chg-scsi's command line options:
57 Note that chg-scsi is called by amanda in the context of whatever amanda
58 configuration amanda is currently using. In short, to call chg-scsi by
59 hand, change to your amanda configuration directory, then run chg-scsi.
61 -slot <param> command:
63 this command takes either a slot number, or any one of the
65 current, next, prev, first, last, advance
67 It then loads the appropriate tape into the drive.
69 Note that if the tape is already loaded, no changer motion will
70 happen. No reading of the tape is done here.
74 four numbers are printed:
75 <slot# loaded> <number of slots> <reversable> <searchable>
77 with chg-scsi, the reversable number is always 1. Searchable is
78 set based on if a barcode reader is available and working
83 Tape is unloaded, and slot 0 is loaded. No actual reset command
84 is sent to the changer.
88 Tape is unloaded, and put back into its original slot.
92 Cleaning tape (if configured) is loaded into the tape. It is
93 probably unloaded when done. I haven't looked closely at this
96 -label <param> command:
98 This appears to take the currently loaded tape's barcode and
99 write it to the labelfile with the given parameter as it's tape
100 header. I have not tested this.
102 -search <param> command:
104 this only should be used if a barcode reader is present, or
105 emulate barcode is turned on.
107 the required parameter is an amanda tape label. the label
108 searched in the labelfile. If a barcode is found, then that
109 tape is loaded directly.
111 I believe the fallback is to search the entire magazine.
115 the tape changer is queried, and the results are printed out.
116 Values printed are what slots exist, are they full or empty, and
117 what volume labels (barcodes) they are.
118 Q. what about changers that don't retain current slot?
119 A. this is what the "statfile" is for.
123 present only for a particular type of changer.
125 -inventory: (this takes a LONG time to do)
127 1) unloads tape back to its slot
128 2) issues command to changer to do an inventory of itself (read all
130 3) loads each tape, retrieves the barcode, and reads the amanda
131 label off of the tape itself
132 4) stores/updates the label database file
136 prints out in human readable form the label database contents
140 scans the scsi generic interfaces (eg: linux sg), and prints out the
141 device name and the device types. I found that linux didn't
142 classify either of my tape devices as generic, but this facility
143 did. USE THIS FOR FINDING VALUE OF scsitapedev. Be certain
144 though you have the correct tape drive: I came close to wreaking
145 havoc with my dds3 drive while it was flushing amanda data...and
146 my changer has a DLT drive! Please refer to my configuration
151 prints out a SAMPLE changer.conf file. Note that I said sample.
152 except for that it also does a scanbus. if you have more than
153 one tape drive, please be certain it is correct as chg-scsi uses
154 the first one it finds.
156 Please refer to my configuration notes below.
158 --------------------------------------------
162 Here, I try to be a bit more clear on what these config values mean.
164 "number_configs" MUST be the first entry (not counting comments)
166 "emubarcode" will set this value in chg-scsi regardless of the value you
167 try to assign it. If you don't want "emubarcode" set, don't list it!
170 have barcode is tempered by what devices chg-scsi is aware of.
171 if chg-scsi doesn't know about your changer explicitly, it will
172 default to a default changer. the default changer has no
175 In a patch I plan to post, I have added a generic changer that
176 does use a barcode. set "changerident" to "genericbarcode" to
180 number of seconds for chg-scsi to wait for a "tape drive ready"
181 command after loading a new tape. Mine is 140 as I have a DLT
182 tape drive, and my tape drive manual reports a max of 133
186 this is a header telling chg-scsi that all values following, up
187 to the next "config" line apply to this drive number. It is
188 this number that is refered to in your amanda.conf file as line
192 this is the tape drive number in your changer. for a single
193 tape drive, this is zero. Mine can handle up to three, so I
194 expect I could make this 0, 1, or 2.
197 the scsi device of your tape drive. under linux, in my case
198 it is /dev/nst1. This MUST be defined.
201 the generic scsi device of your tape drive. this is simply the
202 generic interface to the device "dev" above. This entry is
203 optional. In my case, it is /dev/sg2. If this entry exists and
204 is legitimate, then scsi commands are formed directly instead of
205 using ioctl commands.
209 the start and end slots of your changer. Note that these also
213 chg-scsi tells the tape changer to eject. You might need to
214 explicitly tell the tape drive to unload first. that's what
215 this setting is for. Have you ever removed a loaded VCR tape
219 chg-scsi will first read the changer's identification from the
220 return of the scsi "inquiry" command. If changerident is set in
221 the configuration file, the scsi inquiry's value is overridden.
222 chg-scsi will attempt to match the value with its built-in
225 "generic" is what the chg-scsi will default to
226 "genericbarcode" is a hack of mine that forces the changer's
227 barcode reader to work. Note that if your changer
228 uses a superset of the scsi command set, this probably
230 "L500" is another addition of mine that will enable a
231 quantum/atl L500 to work correctly. It might even work
234 other values are (taken from the code)
235 C1553A (HP Auto Loader)
236 EXB-10e, EXB-120 (Exabyte Robot)
237 EXB-85058HE-0000 (Exabyte Tape)
238 TDS 1420 (Tandberg Robot)
239 VLS DLT, VLS SDX (ADIC VLS DLT Library)
240 FastStor DLT (ADIC FastStor DLT Library)
241 Scalar DLT 448 (ADIC DLT 448)
242 215 (Spectra Logic TreeFrog)
244 DLT7000, DLT4000 (DLT Tape)
247 setting this to "9:0" is very informative.
250 stores which "slot" that the tape in the drive came from
253 binary file that stores the tape header and barcode information
258 I have my changer set to autoclean, and the slot the cleaning
259 cartridge is in is not available for any other use.
262 -----------------------------------------------
264 Amanda's actual usage of chg-scsi
266 this should be brief:
267 amanda really only issues "slot next" type commands. currently
268 amanda doesn't ask chg-scsi to load "tape x with label
269 Daily_set023". the chg-scsi mechanism is there for use, and
270 functions quite well for the user to load a particular tape.
271 I understand they (the amanda team) is working on this.
273 -----------------------------------------------
277 (assuming one changer with one tape drive!)
281 set tpchanger to chg-scsi
282 set changerfile to <pathname>/changer.conf
284 set changerdev to /dev/<changer generic device>
285 - this value is usually listed in the system boot
286 messages or will be printed via syslog when the
287 appropriate kernel module is loaded.
288 eg: linux "modprobe sg"
291 set number_configs to 1
292 set dev to <non-rewinding tape device eg: /dev/nst1>
295 run "chg-scsi -scan" from your amanda configuration directory
299 name /dev/sg1 Changer
304 I set scsitapedev to "/dev/sg0" to test with, then ran "chg-scsi
305 -info". check the chg-scsi debug file for tapeidentification
306 details. this is where I discoverd that "sg0" was not the
309 set scsitapedev to "/dev/<generic device>"
311 if you have no barcode, try "changerident generic"
312 if you have a barcode reader try "changerident genericbarcode"
316 -----------------------------------------------
321 adding printout of "emubarcode" values in the debug file
323 added dlt8000 tape drive to ChangerIO[], and SenseType[]
324 added genericbarcode to ChangerIO[], and SenseType[]
325 added L500 to ChangerIO[], and SenseType[]
328 added a couple of basic sensecodes listed in the scsi specs for
329 the generic and genericbarcode tape changers.
334 modify the sensecode code such that all scsi devices inherit the
335 standard scsi codes and may override or append to them as
338 modify the configuration reading code and the "inquiry" command
340 eg: my changer displays the following ident data:
341 "L500 6320000" but I had to create a type called "L500"
342 or else the spaces would throw off the comparisons.