Amanda-Users

Re: BSD Users: Barcode Readers w/ chio(1)/mtx(1) ?

2005-08-20 00:08:05
Subject: Re: BSD Users: Barcode Readers w/ chio(1)/mtx(1) ?
From: eric AT cirr DOT com (Eric Schnoebelen)
Date: Fri, 19 Aug 2005 22:46:58 -0500
"Brian A. Seklecki" writes:
- Is anyone using a barcode reader enabled tape changer on FreeBSD?

        I'm not using FreeBSD (except as a client), but I am
using Amanda on NetBSD, attached to an Exabyte EXB-480 robot,
which has barcode support.

        However, I'm using chg-scsi for Amanda's access to the
robot (not surprising, since my name is on a bit of that code..
:-)

        If the robot you're using is one of the ones known by
chg-scsi, it's pretty easy.  And if your robot isn't known by
chg-scsi, it's usually pretty easy to add support for a new
robot, usually by taking the needed support pieces from the
working robots..

- I can't seem to find any good posts in the archive with example output 
- from "chio status -v" or "mtx status" on [Free]BSD w/ a working barcode 
- reader.
- 
- If you have one, could you post the output?

        I don't have mtx, and chio(1) on NetBSD doesn't support
-v.   However, ``chio status voltags'' on NetBSD looks like
this: (only a few slots, the drives, and the portal)

                slot 76: <ACCESS,EXCEPT,FULL>
                        Primary volume tag: CIRM0081 ver. 0
                slot 77: <ACCESS>
                        Primary volume tag:  ver. 0
                slot 78: <ACCESS,EXCEPT,FULL>
                        Primary volume tag: CIRM0079 ver. 0
                slot 79: <ACCESS>
                        Primary volume tag:  ver. 0
                slot 80: <ACCESS,EXCEPT,FULL>
                        Primary volume tag: CIRM0074 ver. 0
                portal 0: <INEAB,EXENAB,ACCESS,EXCEPT,FULL>
                        Primary volume tag: CIRM0087 ver. 0
                        From: drive 1
                drive 0: <ACCESS>
                        Primary volume tag:  ver. 0
                drive 1: <EXCEPT,FULL>
                        Primary volume tag: CIRM0089 ver. 0
                        From: slot 40
                drive 2: <ACCESS>
                        Primary volume tag:  ver. 0
                drive 3: <ACCESS>
                        Primary volume tag:  ver. 0

- I was reading about ANSI/ISO standard labels.  I guess the standard that 
- applies to (DLT for example) is "ANSI MH10.8M-1983 Code 39 (3 of 9)."

        Becareful.. In some topics (and I think this is one) a
"standard label" is an on-media entity used by tape management
systems.  It has little to do with the external (bar code) label
on the media enclosure.

- Supposedly, chio(1) can execute a command:
- 
-       # chio move voltag VOLUME01 drive 0

        This doesn't work on NetBSD.

- I'm also curious: does this imply that the loader has a small cache in 
- which barcode are in which slots/locations?  Or is that cache in the 
- kernel?

        As far as I can tell, the SCSI robot (at least on the
EXB robots) keep track of the barcodes, and where they are
located (assuming, of course, that there's a barcode reader on
the picker.)

-          Obviously the loader has a small cache (perhaps in an nvram) of 
- which slots are occupied, OR the "chio status" sends a SCSI inquiry 
- command which polls those sensors in hardware.

        The information is transmitted from the robot to the
kernel/application by one of the SCSI changer control commands
(I probably knew which one in the past, but I've slept..)

- ...and finally, when chio(1) attempts to move a tape based on it's 
- "VOLTAG", is it using some cache of data from the loader nvram, or does 
- that imply that the barcode reader has to go out and re-read each tape's 
- label.  Is the barcode label attached to the picker?

        The barcode label reader is attached to the picker.  The
barcodes themselves are attached to the media enclosures.  I
seem to remember that there is a SCSI command to request a move
based upon the media barcodes, but, see above for the accuracy
:)

        Which robot are you trying to use?

--
Eric Schnoebelen                eric AT cirr DOT com            
http://www.cirr.com
  Those who cannot remember the past are doomed to buy Microsoft products.