chio.1 revision 50471
$NetBSD: chio.1,v 1.4 1997/10/02 00:41:25 hubertf Exp $

Copyright (c) 1996 Jason R. Thorpe <thorpej@and.com>
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgements:
This product includes software developed by Jason R. Thorpe
for And Communications, http://www.and.com/
4. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.

$FreeBSD: head/bin/chio/chio.1 50471 1999-08-27 23:15:48Z peter $

.Dd May 14, 1998 .Dt CHIO 1 .Os .Sh NAME .Nm chio .Nd medium changer control utility .Sh SYNOPSIS .Nm .Op Fl f Ar changer .Ar command .Op Fl <flags> .Ar arg1 .Ar arg2 .Oo .Ar arg3 Oo ... .Oc .Oc .Sh DESCRIPTION .Nm is used to control the operation of medium changers, such as those found in tape and optical disk jukeboxes.

p The options are as follows: l -tag -width indent t Fl f Ar changer Use the device

a changer rather than the default device

a /dev/ch0 . .El

p The default changer may be overridden by setting the environment variable .Ev CHANGER to the desired changer device.

p A medium changer apparatus is made up of .Em elements . There are four element types: .Em picker (medium transport), .Em slot (storage), .Em portal (import/export), and .Em drive (data transfer). In this command description, the shorthand .Em ET will be used to represent an element type, and .Em EU will be used to represent an element unit. For example, to represent the first robotic arm in the changer, the .Em ET would be .Dq picker and the .Em EU would be .Dq 0 .

p .Sh SUPPORTED COMMANDS l -tag -width indent t Xo Nm move .Ar <from ET> <from EU> <to ET> <to EU> .Op Ar inv .Xc Move the media unit from

a <from ET/EU> to

a <to ET/EU> . If the optional modifier

a inv is specified, the media unit will be inverted before insertion. t Xo Nm exchange .Ar <src ET> <src EU> <dst1 ET> <dst1 EU> .Op Ar <dst2 ET> <dst2 ET> .Op Ar inv1 .Op Ar inv2 .Xc Perform a media unit exchange operation. The media unit in

a <src ET/EU> is moved to

a <dst1 ET/EU> and the media unit previously in

a <dst1 ET/EU> is moved to

a <dst2 ET/EU> . In the case of a simple exchange,

a <dst2 ET/EU> is omitted and the values

a <src ET/EU> are used in their place. The optional modifiers

a inv1 and

a inv2 specify whether the media units are to be inverted before insertion into

a <dst1 ET/EU> and

a <dst2 ET/EU> respectively.

p Note that not all medium changers support the c exchange operation; the changer must have multiple free pickers or emulate multiple free pickers with transient storage. t Xo Nm position .Ar <to ET> <to EU> .Op Ar inv .Xc Position the picker in front of the element described by

a <to ET/EU> . If the optional modifier

a inv is specified, the media unit will be inverted before insertion.

p Note that not all changers behave as expected when issued this command. t Nm params Report the number of slots, drives, pickers, and portals in the changer, and which picker unit the changer is currently configured to use. t Nm getpicker Report which picker unit the changer is currently configured to use. t Xo Nm setpicker .Ar <unit> .Xc Configure the changer to use picker

a <unit> .

p t Xo Nm ielem .Op Pa <timeout> .Xc Perform an INITIALIZE ELEMENT STATUS operation on the changer. The optional

a <timeout> parameter may be given to specify a timeout in seconds for the operations. This may be used if the operation takes unusually long because of buggy firmware or the like. t Xo Nm voltag .Op Fl fca .Ar <ET> .Ar <EU> .Op Ar <label> .Op Ar <serial> .Xc Change volume tag for an element in the media changer. This command is only supported by few media changers. If it is not supported by a device, using this command will usually result in a "Invalid Field in CDB" error message on the console.

p If the .Fl c flag is specified, the volume tag of the specified element is cleared. If the .Fl f flag is specified, the volume tag is superseded with the specified volume tag even if a volume tag is already defined for the element. It is an error to not specify the .Fl f flag when trying to set a label for an element which already has volume tag information defined.

p The command works with the primary volume tag or, if the .Fl a flag is given, with the alternate volume tag. t Xo Nm status .Op Fl vVsSbIa .Op Ar <type> .Xc Report the status of all elements in the changer. If

a <type> is specified, report the status of all elements of type

a <type> . t Fl v Print the primary volume tag for each loaded medium, if any. The volume tag is printed as <LABEL:SERIAL>. t Fl V Print the alternate volume tag for each loaded medium, if any. t Fl s Print the additional sense code and additional sense code qualifier for each element. t Fl S Print the element source address for each element. t Fl b Print SCSI bus information for each element. Note that this information is valid only for drives. t Fl I Print the internal element addresses for each element. The internal element address is not normally used with this driver. It is reported for diagnostic purposes only. t Fl a Print all additional information (as in .Fl vVsSba ). .El

p The status bits are defined as follows: l -tag -width indent t FULL Element contains a media unit. t IMPEXP Media was deposited into element by an outside human operator. t EXCEPT Element is in an abnormal state. t ACCESS Media in this element is accessible by a picker. t EXENAB Element supports passing media (exporting) to an outside human operator. t INENAB Element supports receiving media (importing) from an outside human operator. .El

p .Sh EXAMPLES l -tag -width indent t Nm chio move slot 3 drive 0 Move the media in slot 3 (fourth slot) to drive 0 (first drive). t Nm chio setpicker 2 Configure the changer to use picker 2 (third picker) for operations. .El .Sh FILES l -tag -width /dev/ch0 -compact t Pa /dev/ch0 default changer device .El .Sh SEE ALSO .Xr mt 1 , .Xr mount 8 . .Sh AUTHORS The .Nm program and SCSI changer driver were written by .An Jason R. Thorpe Aq thorpej@and.com for And Communications, http://www.and.com/.

Additional work by .An Hans Huebner Aq hans@artcom.de